Baphomet is the dedicated bot for nulloctet matrix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

160 lines
4.5 KiB

---
resources:
- name: git-develop
type: git
icon: git
source:
uri: ssh://git@git.nulloctet.com:8437/warricksothr/baphomet-js.git
private_key: |
((pull_key))
branch: develop
ignore_paths:
- pipeline.yml
- scripts/upload_pipeline.sh
- README.md
- CONTRIBUTING.md
- LICENSE.md
- name: git-master
type: git
icon: git
source:
uri: ssh://git@git.nulloctet.com:8437/warricksothr/baphomet-js.git
private_key: |
((pull_key))
branch: master
ignore_paths:
- pipeline.yml
- scripts/upload_pipeline.sh
- README.md
- CONTRIBUTING.md
- LICENSE.md
jobs:
# Development Pipeline
- name: test-develop
plan:
- get: git-develop
trigger: true
- task: run-tests
config:
platform: linux
image_resource:
type: registry-image
source: { repository: node, tag: "12.14-stretch" }
inputs:
- name: git-develop
run:
path: /bin/sh
args:
- -c
- |
echo "Node Version: $(node --version)"
echo "NPM Version: $(npm --version)"
cd git-develop
npm install
npm test
- name: deploy-develop
plan:
- get: git-develop
passed: [test-develop]
trigger: true
- task: capture-version
config:
platform: linux
image_resource:
type: registry-image
source: { repository: bitnami/git, tag: "2-debian-9" }
inputs:
- name: git-develop
outputs:
- name: version
run:
path: /bin/sh
args:
- -c
- |
cd git-develop
chmod +x ././scripts/get_*.sh
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
# Release Pipeline
- name: test-release
plan:
- get: git-master
trigger: true
- task: run-tests
config:
platform: linux
image_resource:
type: registry-image
source: { repository: node, tag: "12.14-stretch" }
inputs:
- name: git-master
run:
path: /bin/sh
args:
- -c
- |
echo "Node Version: $(node --version)"
echo "NPM Version: $(npm --version)"
cd git-master
npm install
npm test
- name: package-release
plan:
- get: git-master
passed: [test-release]
trigger: true
- task: capture-version
config:
platform: linux
image_resource:
type: registry-image
source: { repository: bitnami/git, tag: "2-debian-9" }
inputs:
- name: git-master
outputs:
- name: version
run:
path: /bin/sh
args:
- -c
- |
cd git-master
chmod +x ././scripts/get_*.sh
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
image_resource:
type: registry-image
source: { repository: debian, tag: "stretch-slim" }
inputs:
- name: git-master
- name: version
outputs:
- name: package
run:
path: /bin/sh
args:
- -c
- |
mkdir tmp
cd tmp
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 ./*