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