Skip to content

Commit

Permalink
Revert "Remove gitlab-ci"
Browse files Browse the repository at this point in the history
This reverts commit d17b091.
  • Loading branch information
yangm97 committed Sep 14, 2018
1 parent 8be4323 commit fa5848c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
stages:
- lint
- build
# - test
- deploy

lint:
stage: lint
script:
- docker run --rm -v $(pwd):/data yangm97/luacheck

build:
stage: build
variables:
IMAGE: $CI_REGISTRY_IMAGE
TAG: $CI_COMMIT_REF_SLUG
before_script:
- apk add --no-cache py-pip
- pip install docker-compose
script:
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY
# - docker-compose build
- docker-compose -f docker-compose.webhooks.yml -f docker-compose.webhooks.override.yml build
- docker-compose push
only:
- staging
- production

deploy:
environment:
name: $CI_COMMIT_REF_SLUG
tags:
- manager
stage: deploy
variables:
IMAGE: $CI_REGISTRY_IMAGE
TAG: $CI_COMMIT_REF_SLUG
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
# - docker stack deploy --with-registry-auth $CI_COMMIT_REF_SLUG -c docker-compose.yml
- docker stack deploy --with-registry-auth $CI_COMMIT_REF_SLUG -c docker-compose.webhooks.yml
only:
- staging
- production

0 comments on commit fa5848c

Please sign in to comment.