Adds pipeline image (#9606)
This commit is contained in:
17
.gitlab-ci/build.yml
Normal file
17
.gitlab-ci/build.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
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
|
||||
except: ['triggers', 'master']
|
@ -4,7 +4,7 @@
|
||||
tags: [c3.small.x86]
|
||||
only: [/^pr-.*$/]
|
||||
except: ['triggers']
|
||||
image: quay.io/kubespray/vagrant:$KUBESPRAY_VERSION
|
||||
image: $PIPELINE_IMAGE
|
||||
services: []
|
||||
stage: deploy-part1
|
||||
before_script:
|
||||
|
@ -10,7 +10,7 @@
|
||||
tags: [c3.small.x86]
|
||||
only: [/^pr-.*$/]
|
||||
except: ['triggers']
|
||||
image: quay.io/kubespray/vagrant:$KUBESPRAY_VERSION
|
||||
image: $PIPELINE_IMAGE
|
||||
services: []
|
||||
before_script:
|
||||
- apt-get update && apt-get install -y python3-pip
|
||||
|
Reference in New Issue
Block a user