kubespray/.gitlab-ci/build.yml

17 lines
619 B
YAML
Raw Normal View History

2023-01-09 10:29:27 +08:00
---
pipeline image:
stage: build
image: docker:20.10.22-cli
variables:
DOCKER_TLS_CERTDIR: ""
services:
- name: docker:20.10.22-dind
# See https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27300 for why this is required
command: ["--tls=false"]
before_script:
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
script:
# DOCKER_HOST is overwritten if we set it as a GitLab variable
- DOCKER_HOST=tcp://docker:2375; docker build --network host --file pipeline.Dockerfile --tag $PIPELINE_IMAGE .
- docker push $PIPELINE_IMAGE