mirror of
https://gitlab.com/arm-research/smarter/smarter-device-manager.git
synced 2024-11-22 02:33:34 +00:00
Merge branch 'simplify-ci' into 'master'
Simplify CI See merge request arm-research/smarter/smarter-device-manager!5
This commit is contained in:
commit
7e976ae90c
@ -1,57 +1,6 @@
|
|||||||
|
include:
|
||||||
|
- project: 'ericvh/gitlab-ci-arm-template'
|
||||||
|
file: '/.gitlab-ci.yml'
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
CI_BUILD_IMAGE: "registry.gitlab.com/ericvh/docker-buildx-qemu"
|
|
||||||
CI_BUILDX_ARCHS: "linux/amd64,linux/arm64,linux/arm"
|
CI_BUILDX_ARCHS: "linux/amd64,linux/arm64,linux/arm"
|
||||||
|
|
||||||
.build:
|
|
||||||
image: $CI_BUILD_IMAGE
|
|
||||||
stage: build
|
|
||||||
services:
|
|
||||||
- name: docker:dind
|
|
||||||
entrypoint: ["env", "-u", "DOCKER_HOST"]
|
|
||||||
command: ["dockerd-entrypoint.sh"]
|
|
||||||
variables:
|
|
||||||
DOCKER_HOST: tcp://docker:2375/
|
|
||||||
DOCKER_DRIVER: overlay2
|
|
||||||
# See https://github.com/docker-library/docker/pull/166
|
|
||||||
DOCKER_TLS_CERTDIR: ""
|
|
||||||
retry: 2
|
|
||||||
before_script:
|
|
||||||
- |
|
|
||||||
if [[ -z "$CI_COMMIT_TAG" ]]; then
|
|
||||||
export CI_APPLICATION_REPOSITORY=${CI_APPLICATION_REPOSITORY:-$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG}
|
|
||||||
export CI_APPLICATION_TAG=${CI_APPLICATION_TAG:-$CI_COMMIT_SHA}
|
|
||||||
else
|
|
||||||
export CI_APPLICATION_REPOSITORY=${CI_APPLICATION_REPOSITORY:-$CI_REGISTRY_IMAGE}
|
|
||||||
export CI_APPLICATION_TAG=${CI_APPLICATION_TAG:-$CI_COMMIT_TAG}
|
|
||||||
fi
|
|
||||||
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
|
|
||||||
|
|
||||||
build:buildx-master:
|
|
||||||
extends: .build
|
|
||||||
only:
|
|
||||||
refs:
|
|
||||||
- master
|
|
||||||
variables:
|
|
||||||
- $CI_BUILDX_ARCHS
|
|
||||||
script:
|
|
||||||
# Use docker-container driver to allow useful features (push/multi-platform)
|
|
||||||
- update-binfmts --enable # Important: Ensures execution of other binary formats is enabled in the kernel
|
|
||||||
- docker buildx create --driver docker-container --use
|
|
||||||
- docker buildx inspect --bootstrap
|
|
||||||
- docker buildx ls
|
|
||||||
- docker buildx build --platform $CI_BUILDX_ARCHS --progress plain --pull -t "$CI_REGISTRY_IMAGE" --push .
|
|
||||||
|
|
||||||
build:buildx:
|
|
||||||
extends: .build
|
|
||||||
only:
|
|
||||||
variables:
|
|
||||||
- $CI_BUILDX_ARCHS
|
|
||||||
except:
|
|
||||||
refs:
|
|
||||||
- master
|
|
||||||
script:
|
|
||||||
- update-binfmts --enable # Important: Ensures execution of other binary formats is enabled in the kernel
|
|
||||||
- docker buildx create --driver docker-container --use
|
|
||||||
- docker buildx inspect --bootstrap
|
|
||||||
- docker buildx ls
|
|
||||||
- docker buildx build --platform $CI_BUILDX_ARCHS --progress plain --pull -t "$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG" --push .
|
|
Loading…
Reference in New Issue
Block a user