37 lines
895 B
YAML
37 lines
895 B
YAML
version: 2
|
|
jobs:
|
|
build_deploy:
|
|
docker:
|
|
- image: circleci/node:latest
|
|
environment:
|
|
- di: "nfpis/storage-upload"
|
|
- dtag: "latest"
|
|
working_directory: ~/storage-upload
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Install dependencies
|
|
command: |
|
|
npm install
|
|
npm list --all
|
|
- run:
|
|
name: Run tests
|
|
command: |
|
|
npm run test:linux
|
|
- setup_remote_docker
|
|
- run:
|
|
name: Build docker image
|
|
command: |
|
|
docker build -t ${di}:build_${CIRCLE_BUILD_NUM} -t ${di}:${CIRCLE_SHA1} -t ${di}:${dtag} .
|
|
- deploy:
|
|
name: Push to docker
|
|
command: |
|
|
docker login -u $DOCKER_USER -p $DOCKER_PASS
|
|
docker push ${di}
|
|
|
|
workflows:
|
|
version: 2
|
|
build_deploy:
|
|
jobs:
|
|
- build_deploy:
|
|
context: org-global
|