With those examples of CI/CD pipelines, you will deploy your applications on Edgegap with a simple push!
Semantic versioning give your release version a "name" and convey some helpful information. Semantic versioning follows the X.Y.Z pattern. This version tag can be prefixed or suffixed with some alphanumeric characters. Example of semantic versioning:
- Increasing MAJOR means adding non-backward compatible changes.
- Increasing MINOR means backward compatible feature additions.
- Increasing PATCH means backward compatible bug fixes.
YEAR.MONTH.DAY This goes pretty well when you are releasing daily.
So the goal here is to have a name for your release versions that can increase over time. You can talk about versioning with your team about which concept fits you most.
Git branching strategy is essential to make your CI/CD pipelines more manageable. You must separate your development from your production-ready application. There are multiple tutorials on managing your branches, but the easiest way to do this is to have at least two branches.
- develop: branch in which features are developed and bugs are corrected. It should be ahead of the main branch or even when a merge is done with the main.
- main or master: branch in which develop is merged to do a release of your newest features or bug fixes.
Using Edgegap's Container Registry service will remove the overhead of creating and managing an app version each time your image is pushed. For more information on the Container Registry service see doc.
- Get access to Edgegap's Container Registry
- An app template (optional and only if you want your app version to be created automatically)
- A Github project with admin permissions
- A Dockerfile located at the root of your project
This example with
Github's Actions will show how you can automatically increase the MINOR of your version tag every time you merge the
develop into the
It will also create a new
Application Version in Arbitrium if you are using Edgegap's Container registry.
- In your project settings on Github, under
Security -> Secrets -> Action, create four Action secrets. One for each field in the Edgegap's Container Registry.
PROJECTThe auto-generated name by Edgegap's Container Registry
REGISTRYURL of the registry (ex: registry.edgegap.net)
REGISTRY_USERNAMEThe username to login into the project
REGISTRY_TOKENThe password to login into your project
- Create a file at the root of your project named VERSION with your version number inside and push it to Github.
- Create a file in
.github/workflows/increment-minor.ymland and push it to Github. Don't forget to change
IMAGE_NAME. Github will automatically detect new
Actionsand show them in your repository's under the
REGISTRYURL of the registry (set in Action Secret)
PROJECTThe auto-generated name by Edgegap's Registry Container (set in Action Secret)
REGISTRY_USERNAMEThe username to login into the project (set in Action Secret)
REGISTRY_TOKENThe password to login into your project (set in Action Secret)
IMAGE_NAMEThe name of your image, can be your project name
VERSION_FILEPath to the file containing your version
VERSION_FRAGMENTfeature for a MINOR (see more here)
To tag a new MINOR version on Github, you'll only need to create a pull request to merge develop into main.
This script's first job makes a git tag each time a pull request from
develop has been merged into the
main branch, then updates the
VERSION file to the newest tag.
Building and pushing image
The following job builds and pushes to Edgegap's Container Registry your image using your version number as the name of the image tag. This pipeline also pushes to the latest tag, but you should not use it in your production environment; see why.
Create a new branch from
Git Checkout on your new branch
Change some code (can be updating the README)
Commit and push your changes in your branch
Create a pull request from your branch to
Accept your pull request
Create another pull request from
Accept your second pull request
See your pipeline triggering:
Increment MINOR version, building image and pushing to the registry
Once completed, you should see a new repository in Edgegap Registry Dashboard with one artifact
- If you didn't have an application template, create one.
- Repeat 1 to 9 steps again
- See that everytime you are building a new tag, a new app version is created