storage-upload/.circleci/config.yml

37 lines
975 B
YAML
Raw Normal View History

2017-12-09 21:51:18 +00:00
version: 2
jobs:
build:
docker:
- image: docker:latest
environment:
- di: "nfpis/storage-upload"
- dtag: "latest"
working_directory: ~/storage-upload
steps:
- run:
name: Update and install SSH & Git
command: apk update && apk upgrade && apk add --no-cache bash git openssh
- checkout
- setup_remote_docker
- run:
name: Build docker image
command: |
2017-12-09 22:00:37 +00:00
docker build -t nfp-test .
2017-12-09 21:51:18 +00:00
docker build --build-arg NODE=production -t ${di}:build_${CIRCLE_BUILD_NUM} -t ${di}:${CIRCLE_SHA1} -t ${di}:${dtag} .
2017-12-09 22:00:37 +00:00
- run:
name: Run tests
command: |
docker run nfp-test npm run test
2017-12-09 21:51:18 +00:00
- deploy:
name: Push to docker
command: |
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push ${di}
workflows:
version: 2
build_deploy:
jobs:
- build:
context: org-global