Add bamboo specs
This commit is contained in:
36
bamboo-specs/bamboo.yml
Normal file
36
bamboo-specs/bamboo.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
version: 2
|
||||||
|
plan:
|
||||||
|
project-key: HEL
|
||||||
|
key:
|
||||||
|
name: helloworld-nodejs-build
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- Stage 1:
|
||||||
|
jobs:
|
||||||
|
- Set build timestamp
|
||||||
|
- Inject Bamboo variables
|
||||||
|
- Run docker build
|
||||||
|
|
||||||
|
Set build timestamp:
|
||||||
|
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
|
||||||
|
namepace: inject
|
||||||
|
|
||||||
|
Run docker build:
|
||||||
|
tasks:
|
||||||
|
- script: |
|
||||||
|
docker build . -t helloworld-test:${bamboo.inject.version} \
|
||||||
|
--label=vcs_url="${bamboo.planRepository.repositoryUrl}" \
|
||||||
|
--label=vcs_branch="${bamboo.planRepository.branch}" \
|
||||||
|
--label=vcs_revision="${bamboo.planRepository.revision}" \
|
||||||
|
--label=build_timestamp="${bamboo.buildTimeStamp}" \
|
||||||
|
--label=build_plan_name="${bamboo.buildPlanName}" \
|
||||||
|
--label=build_number="${bamboo.buildNumber}"
|
||||||
Reference in New Issue
Block a user