Skip to content
Snippets Groups Projects

Resolve "Improve pipeline speed"

Merged Ghost User requested to merge 126-improve-pipeline-speed into develop
Compare and Show latest version
6 files
+ 62
91
Compare changes
  • Side-by-side
  • Inline
Files
6
variables:
DOCKER_TLS_CERTDIR: "/certs"
build_testing:
before_script:
- echo "override global before script"
stage: build
allow_failure: false
needs: []
tags:
- shell-builder
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --build-arg GITLAB_USER=$GO_MODULES_USER --build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN -t registry.code.fbi.h-da.de/cocsn/gosdn:testing_2_${CI_PIPELINE_ID} .
- docker push registry.code.fbi.h-da.de/cocsn/gosdn:testing_${CI_PIPELINE_ID}
.build: &build
before_script:
- echo "override global before script"
image: docker:19.03.12
services:
- name: docker:19.03.12-dind
command: ["--registry-mirror", "http://141.100.70.170:6000", "--dns", "1.1.1.1"]
stage: build
allow_failure: false
needs: []
tags:
- dind
- shell-builder
script:
- docker build \
--cache-from registry.code.fbi.h-da.de/cocsn/gosdn:ci_build_cache
--target builder
--build-arg GITLAB_USER=$GO_MODULES_USER \
--build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN \
--build-arg BUILDARGS=$BUILDARGS \
-t registry.code.fbi.h-da.de/cocsn/gosdn:ci_build_cache .
- docker build \
--cache-from registry.code.fbi.h-da.de/cocsn/gosdn:ci_build_cache
--build-arg GITLAB_USER=$GO_MODULES_USER \
--build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN \
--build-arg BUILDARGS=$BUILDARGS \
-t $DOCKER_IMAGE_SHA .
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --build-arg GITLAB_USER=$GO_MODULES_USER --build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN --build-arg BUILDARGS=$BUILDARGS -t $DOCKER_IMAGE_SHA .
- docker push $DOCKER_IMAGE_SHA
- docker tag $DOCKER_IMAGE_SHA $TAG
- docker tag $DOCKER_IMAGE_SHA registry.code.fbi.h-da.de/cocsn/gosdn:${CI_PIPELINE_ID}
- docker push $TAG
- docker push registry.code.fbi.h-da.de/cocsn/gosdn:ci_build_cache
build:develop:
variables:
Loading