From 26fd9043132484c5780520418eba0efef84454ad Mon Sep 17 00:00:00 2001
From: smerle33 <stephane.merle+jenkins@gmail.com>
Date: Mon, 15 Jan 2024 09:35:17 +0100
Subject: [PATCH] remove useless updatecli manifest

---
 updatecli/updatecli.d/docker-helmfile.yml     | 67 -------------------
 updatecli/updatecli.d/terraform-hashicorp.yml | 57 ----------------
 vars/terraform.groovy                         |  1 -
 3 files changed, 125 deletions(-)
 delete mode 100644 updatecli/updatecli.d/docker-helmfile.yml
 delete mode 100644 updatecli/updatecli.d/terraform-hashicorp.yml

diff --git a/updatecli/updatecli.d/docker-helmfile.yml b/updatecli/updatecli.d/docker-helmfile.yml
deleted file mode 100644
index 46c42d1d..00000000
--- a/updatecli/updatecli.d/docker-helmfile.yml
+++ /dev/null
@@ -1,67 +0,0 @@
----
-name: Bump `docker-helmfile` version
-
-scms:
-  default:
-    kind: github
-    spec:
-      user: "{{ .github.user }}"
-      email: "{{ .github.email }}"
-      owner: "{{ .github.owner }}"
-      repository: "{{ .github.repository }}"
-      token: "{{ requiredEnv .github.token }}"
-      username: "{{ .github.username }}"
-      branch: "{{ .github.branch }}"
-
-sources:
-  lastVersion:
-    kind: githubrelease
-    name: Get the latest updatecli version
-    spec:
-      owner: "jenkins-infra"
-      repository: "docker-helmfile"
-      token: "{{ requiredEnv .github.token }}"
-      username: "{{ .github.username }}"
-      versionfilter:
-        kind: semver
-    transformers:
-      - trimprefix: v
-
-conditions:
-  checkIfDockerImageIsPublished:
-    name: "Check if the Docker Image is published"
-    kind: dockerimage
-    spec:
-      image: "jenkinsciinfra/helmfile"
-      architecture: amd64
-
-targets:
-  updateGroovyCode:
-    name: Update docker-helmfile in groovy code
-    kind: file
-    spec:
-      file: vars/updatecli.groovy
-      # Please note that the patterns are specified as "block scalars" (>) with the last endline trimmed (-) to avoid tedious escaping of simple quotes
-      matchpattern: >-
-        'jenkinsciinfra/helmfile:(.*)'
-      replacepattern: >-
-        'jenkinsciinfra/helmfile:{{ source `lastVersion` }}'
-    scmid: default
-  updateDoc:
-    name: Update docker-helmfile in documentation
-    kind: file
-    spec:
-      file: vars/updatecli.txt
-      matchpattern: jenkinsciinfra/helmfile:(\d+\.\d+\.\d+)\"
-      replacepattern: jenkinsciinfra/helmfile:{{ source `lastVersion` }}"
-    scmid: default
-
-actions:
-  default:
-    kind: github/pullrequest
-    title: Bump `docker-helmfile` version to {{ source "lastVersion" }}
-    scmid: default
-    spec:
-      labels:
-        - dependencies
-        - jenkinsciinfra/helmfile
diff --git a/updatecli/updatecli.d/terraform-hashicorp.yml b/updatecli/updatecli.d/terraform-hashicorp.yml
deleted file mode 100644
index 34ec3a6e..00000000
--- a/updatecli/updatecli.d/terraform-hashicorp.yml
+++ /dev/null
@@ -1,57 +0,0 @@
-name: Bump `hashicorp-tools` docker image
-
-scms:
-  default:
-    kind: github
-    spec:
-      user: "{{ .github.user }}"
-      email: "{{ .github.email }}"
-      owner: "{{ .github.owner }}"
-      repository: "{{ .github.repository }}"
-      token: "{{ requiredEnv .github.token }}"
-      username: "{{ .github.username }}"
-      branch: "{{ .github.branch }}"
-
-sources:
-  dockerHashicorpToolsImageVersion:
-    kind: githubrelease
-    spec:
-      owner: "jenkins-infra"
-      repository: "docker-hashicorp-tools"
-      token: "{{ requiredEnv .github.token }}"
-      username: "{{ .github.username }}"
-      versionfilter:
-        kind: semver
-    transformers:
-      - trimprefix: v
-
-conditions:
-  checkIfDockerImageIsPublished:
-    name: "Check if the Docker Image is published"
-    kind: dockerimage
-    spec:
-      image: "jenkinsciinfra/hashicorp-tools"
-      architecture: amd64
-
-targets:
-  updateTerraformFile:
-    name: Update Terraform file in groovy code
-    kind: file
-    spec:
-      file: ./vars/terraform.groovy
-      # Please note that the patterns are specified as "block scalars" (>) - https://yaml-multiline.info/ - with the last endline trimmed (-) to avoid tedious escaping of simple quotes
-      matchpattern: >-
-        'jenkinsciinfra/hashicorp-tools:(.*)'
-      replacepattern: >-
-        'jenkinsciinfra/hashicorp-tools:{{ source `dockerHashicorpToolsImageVersion` }}'
-    scmid: default
-
-actions:
-  default:
-    kind: github/pullrequest
-    scmid: default
-    title: Bump `hashicorp-tools` docker image to {{ source "dockerHashicorpToolsImageVersion" }}
-    spec:
-      labels:
-        - dependencies
-        - jenkinsciinfra/hashicorp-tools
diff --git a/vars/terraform.groovy b/vars/terraform.groovy
index c098197d..d518bdc5 100644
--- a/vars/terraform.groovy
+++ b/vars/terraform.groovy
@@ -9,7 +9,6 @@ def call(userConfig = [:]) {
     stagingCredentials: [], // No custom secrets for staging by default
     productionCredentials: [], // No custom secrets for production by default
     productionBranch: 'main', // Defaults to the principal branch
-    agentContainerImage: 'jenkinsciinfra/hashicorp-tools:1.0.62', // Version managed by updatecli
     agentLabel: 'jnlp-linux-arm64', // replace agentContainerImage
     runTests: false, // Executes the tests provided by the "calling" project, which should provide a tests/Makefile
     runCommonTests: true, // Executes the default test suite from the shared tools repository (terratest)