use docker:dind for all builds, not this repos image
This commit is contained in:
116
.gitlab-ci.yml
116
.gitlab-ci.yml
@ -2,7 +2,7 @@ variables:
|
|||||||
CI_BUILD_IMAGE: "registry.gitlab.com/gdunstone/docker-buildx-qemu"
|
CI_BUILD_IMAGE: "registry.gitlab.com/gdunstone/docker-buildx-qemu"
|
||||||
|
|
||||||
.build:
|
.build:
|
||||||
image: $CI_BUILD_IMAGE
|
image: docker:dind
|
||||||
stage: build
|
stage: build
|
||||||
services:
|
services:
|
||||||
- name: docker:dind
|
- name: docker:dind
|
||||||
@ -26,70 +26,70 @@ variables:
|
|||||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
|
|
||||||
|
|
||||||
# build:buildx-master:
|
build:buildx-master:
|
||||||
# extends: .build
|
extends: .build
|
||||||
# only:
|
image: $CI_BUILD_IMAGE
|
||||||
# refs:
|
only:
|
||||||
# - master
|
refs:
|
||||||
# variables:
|
- master
|
||||||
# - $CI_BUILDX_ARCHS
|
variables:
|
||||||
# script:
|
- $CI_BUILDX_ARCHS
|
||||||
# # Use docker-container driver to allow useful features (push/multi-platform)
|
script:
|
||||||
# - update-binfmts --enable # Important: Ensures execution of other binary formats is enabled in the kernel
|
# Use docker-container driver to allow useful features (push/multi-platform)
|
||||||
# - docker buildx create --driver docker-container --use
|
- update-binfmts --enable # Important: Ensures execution of other binary formats is enabled in the kernel
|
||||||
# - docker buildx inspect --bootstrap
|
- docker buildx create --driver docker-container --use
|
||||||
# - docker buildx ls
|
- docker buildx inspect --bootstrap
|
||||||
# - docker buildx build --platform $CI_BUILDX_ARCHS --progress plain --pull -t "$CI_REGISTRY_IMAGE" --push .
|
- docker buildx ls
|
||||||
|
- docker buildx build --platform $CI_BUILDX_ARCHS --progress plain --pull -t "$CI_REGISTRY_IMAGE" --push .
|
||||||
|
|
||||||
# build:buildx:
|
build:buildx:
|
||||||
# extends: .build
|
extends: .build
|
||||||
# only:
|
image: $CI_BUILD_IMAGE
|
||||||
# variables:
|
only:
|
||||||
# - $CI_BUILDX_ARCHS
|
variables:
|
||||||
# except:
|
- $CI_BUILDX_ARCHS
|
||||||
# refs:
|
except:
|
||||||
# - master
|
refs:
|
||||||
# script:
|
- master
|
||||||
# - update-binfmts --enable # Important: Ensures execution of other binary formats is enabled in the kernel
|
script:
|
||||||
# - docker buildx create --driver docker-container --use
|
- update-binfmts --enable # Important: Ensures execution of other binary formats is enabled in the kernel
|
||||||
# - docker buildx inspect --bootstrap
|
- docker buildx create --driver docker-container --use
|
||||||
# - docker buildx ls
|
- docker buildx inspect --bootstrap
|
||||||
# - docker buildx build --platform $CI_BUILDX_ARCHS --progress plain --pull -t "$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG" --push .
|
- docker buildx ls
|
||||||
|
- docker buildx build --platform $CI_BUILDX_ARCHS --progress plain --pull -t "$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG" --push .
|
||||||
|
|
||||||
# # disable build:armv7 for now since it seems to have an issue with dind
|
# disable build:armv7 for now since it seems to have an issue with dind
|
||||||
# .build:arm:
|
.build:arm:
|
||||||
# image: docker:dind
|
extends: .build
|
||||||
# extends: .build
|
only:
|
||||||
# only:
|
variables:
|
||||||
# variables:
|
- $CI_BUILD_ARM
|
||||||
# - $CI_BUILD_ARM
|
except:
|
||||||
# except:
|
variables:
|
||||||
# variables:
|
- $CI_BUILDX_ARCHS
|
||||||
# - $CI_BUILDX_ARCHS
|
tags:
|
||||||
# tags:
|
- arm
|
||||||
# - arm
|
script:
|
||||||
# script:
|
- docker build -t "$CI_APPLICATION_REPOSITORY/arm:$CI_APPLICATION_TAG" .
|
||||||
# - docker build -t "$CI_APPLICATION_REPOSITORY/arm:$CI_APPLICATION_TAG" .
|
- docker push "$CI_APPLICATION_REPOSITORY/arm:$CI_APPLICATION_TAG"
|
||||||
# - docker push "$CI_APPLICATION_REPOSITORY/arm:$CI_APPLICATION_TAG"
|
|
||||||
|
|
||||||
# build:arm64:
|
build:arm64:
|
||||||
# extends: .build
|
extends: .build
|
||||||
# only:
|
only:
|
||||||
# variables:
|
variables:
|
||||||
# - $CI_BUILD_ARM64
|
- $CI_BUILD_ARM64
|
||||||
# except:
|
except:
|
||||||
# variables:
|
variables:
|
||||||
# - $CI_BUILDX_ARCHS
|
- $CI_BUILDX_ARCHS
|
||||||
# tags:
|
tags:
|
||||||
# - arm64
|
- arm64
|
||||||
|
|
||||||
# script:
|
script:
|
||||||
# - docker build -t "$CI_APPLICATION_REPOSITORY/arm64:$CI_APPLICATION_TAG" .
|
- docker build -t "$CI_APPLICATION_REPOSITORY/arm64:$CI_APPLICATION_TAG" .
|
||||||
# - docker push "$CI_APPLICATION_REPOSITORY/arm64:$CI_APPLICATION_TAG"
|
- docker push "$CI_APPLICATION_REPOSITORY/arm64:$CI_APPLICATION_TAG"
|
||||||
|
|
||||||
# builds this by default
|
# builds this by default
|
||||||
build:amd64:
|
build:amd64:
|
||||||
image: docker:dind
|
|
||||||
extends: .build
|
extends: .build
|
||||||
except:
|
except:
|
||||||
variables:
|
variables:
|
||||||
|
Reference in New Issue
Block a user