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
8 files
+ 54
139
Compare changes
  • Side-by-side
  • Inline
Files
8
variables:
DOCKER_TLS_CERTDIR: "/certs"
.build: &build
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
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"]
- docker build --build-arg GITLAB_USER=$GO_MODULES_USER --build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN -f Dockerfile_testing -t registry.code.fbi.h-da.de/cocsn/gosdn:testing_${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"
stage: build
allow_failure: false
needs: []
tags:
- dind
- shell-builder
script:
- docker pull registry.code.fbi.h-da.de/cocsn/gosdn:ci_build_cache
- docker build --target builder --build-arg GITLAB_USER=$GO_MODULES_USER --build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN --build-arg BUILDARGS=$BUILDARGS --cache-from registry.code.fbi.h-da.de/cocsn/gosdn:ci_build_cache -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 $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