gitlab-ci: remove container cleanup stages
These stages were not properly implemented and don't seem to work. Drop them. Note that we do want that our cached containers get collected eventually. As these are just caches for performance reasons, that could be done with little downsides (we can just regenerate the containers when we need them). However, that's not done by our gitlab-ci stages. Instead, it should be done on a project level. It's not clear whether that is actually done, but if there is a need (because of the resources that this wastes), then we should do that (on freedesktop.org's gitlab instance).
This commit is contained in:
309
.gitlab-ci.yml
309
.gitlab-ci.yml
@@ -46,7 +46,6 @@ stages:
|
||||
- tier3
|
||||
- deploy
|
||||
- triage
|
||||
- container_clean
|
||||
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: NetworkManager/NetworkManager
|
||||
@@ -57,11 +56,11 @@ variables:
|
||||
#
|
||||
# This is done by running `ci-fairy generate-template` and possibly bumping
|
||||
# ".default_tag".
|
||||
ALPINE_TAG: 'tag-20ccfc6f0a87'
|
||||
CENTOS_TAG: 'tag-cdc72bd04206'
|
||||
DEBIAN_TAG: 'tag-bc68fd50d074'
|
||||
FEDORA_TAG: 'tag-cdc72bd04206'
|
||||
UBUNTU_TAG: 'tag-bc68fd50d074'
|
||||
ALPINE_TAG: 'tag-372c77b49d01'
|
||||
CENTOS_TAG: 'tag-ab77da6a62d5'
|
||||
DEBIAN_TAG: 'tag-e7368fd611d6'
|
||||
FEDORA_TAG: 'tag-ab77da6a62d5'
|
||||
UBUNTU_TAG: 'tag-e7368fd611d6'
|
||||
|
||||
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
|
||||
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
||||
@@ -90,7 +89,7 @@ variables:
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# containers stage #
|
||||
# prep stage #
|
||||
# #
|
||||
#################################################################
|
||||
|
||||
@@ -406,294 +405,7 @@ tier2:alpine:latest@prep:
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# container clean stage #
|
||||
# run during the clean stage #
|
||||
# #
|
||||
#################################################################
|
||||
|
||||
#
|
||||
# This stage will look for the container images we currently have in
|
||||
# the registry and will remove any that are not tagged with the provided
|
||||
# $container_image:$tag
|
||||
#
|
||||
# This job only runs for a scheduled pipeline.
|
||||
#
|
||||
# Go to your Profile, Settings, Access Tokens
|
||||
# Create a personal token with 'api' scope, copy the value.
|
||||
# Go to CI/CD, Schedules, schedule a monthly job.
|
||||
# Define a variable of type File named AUTHFILE. Content is that token
|
||||
# value.
|
||||
.container-clean:
|
||||
stage: container_clean
|
||||
image: golang:alpine
|
||||
before_script:
|
||||
- apk add python3 py-pip git
|
||||
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
|
||||
script:
|
||||
- ci-fairy -v --authfile $AUTHFILE delete-image
|
||||
--repository $FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION
|
||||
--exclude-tag $FDO_DISTRIBUTION_TAG
|
||||
dependencies: []
|
||||
allow_failure: true
|
||||
only:
|
||||
- schedules
|
||||
|
||||
fedora:37@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '37'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:36@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '36'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:38@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '38'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:30@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '30'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:31@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '31'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:32@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '32'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:33@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '33'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:34@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '34'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:35@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '35'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
ubuntu:18.04@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '18.04'
|
||||
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
|
||||
|
||||
ubuntu:20.04@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '20.04'
|
||||
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
|
||||
|
||||
ubuntu:22.04@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '22.04'
|
||||
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
|
||||
|
||||
ubuntu:devel@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: 'devel'
|
||||
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
|
||||
|
||||
ubuntu:rolling@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: 'rolling'
|
||||
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
|
||||
|
||||
debian:10@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '10'
|
||||
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
|
||||
|
||||
debian:11@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '11'
|
||||
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
|
||||
|
||||
debian:sid@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: 'sid'
|
||||
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
|
||||
|
||||
debian:9@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '9'
|
||||
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
|
||||
|
||||
debian:testing@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: 'testing'
|
||||
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
|
||||
|
||||
centos:7.5.1804@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '7.5.1804'
|
||||
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||
|
||||
centos:7.9.2009@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '7.9.2009'
|
||||
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||
|
||||
centos:8.1.1911@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '8.1.1911'
|
||||
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||
|
||||
centos:8.3.2011@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '8.3.2011'
|
||||
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||
|
||||
centos:7.6.1810@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '7.6.1810'
|
||||
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||
|
||||
centos:7.7.1908@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '7.7.1908'
|
||||
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||
|
||||
centos:7.8.2003@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '7.8.2003'
|
||||
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||
|
||||
centos:8.2.2004@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '8.2.2004'
|
||||
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||
|
||||
alpine:latest@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/alpine/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: 'latest'
|
||||
FDO_DISTRIBUTION_TAG: $ALPINE_TAG
|
||||
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# build stage #
|
||||
# tierN stage #
|
||||
# #
|
||||
#################################################################
|
||||
|
||||
@@ -707,13 +419,6 @@ alpine:latest@container-clean:
|
||||
dependencies: []
|
||||
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# test stage #
|
||||
# #
|
||||
#################################################################
|
||||
|
||||
|
||||
t_fedora:37:
|
||||
extends:
|
||||
- .build@template
|
||||
|
@@ -50,7 +50,6 @@ stages:
|
||||
- tier3
|
||||
- deploy
|
||||
- triage
|
||||
- container_clean
|
||||
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: NetworkManager/NetworkManager
|
||||
@@ -95,7 +94,7 @@ variables:
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# containers stage #
|
||||
# prep stage #
|
||||
# #
|
||||
#################################################################
|
||||
|
||||
@@ -121,55 +120,7 @@ tier{{distro.tier}}:{{distro.name}}:{{version}}@prep:
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# container clean stage #
|
||||
# run during the clean stage #
|
||||
# #
|
||||
#################################################################
|
||||
|
||||
#
|
||||
# This stage will look for the container images we currently have in
|
||||
# the registry and will remove any that are not tagged with the provided
|
||||
# $container_image:$tag
|
||||
#
|
||||
# This job only runs for a scheduled pipeline.
|
||||
#
|
||||
# Go to your Profile, Settings, Access Tokens
|
||||
# Create a personal token with 'api' scope, copy the value.
|
||||
# Go to CI/CD, Schedules, schedule a monthly job.
|
||||
# Define a variable of type File named AUTHFILE. Content is that token
|
||||
# value.
|
||||
.container-clean:
|
||||
stage: container_clean
|
||||
image: golang:alpine
|
||||
before_script:
|
||||
- apk add python3 py-pip git
|
||||
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
|
||||
script:
|
||||
- ci-fairy -v --authfile $AUTHFILE delete-image
|
||||
--repository $FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION
|
||||
--exclude-tag $FDO_DISTRIBUTION_TAG
|
||||
dependencies: []
|
||||
allow_failure: true
|
||||
only:
|
||||
- schedules
|
||||
|
||||
{% for distro in distributions %}
|
||||
{% for version in distro.versions %}
|
||||
{{distro.name}}:{{version}}@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/{{distro.name}}/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '{{version}}'
|
||||
FDO_DISTRIBUTION_TAG: ${{distro.name.upper()}}_TAG
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# build stage #
|
||||
# tierN stage #
|
||||
# #
|
||||
#################################################################
|
||||
|
||||
@@ -182,13 +133,6 @@ tier{{distro.tier}}:{{distro.name}}:{{version}}@prep:
|
||||
- exit $r
|
||||
dependencies: []
|
||||
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# test stage #
|
||||
# #
|
||||
#################################################################
|
||||
|
||||
{% for distro in distributions %}
|
||||
{% for version in distro.versions %}
|
||||
|
||||
|
Reference in New Issue
Block a user