AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Git tag semantic versioning9/1/2023 We did it this way for security reasons and not to hold these credentials in a clear text format. GIT_REPO – This is an environment variable which stores our git repository https URL.Īdditionally, we added two more environment variables that store values of our git user name and git password in EC2 parameter store. When minor version is changed, script restarts counter to zero for patch version numbers. If and when needed, it has to be updated manually in our buildspec.yml file. MINOR_VERSION – Minor version for our build number. When major version is changed, script restarts counters to zero for minor and patch version numbers. MAJOR_VERSION – Major version for our build number. We created six environment variables four “regular” environment variables, and two (GIT_USER and GIT_PASS) mapped on the EC2 Parameter Store variables.īRANCH_NAME – Branch name on which we re creating our new tag and from which we ll clone our repository. git config -global user.email bash git_taging.sh The explanation of the buildspec.yml function file: apt-get update -y & apt-get install -y git Therefore, we created a new AWS CodeBuild project, used AWS s Base Ubuntu 14.04 version runtime and created the following buildspec.yml file: version: 0.2 We knew that we needed to create a Tag on Git repository and it can be accomplished using standard Git CLI to list and create Tags. Since a tag relies on a specific branch, we wanted to create a tag with the following pattern: Then, on the latest project we ve been working on, we had a real need for numbered builds in order to track our releases. That s where we got an idea to create it ourselves and completely automate the process of tagging. We d been searching for any kind of solution that could support it, Some of the clients we ve been working with, requested us to use tools like GitLab CI and AWS CodeBuild to implement CI and CD processes, but the semantic build number feature wasn t and still isn t supported for some reason. More about semantic versioning can be found here: įor a while we ve been using semantic build numbers to tag successful builds in tools like Jenkins and TeamCity in order to have the usual overview of all builds.
0 Comments
Read More
Leave a Reply. |