Browse Source

Cleanup pipeline part naming

pull/10/head
Drew Short 5 years ago
parent
commit
63d67034a0
  1. 67
      pipeline.yml

67
pipeline.yml

@ -1,6 +1,6 @@
---
resources:
- name: baphomet-js-git-develop
- name: git-develop
type: git
icon: git
source:
@ -14,7 +14,7 @@ resources:
- README.md
- CONTRIBUTING.md
- LICENSE.md
- name: baphomet-js-git
- name: git-master
type: git
icon: git
source:
@ -28,12 +28,11 @@ resources:
- README.md
- CONTRIBUTING.md
- LICENSE.md
jobs:
# Development Pipeline
- name: test-develop
plan:
- get: baphomet-js-git-develop
- get: git-develop
trigger: true
- task: run-tests
config:
@ -42,7 +41,7 @@ jobs:
type: registry-image
source: { repository: node, tag: "12.14-stretch" }
inputs:
- name: baphomet-js-git-develop
- name: git-develop
run:
path: /bin/sh
args:
@ -50,12 +49,12 @@ jobs:
- |
echo "Node Version: $(node --version)"
echo "NPM Version: $(npm --version)"
cd baphomet-js-git-develop
cd git-develop
npm install
npm test
- name: deploy-develop
plan:
- get: baphomet-js-git-develop
- get: git-develop
passed: [test-develop]
trigger: true
- task: capture-version
@ -65,7 +64,7 @@ jobs:
type: registry-image
source: { repository: bitnami/git, tag: "2-debian-9" }
inputs:
- name: baphomet-js-git-develop
- name: git-develop
outputs:
- name: version
run:
@ -73,7 +72,7 @@ jobs:
args:
- -c
- |
cd baphomet-js-git
cd git-develop
chmod +x ././scripts/get_*.sh
echo $(./scripts/get_build.sh) > ../version/build.info
echo $(./scripts/get_version.sh) > ../version/version.info
@ -82,7 +81,7 @@ jobs:
# Release Pipeline
- name: test-release
plan:
- get: baphomet-js-git
- get: git-master
trigger: true
- task: run-tests
config:
@ -91,7 +90,7 @@ jobs:
type: registry-image
source: { repository: node, tag: "12.14-stretch" }
inputs:
- name: baphomet-js-git
- name: git-master
run:
path: /bin/sh
args:
@ -99,12 +98,12 @@ jobs:
- |
echo "Node Version: $(node --version)"
echo "NPM Version: $(npm --version)"
cd baphomet-js-git
cd git-master
npm install
npm test
- name: package-release
plan:
- get: baphomet-js-git
- get: git-master
passed: [test-release]
trigger: true
- task: capture-version
@ -114,20 +113,20 @@ jobs:
type: registry-image
source: { repository: bitnami/git, tag: "2-debian-9" }
inputs:
- name: baphomet-js-git
- name: git-master
outputs:
- name: baphomet-js-version
- name: version
run:
path: /bin/sh
args:
- -c
- |
cd baphomet-js-git
cd git-master
chmod +x ././scripts/get_*.sh
echo $(./scripts/get_build.sh) > ../baphomet-js-version/build.info
echo $(./scripts/get_version.sh) > ../baphomet-js-version/version.info
echo $(./scripts/get_tag.sh) > ../baphomet-js-version/tag.info
cat ../baphomet-js-version/build.info
echo $(./scripts/get_build.sh) > ../version/build.info
echo $(./scripts/get_version.sh) > ../version/version.info
echo $(./scripts/get_tag.sh) > ../version/tag.info
cat ../version/build.info
- task: package
config:
platform: linux
@ -135,8 +134,8 @@ jobs:
type: registry-image
source: { repository: debian, tag: "stretch-slim" }
inputs:
- name: baphomet-js-git
- name: baphomet-js-version
- name: git-master
- name: version
outputs:
- name: package
run:
@ -146,16 +145,16 @@ jobs:
- |
mkdir tmp
cd tmp
cp ../baphomet-js-version/build.info .
cp ../baphomet-js-version/version.info .
cp ../baphomet-js-version/tag.info .
cp ../baphomet-js-git/package*.json .
cp ../baphomet-js-git/index.js .
cp -r ../baphomet-js-git/assets .
cp -r ../baphomet-js-git/bot .
cp -r ../baphomet-js-git/data .
cp ../baphomet-js-git/entrypoint.js .
cp ../baphomet-js-git/Dockerfile .
cp ../baphomet-js-git/README.md .
cp ../baphomet-js-git/LICENSE.md .
cp ../version/build.info .
cp ../version/version.info .
cp ../version/tag.info .
cp ../git-master/package*.json .
cp ../git-master/index.js .
cp -r ../git-master/assets .
cp -r ../git-master/bot .
cp -r ../git-master/data .
cp ../git-master/entrypoint.js .
cp ../git-master/Dockerfile .
cp ../git-master/README.md .
cp ../git-master/LICENSE.md .
tar -zcvf ../package/baphomet-js-$(cat tag.info).tgz ./*
Loading…
Cancel
Save