1- image : docker:20.10.11
1+ # image: docker:20.10.11
22
3- variables :
4- # When using dind service, you must instruct docker to talk with the
5- # daemon started inside of the service. The daemon is available with
6- # a network connection instead of the default /var/run/docker.sock socket.
7- #
8- # The 'docker' hostname is the alias of the service container as described at
9- # https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services
10- #
11- # If you're using GitLab Runner 12.7 or earlier with the Kubernetes executor and Kubernetes 1.6 or earlier,
12- # the variable must be set to tcp://localhost:2375 because of how the
13- # Kubernetes executor connects services to the job container
14- # DOCKER_HOST: tcp://localhost:2375
15- #
16- DOCKER_HOST : tcp://docker:2375
17- #
18- # This instructs Docker not to start over TLS.
19- DOCKER_TLS_CERTDIR : " "
20- #
21- # Checkout submodules recursively
22- GIT_SUBMODULE_STRATEGY : recursive
3+ # variables:
4+ # # When using dind service, you must instruct docker to talk with the
5+ # # daemon started inside of the service. The daemon is available with
6+ # # a network connection instead of the default /var/run/docker.sock socket.
7+ # #
8+ # # The 'docker' hostname is the alias of the service container as described at
9+ # # https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services
10+ # #
11+ # # If you're using GitLab Runner 12.7 or earlier with the Kubernetes executor and Kubernetes 1.6 or earlier,
12+ # # the variable must be set to tcp://localhost:2375 because of how the
13+ # # Kubernetes executor connects services to the job container
14+ # # DOCKER_HOST: tcp://localhost:2375
15+ # #
16+ # DOCKER_HOST: tcp://docker:2375
17+ # #
18+ # # This instructs Docker not to start over TLS.
19+ # DOCKER_TLS_CERTDIR: ""
20+ # #
21+ # # Checkout submodules recursively
22+ # GIT_SUBMODULE_STRATEGY: recursive
2323
24- services :
25- - docker:20.10.11-dind
24+ # services:
25+ # - docker:20.10.11-dind
2626
27- before_script :
28- - docker info
29- - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
27+ # before_script:
28+ # - docker info
29+ # - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
3030
31- build-latest :
32- stage : build
33- only :
34- - tags
35- script :
36- - docker pull $CI_REGISTRY_IMAGE:latest || true
37- - docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest .
38- - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
39- - docker push $CI_REGISTRY_IMAGE:latest
40-
41- # build-branches:
31+ # build-latest:
4232# stage: build
43- # except:
44- # - master
45- # - main
33+ # only:
34+ # - tags
4635# script:
47- # - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH || true
48- # - docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH .
36+ # - docker pull $CI_REGISTRY_IMAGE:latest || true
37+ # - docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest .
4938# - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
50- # - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH
39+ # - docker push $CI_REGISTRY_IMAGE:latest
40+
41+ # # build-branches:
42+ # # stage: build
43+ # # except:
44+ # # - master
45+ # # - main
46+ # # script:
47+ # # - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH || true
48+ # # - docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH .
49+ # # - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
50+ # # - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH
0 commit comments