forked from cadence/Carbon
33 lines
841 B
YAML
33 lines
841 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: build
|
|
image: node:current-alpine3.12
|
|
commands:
|
|
- npm install -D
|
|
- npm run rebuild
|
|
#Todo make this into a separate container
|
|
- name: package
|
|
image: alpine
|
|
commands:
|
|
- apk update
|
|
- apk add zip git
|
|
- echo FILENAME=`date +%Y%m%d%H%m`-`git rev-parse --short HEAD`.zip >> environment
|
|
- source environment
|
|
- zip -r $FILENAME build
|
|
|
|
- name: b2
|
|
image: tianon/backblaze-b2:2
|
|
|
|
environment:
|
|
BUCKET: carbon-artifacts
|
|
B2_ACCOUNT_ID:
|
|
from_secret: b2_account_id
|
|
B2_APPLICATION_KEY:
|
|
from_secret: b2_application_key
|
|
commands:
|
|
- source environment
|
|
- b2 upload-file $BUCKET $FILENAME $FILENAME
|
|
- echo Build artifacts avaliable at `b2 make-friendly-url $BUCKET $FILENAME`
|