Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DBRepo
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FAIR Data Austria DB Repository
DBRepo
Commits
db9197ad
Verified
Commit
db9197ad
authored
3 months ago
by
Martin Weise
Browse files
Options
Downloads
Patches
Plain Diff
WIP
Signed-off-by:
Martin Weise
<
martin.weise@tuwien.ac.at
>
parent
2162ca5d
No related branches found
No related tags found
1 merge request
!400
Need assets path
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+2
-1
2 additions, 1 deletion
.gitlab-ci.yml
.gitlab/check-supported-images.sh
+20
-0
20 additions, 0 deletions
.gitlab/check-supported-images.sh
.gitlab/remove-unsupported-images.sh
+23
-21
23 additions, 21 deletions
.gitlab/remove-unsupported-images.sh
with
45 additions
and
22 deletions
.gitlab-ci.yml
+
2
−
1
View file @
db9197ad
...
@@ -13,7 +13,8 @@ variables:
...
@@ -13,7 +13,8 @@ variables:
DOC_VERSION
:
"
1.8"
DOC_VERSION
:
"
1.8"
APP_VERSION
:
"
1.8.0"
APP_VERSION
:
"
1.8.0"
CHART_VERSION
:
"
1.8.0"
CHART_VERSION
:
"
1.8.0"
SUPPORTED_VERSIONS
:
"
[
\"
1.7.0
\"
,
\"
1.7.1
\"
,
\"
1.7.2
\"
,
\"
1.8.0
\"
]"
SUPPORTED_VERSIONS
:
"
1.7.3,
1.8.0"
MAINTAINED_SERVICES
:
"
analyse-service,
auth-service-init,
dashboard-service,
dashboard-service-init,
data-service,
metadata-service,
search-db,
search-service,
search-service-init,
storage-service-init,
ui"
CACHE_FALLBACK_KEY
:
"
${CI_DEFAULT_BRANCH}"
CACHE_FALLBACK_KEY
:
"
${CI_DEFAULT_BRANCH}"
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
# 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.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
...
...
This diff is collapsed.
Click to expand it.
.gitlab/check-supported-images.sh
0 → 100755
+
20
−
0
View file @
db9197ad
#!/bin/bash
echo
"Starting registry check ..."
VERSIONS
=(
${
SUPPORTED_VERSIONS
//,/
}
)
SERVICES
=(
${
MAINTAINED_SERVICES
//,/
}
)
for
SERVICE
in
"
${
SERVICES
[@]
}
"
;
do
TAGS
=
$(
regctl tag
ls
"
${
CI_REGISTRY2_URL
}
/
${
SERVICE
}
"
)
for
VERSION
in
"
${
VERSIONS
[@]
}
"
;
do
if
[[
"
$VERSION
"
==
"
$APP_VERSION
"
]]
;
then
continue
fi
if
[[
!
"
${
TAGS
[*]
}
"
=
~
$VERSION
]]
;
then
>
&2
echo
"[ERROR] Failed to find image:
${
CI_REGISTRY2_URL
}
/
${
SERVICE
}
:
${
VERSION
}
"
exit
1
fi
echo
"[DEBUG] Found image:
${
CI_REGISTRY2_URL
}
/
${
SERVICE
}
:
${
VERSION
}
"
done
echo
"[INFO] Finished successfully."
done
This diff is collapsed.
Click to expand it.
.gitlab/remove-unsupported-images.sh
+
23
−
21
View file @
db9197ad
#!/bin/bash
#!/bin/bash
declare
-A
services
services[0]
=
analyse-service
services[1]
=
auth-service-init
services[2]
=
dashboard-service
services[3]
=
data-service
services[4]
=
metadata-service
services[5]
=
search-db
services[6]
=
search-service
services[7]
=
search-service-init
services[8]
=
storage-service-init
services[9]
=
ui
echo
"Starting registry housekeeping ..."
echo
"Starting registry housekeeping ..."
for
key
in
"
${
!services[@]
}
"
;
do
SUPPORTED_VERSIONS
=
"1.7.3, 1.8.0"
echo
"Checking
${
CI_REGISTRY2_URL
}
/
${
services
[
$key
]
}
tags ..."
MAINTAINED_SERVICES
=
"analyse-service, auth-service-init, dashboard-service, dashboard-service-init, data-service, metadata-service, search-db, search-service, search-service-init, storage-service-init, ui"
TAGS
=
$(
regctl tag
ls
${
CI_REGISTRY2_URL
}
/
${
services
[
$key
]
}
)
VERSIONS
=(
${
SUPPORTED_VERSIONS
//,/
}
)
for
tag
in
$TAGS
;
do
SERVICES
=(
${
MAINTAINED_SERVICES
//,/
}
)
res
=
$(
echo
"
${
SUPPORTED_VERSIONS
}
"
|
grep
"
$tag
"
)
if
[[
-z
$res
]]
;
then
for
SERVICE
in
"
${
SERVICES
[@]
}
"
;
do
regctl tag
rm
${
CI_REGISTRY2_URL
}
/
${
services
[
$key
]
}
:
$tag
TAGS
=
$(
regctl tag
ls
"registry.datalab.tuwien.ac.at/dbrepo/
${
SERVICE
}
"
)
echo
"Deleted unsupported tag
${
CI_REGISTRY2_URL
}
/
${
services
[
$key
]
}
:
$tag
"
TAGS
=(
${
TAGS
//\n/
}
)
for
TAG
in
"
${
TAGS
[@]
}
"
;
do
if
[[
!
"
${
VERSIONS
[*]
}
"
=
~
$TAG
]]
;
then
echo
"===>
${
TAG
}
"
fi
fi
done
done
done
done
#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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment