Updated GitLab CI

This commit is contained in:
Héctor Molinero Fernández 2019-12-12 13:04:47 +01:00
parent 7820a0bd4e
commit 9c32e94ca5

View File

@ -1,38 +1,38 @@
stages: stages:
- "build:images" - 'build:images'
- "push:images" - 'push:images'


variables: variables:
DOCKER_HOST: "tcp://dockerd:2376" DOCKER_HOST: 'tcp://dockerd:2376'
DOCKER_TLS_SAN: "DNS:dockerd" DOCKER_TLS_SAN: 'DNS:dockerd'
DOCKER_TLS_CERTDIR: "/certs" DOCKER_TLS_CERTDIR: '/certs'
DOCKER_DRIVER: "overlay2" DOCKER_DRIVER: 'overlay2'


default: default:
image: "docker.io/docker:stable" image: 'docker.io/docker:stable'
services: services:
- name: "docker.io/docker:dind" - name: 'docker.io/docker:dind'
alias: "dockerd" alias: 'dockerd'


build:images: build:images:
stage: "build:images" stage: 'build:images'
before_script: before_script:
- "apk add --no-cache coreutils git make xz" - 'apk add --no-cache coreutils git make xz'
script: script:
- "make build-image save-image" - 'make build-image save-image'
artifacts: artifacts:
expire_in: "1 day" expire_in: '1 day'
paths: paths:
- "./dist/" - './dist/'


push:images: push:images:
stage: "push:images" stage: 'push:images'
dependencies: dependencies:
- "build:images" - 'build:images'
only: only:
- "/^v[0-9]+$/" - '/^v[0-9]+$/'
before_script: before_script:
- "apk add --no-cache coreutils git make xz" - 'apk add --no-cache coreutils git make xz'
- "docker login -u \"${CI_REGISTRY_USER:?}\" -p \"${CI_REGISTRY_PASSWORD:?}\" \"${CI_REGISTRY:?}\"" - 'docker login -u "${CI_REGISTRY_USER:?}" -p "${CI_REGISTRY_PASSWORD:?}" "${CI_REGISTRY:?}"'
script: script:
- "make load-image push-image" - 'make load-image push-image'