From 3cd4d944164408fa42b7b8a438b9cae2140a8c26 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Fri, 6 Jan 2023 15:54:15 +0100 Subject: Rewrite artifact-cleanup jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7f8766ed3d8fef0e1ab781a065d55f9a133f2fee Signed-off-by: Cédric Ollivier --- jjb/releng/artifact-cleanup.yaml | 40 ---------------------------------------- jjb/releng/releng-jobs.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 40 deletions(-) delete mode 100644 jjb/releng/artifact-cleanup.yaml (limited to 'jjb') diff --git a/jjb/releng/artifact-cleanup.yaml b/jjb/releng/artifact-cleanup.yaml deleted file mode 100644 index f64650b08..000000000 --- a/jjb/releng/artifact-cleanup.yaml +++ /dev/null @@ -1,40 +0,0 @@ ---- -- project: - name: releng-artifact-cleanup - - project: 'releng' - - jobs: - - 'releng-artifact-cleanup-daily-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - - -- job-template: - name: 'releng-artifact-cleanup-daily-{stream}' - - # Job template for daily builders - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - disabled: false - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - opnfv-build-defaults - - scm: - - git-scm - - triggers: - - timed: 'H H * * *' - - builders: - - shell: | - $WORKSPACE/utils/retention_script.sh diff --git a/jjb/releng/releng-jobs.yaml b/jjb/releng/releng-jobs.yaml index 6948b4add..84277d686 100644 --- a/jjb/releng/releng-jobs.yaml +++ b/jjb/releng/releng-jobs.yaml @@ -453,3 +453,34 @@ google-cloud-sdk -y cd $WORKSPACE/utils/ ./artifacts.opnfv.org.sh + +- project: + name: releng-artifact-cleanup + jobs: + - releng-artifact-cleanup + +- job-template: + name: releng-artifact-cleanup + scm: + - releng-scm: + ref: master + parameters: + - releng-jjb-node: + node: opnfv-build + triggers: + - timed: '@daily' + builders: + - releng-artifact-cleanup + +- builder: + name: releng-artifact-cleanup + builders: + - shell: | + curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - + echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee \ + /etc/apt/sources.list.d/google-cloud-sdk.list + sudo apt-get -o DPkg::Lock::Timeout=300 update && \ + sudo DEBIAN_FRONTEND=noninteractive apt-get \ + -o DPkg::Lock::Timeout=300 install \ + google-cloud-sdk -y + $WORKSPACE/utils/retention_script.sh -- cgit 1.2.3-korg