speedtest-to-influxdb2/.gitlab-ci.yml

35 lines
917 B
YAML
Raw Normal View History

# Docker Hub version e.g. here https://github.com/oofnikj/nuttssh/blob/master/.gitlab-ci.yml
image: oofnik/docker:buildx
2021-05-16 11:52:02 +00:00
variables:
2021-05-19 15:59:57 +00:00
PLATFORM: linux/amd64,linux/arm64,linux/arm/v7
CI_IMAGE: $CI_REGISTRY_IMAGE
2021-05-16 11:52:02 +00:00
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --use
build-master:
2021-05-16 11:52:02 +00:00
stage: build
retry: 2
script:
- docker buildx build --push -t "$CI_IMAGE"
--platform "$PLATFORM" --cache-from "$CI_IMAGE"
--build-arg BUILDKIT_INLINE_CACHE=1 .
only:
- master
2021-05-16 11:52:02 +00:00
build-feature:
stage: build
retry: 2
script:
- docker buildx build --push -t "$CI_IMAGE:$CI_COMMIT_REF_SLUG"
--platform "$PLATFORM" --cache-from "$CI_IMAGE:$CI_COMMIT_REF_SLUG"
--build-arg BUILDKIT_INLINE_CACHE=1 .
except:
- master