.gitlab-ci.yml 535 Bytes
Newer Older
codebabel's avatar
codebabel committed
1
image: docker:git # This is a Dummy Commit
codebabel's avatar
codebabel committed
2

Ravindranath Barathy's avatar
Ravindranath Barathy committed
3 4 5
services:
- docker:dind

codebabel's avatar
codebabel committed
6
variables:
codebabel's avatar
Updated  
codebabel committed
7 8
  DOCKER_HOST: tcp://docker:2375
  DOCKER_DRIVER: overlay2
codebabel's avatar
updated  
codebabel committed
9
  CONTAINER_IMAGE: registry.gitlab.com/codebabel/$CI_PROJECT_NAME #Workaround https://gitlab.com/gitlab-org/gitlab-ce/issues/23339
codebabel's avatar
codebabel committed
10

codebabel's avatar
codebabel committed
11
before_script:
codebabel's avatar
updated  
codebabel committed
12
  - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
codebabel's avatar
codebabel committed
13
stages:
codebabel's avatar
Updated  
codebabel committed
14
  - build and stage
codebabel's avatar
codebabel committed
15 16

job 1:
codebabel's avatar
Updated  
codebabel committed
17
  stage: build and stage
Ravindranath Barathy's avatar
Ravindranath Barathy committed
18
  script:
codebabel's avatar
Updated  
codebabel committed
19
   - docker build -t $CONTAINER_IMAGE:$CI_COMMIT_SHA .
codebabel's avatar
Updated  
codebabel committed
20
   - docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA