Refactor bamboo spec
This commit is contained in:
@@ -8,24 +8,14 @@ plan:
|
||||
stages:
|
||||
- Stage 1:
|
||||
jobs:
|
||||
- Set build timestamp
|
||||
- Inject Bamboo variables
|
||||
- Run docker build
|
||||
- Default Job
|
||||
|
||||
Set build timestamp:
|
||||
Default Job:
|
||||
tasks:
|
||||
- script:
|
||||
- echo version=$(date -d "${bamboo.buildTimeStamp}" +"%Y%m%d-%H%M%S") > version.txt
|
||||
|
||||
Inject Bamboo variables:
|
||||
tasks:
|
||||
- inject-variables:
|
||||
file: version.txt
|
||||
scope: LOCAL
|
||||
namespace: inject
|
||||
|
||||
Run docker build:
|
||||
tasks:
|
||||
- script: |
|
||||
docker build . -t helloworld-test:${bamboo.inject.version} \
|
||||
--label=vcs_url="${bamboo.planRepository.repositoryUrl}" \
|
||||
|
||||
Reference in New Issue
Block a user