fediverse.space/.gitlab-ci.yml

87 wiersze
1.6 KiB
YAML

include:
template: Dependency-Scanning.gitlab-ci.yml
dependency_scanning:
except:
- develop
test-frontend:
image: node:lts-alpine
stage: test
before_script:
- cd frontend
stage: test
script:
- yarn install
- yarn lint
cache:
paths:
- frontend/node_modules/
- frontend/.yarn
only:
changes:
- frontend/*
backend-sobelow:
stage: test
image: elixir:1.9
only:
changes:
- backend/*
except:
- develop
- master
before_script:
- cd backend
script:
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix deps.compile
- mix sobelow --config
cache:
paths:
- backend/deps/
- backend/_build/
deploy-backend-develop:
stage: deploy
environment:
name: develop
url: https://phoenix.api-develop.fediverse.space
image: ilyasemenov/gitlab-ci-git-push
only:
- develop
script:
- git-push dokku@api-develop.fediverse.space:phoenix develop
deploy-gephi-develop:
stage: deploy
image: ilyasemenov/gitlab-ci-git-push
environment:
name: develop
only:
- develop
script:
- git-push dokku@api-develop.fediverse.space:gephi develop
deploy-backend-production:
stage: deploy
environment:
name: production
url: https://phoenix.api.fediverse.space
image: ilyasemenov/gitlab-ci-git-push
only:
- master
script:
- git-push dokku@api.fediverse.space:phoenix master
deploy-gephi-production:
stage: deploy
image: ilyasemenov/gitlab-ci-git-push
environment:
name: production
only:
- master
script:
- git-push dokku@api.fediverse.space:gephi master