Hello,
I would like to add a pre-script to our Azure pipeline, where versioning is death with:
Creating a variable that can be used in the Azure pipeline.
Today we use a variable directly into the pipeline:
9.3.$(Rev:r).$(Date:ddMMyyyy)
And as of today we are not yet interested in converting to YAML.
So a power shell first step is requested:
For the versioning:
9.3 - Major fixed, does not change auto.
.20 Minor this is the tricky one.
The version increases if:
- 2 deliverers are made on the same day
- A new month has started.
And the third part of the versioning : date
So for example today it would be:
9.3.20.15072020
Tomorrow:
9.3.20.16072020
If tomorrow two publications would be made
9.3.20.16072020
9.3.21.16072020
And at the start of each new month the revision also increases so:
9.3.20.31072020
9.3.21.01082020
Hi,
This is easy except the tricky part - ".20 Minor this is the tricky one. ". There is one clear approach to do this by reading the previous build number but we can explore better solutions.
My approach would be to store major version (Ex - 9.3 above) as a variable in the pipeline. And then use power-shell to create the minor version and date. If your organisation uses a private marketplace repository, we can also create a custom extension for this so that this can be easily added into different pipeline.
I have over 3 years of experience working as a DevOps architect/engineer primarily using Azure DevOps. I am also a certified Azure architect with over 6 years in Azure and a total of over 12 years of experience in MS Tech Stack.
Regards,
RJ
€150 EUR in 2 days
5.0 (1 review)
1.5
1.5
4 freelancers are bidding on average €150 EUR for this job
I have 5 years of experience in DevOps operations and worked with GIT, JENKINS, AWS DEVOPS, PUPPET, ANSIBLE, CHEF , DOCKER, KUBERNETES.
I will support you in completing your projects.