Commit ac0ff48a authored by anton's avatar anton
Browse files

Remove Circle CI config, add GitLab CI

parent 4b90d9d8
aliases:
- &pull-submodules
name: Pull Submodules
command: |
ssh-keyscan gitlab.rlp.net >> ~/.ssh/known_hosts
git submodule init
git submodule update
- &install-dependencies
name: Install dependencies
command: |
apk add --update --no-cache nodejs nodejs-npm python make g++ pkgconfig libsecret-dev
npm config set unsafe-perm true
npm i -g npm
node --version
npm --version
npm i -g @quasar/cli
npm install
version: 2
jobs:
release_dev:
working_directory: /app
docker:
- image: docker:stable-git
steps:
- checkout
- run: *pull-submodules
- setup_remote_docker
- run: *install-dependencies
- run:
name: Release Dev Image
command: |
set +o pipefail
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
npm run lint
npm run docker-release-dev
release_production:
working_directory: /app
docker:
- image: docker:stable-git
steps:
- checkout
- run: *pull-submodules
- setup_remote_docker
- run: *install-dependencies
- run:
name: Release Production Image
command: |
set +o pipefail
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
docker build --no-cache -t motionbank/systems-frontend:${CIRCLE_BRANCH} .
docker push motionbank/systems-frontend:${CIRCLE_BRANCH}
release_legacy:
working_directory: /app
docker:
- image: docker:stable-git
steps:
- checkout
- run: *pull-submodules
- setup_remote_docker
- run: *install-dependencies
- run:
name: Release Production Image
command: |
set +o pipefail
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
docker build --no-cache -t motionbank/systems-frontend:${CIRCLE_BRANCH} .
docker push motionbank/systems-frontend:${CIRCLE_BRANCH}
workflows:
version: 2
build_pipeline:
jobs:
- release_dev:
filters:
branches:
only: master
- release_production:
filters:
branches:
only: /^release_2_.+$/
- release_legacy:
filters:
branches:
only: /^release_1_.+$/
deploy-master:
only:
- master
stage: deploy
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"$DOCKER_HUB_AUTH\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination motionbank/api:latest
deploy-tag:
only:
- tags
stage: deploy
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"$DOCKER_HUB_AUTH\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination motionbank/api:$CI_COMMIT_TAG
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment