6.1 Manual Process for Updating sfops from Upstream
This guide outlines the step-by-step process for manually updating your sfops instance from the upstream repository (hosted in private Gitea at source.flxbl.io). This process is an alternative to using the automated workflows.
Prerequisites
Git installed on your local machine
Access to your organization's sfops repository
Access credentials for the Gitea repository (source.flxbl.io)
Necessary permissions to create and merge pull requests
Docker installed (if working with image updates)
Authentication Setup
1. Gitea Authentication
Before starting, you'll need to set up authentication for the private Gitea repository:
Generate a Gitea Access Token:
Log in to source.flxbl.io
Go to User Settings → Applications
Generate a new access token with repository access
Save the token securely; it won't be shown again
Configure Git Authentication using the token:
Step-by-Step Process
1. Clone and Configure Your Repository
2. Sync with Upstream
3. Apply Updates
4. Testing Changes
Review all modified files carefully
Test any modified workflows locally if possible
Check for any environment-specific configurations that need adjustment
Verify compatibility with your organization's customizations
5. Create and Submit Pull Request
Push your changes to your repository:
Create a pull request with the following information:
Title:
feat: update from upstream <version-tag>
Description: Include the upstream release notes and any specific modifications made
Labels: Add appropriate labels for tracking
6. Handle Docker Image Updates
The sfops repository manages two Docker images: sfops
and sfops-lite
. Docker images may need to be updated in two scenarios:
When there's a new SFP CLI version to be incorporated
When there are other changes in the Dockerfiles or dependencies, even without an SFP CLI version change
Triggering Image Updates
For SFP CLI updates, update the version in the workflow file:
For any Docker-related updates (including non-SFP CLI changes):
Navigate to Actions → "Build & Publish Docker Image" workflow
Click "Run workflow"
Select the branch (usually 'main')
Click "Run workflow"
The images follow a promotion path:
Initial build creates images with
preview
tagPromotes to
alpha
after approvalFinally promotes to
latest
for production use
Manual Verification Steps
Check the current image versions:
Monitor the promotion workflow:
Build → Preview tag
Alpha approval → Alpha tag
Production approval → Latest tag
Verify image configurations:
Check Dockerfile changes in
dockerfiles/sfops.Dockerfile
Check Dockerfile changes in
dockerfiles/sfops-lite.Dockerfile
Verify SFP CLI version compatibility
Even if there's no SFP CLI version change, you might need to rebuild the Docker images to incorporate other updates or improvements. Always use the manual workflow trigger when you need to ensure the latest changes are included in the Docker images.
7. Post-Merge Steps
After merging the pull request:
Monitor the triggered workflows:
Build & Test workflow
Docker image building workflow (if applicable)
Approve deployments to test environments
Verify functionality in test environment
Proceed with production deployment approval if tests pass
8. Production Deployment
Ensure all test environment validations are successful
Approve production deployment in the release workflow
Monitor production deployment
Verify production functionality
Important Notes
Always backup your configurations before starting the update process
Document any manual changes made during conflict resolution
Keep track of any customizations that need to be reapplied
Test thoroughly in non-production environments before proceeding to production
Consider the impact on concurrent development work
Maintain a rollback plan
Regularly rotate your Gitea access tokens for security
Never commit tokens or credentials to the repository
Troubleshooting
If you encounter issues during the update:
Check the git log to understand the changes:
Use git diff to examine specific changes:
Consider reverting to a previous state if needed:
Common Authentication Issues
If you get "Authentication failed":
Verify your Gitea token hasn't expired
Check if token has correct repository access permissions
Ensure you're using the correct username
Try re-authenticating with a new token
If you get "Repository not found":
Verify you have access to the repository in Gitea
Check if your token has the correct scope
Verify the repository URL is correct
Support
If you need assistance during the manual update process:
Contact your sfops point of contact
Check the #sfops slack channel for common issues and solutions
Review the release notes for specific version-related information
Remember to always test thoroughly and maintain proper documentation of any manual changes made during the update process.
Last updated