Files
nginx-php-fpm/.gitlab-ci.yml
2020-08-17 19:35:20 +01:00

45 lines
1.0 KiB
YAML

services:
- name: docker:dind
stages:
- buildx
- build_latest
buildx:
image: docker:19.03-git
stage: buildx
variables:
GIT_STRATEGY: none
artifacts:
paths:
- buildx
expire_in: 1 hour
services:
- docker:19.03-dind
script:
- export DOCKER_BUILDKIT=1
- git clone git://github.com/docker/buildx ./docker-buildx
- docker build --platform=local -o . ./docker-buildx
only:
- master
build_latest:
stage: build_latest
image: docker:19.03-git
allow_failure: false
services:
- name: docker:19.03-dind
command: ["--experimental"]
before_script:
- echo Setting up buildx...
- mkdir -p ~/.docker/cli-plugins
- mv buildx ~/.docker/cli-plugins/docker-buildx
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- echo Logging in to $CI_REGISTRY...
script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
- apk add --update curl && apk add --update jq && rm -rf /var/cache/apk/*
- "sh build.sh"
only:
- master