Deploying to AWS Elastic Beanstalk (or a PaaS provider that accepts versioning of artifacts) require something like the following:
deploy:
docker:
- image: circleci/python:2.7
steps:
- attach_workspace:
at: /tmp/workspace
- run: sudo pip install awscli
- run: aws s3 cp /tmp/workspace/myapp-0.0.1-SNAPSHOT.jar s3://my-bucket --region us-east-1
- run: aws elasticbeanstalk create-application-version --application-name myapp --version-label 0.0.1-SNAPSHOT --source-bundle S3Bucket="my-bucket",S3Key="myapp-0.0.1-SNAPSHOT.jar"
The question is, how can I pass the version information (namely 0.0.1-SNAPSHOT
in this instance) from one job to another? This information is embedded in the pom.xml
on the source code?
It does not appear there is a clean way to ask maven nicely for the project.version
variable