Skip to content

Commit

Permalink
ci: Add .gitlab-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nkprince007 committed May 23, 2018
1 parent 86f548e commit 4e19c99
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
image: docker:latest

services:
- docker:dind

before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY

build-master:
stage: build
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- master

build:
stage: build
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- master

0 comments on commit 4e19c99

Please sign in to comment.