Skip to content
Snippets Groups Projects
Verified Commit 5971a424 authored by Martin Weise's avatar Martin Weise
Browse files
parent 787a3b5b
Branches
Tags
1 merge request!387Wrong model
......@@ -13,6 +13,7 @@ variables:
DOC_VERSION: "1.7"
APP_VERSION: "1.7.1"
CHART_VERSION: "1.7.1"
SUPPORTED_VERSIONS: "[\"1.7.0\",\"1.7.1\"]"
CACHE_FALLBACK_KEY: "${CI_DEFAULT_BRANCH}"
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
......@@ -43,6 +44,7 @@ stages:
- build
- test
- docs
- clean
- release
- verify
- scan
......@@ -445,10 +447,28 @@ test-ui:
- "sleep 30"
- "ENDPOINT=http://localhost:3000 bash ./dbrepo-ui/tests/test_heap.sh"
clean-images:
stage: clean
image: docker:${DOCKER_VERSION}-dind
only:
refs:
- dev
- /^release-.*/
before_script:
- "docker logout ${CI_REGISTRY_URL}"
- "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}"
- "docker logout ${CI_REGISTRY2_URL}"
- "echo ${CI_REGISTRY2_PASSWORD} | docker login --username ${CI_REGISTRY2_USER} --password-stdin ${CI_REGISTRY2_URL}"
- "ifconfig eth0 mtu 1450 up"
- "apk add --no-cache curl bash jq regclient"
script:
- bash ./.gitlab/remove-unsupported-images.sh
release-images:
stage: release
image: docker:${DOCKER_VERSION}-dind
dependencies:
- clean-images
- test-analyse-service
- test-auth-service-init
- test-data-service
......@@ -616,4 +636,4 @@ scan-sonarqube:
policy: pull
key: "${CI_COMMIT_SHORT_SHA}"
paths:
- sonar-scanner/
\ No newline at end of file
- sonar-scanner/
#!/bin/bash
declare -A services
services[0]=analyse-service
services[1]=auth-service-init
services[2]=dashboard-service
services[3]=data-service
services[4]=search-db
services[5]=search-service
services[6]=search-service-init
services[7]=ui
echo "Starting registry housekeeping ..."
for key in "${!services[@]}"; do
echo "Checking ${CI_REGISTRY2_URL}/${services[$key]} tags ..."
TAGS=$(regctl tag ls ${CI_REGISTRY2_URL}/${services[$key]})
for tag in $TAGS; do
res=$(echo "${SUPPORTED_VERSIONS}" | grep "$tag")
if [[ -z $res ]]; then
regctl tag rm ${CI_REGISTRY2_URL}/${services[$key]}:$tag
echo "Deleted unsupported tag ${CI_REGISTRY2_URL}/${services[$key]}:$tag"
fi
done
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment