From 139f07f325d0ae5145c88c1cc60d191fb310bf18 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Wed, 20 Dec 2023 16:57:35 -0500 Subject: [PATCH] feat: renovate aqua config file and move scripts to .github Signed-off-by: Devin Buhl --- .github/{workflows/resources => }/aqua.yaml | 0 .github/renovate.json5 | 1 + .../{workflows/resources => scripts}/extract-images.mjs | 0 .github/{workflows/resources => scripts}/kubeconform.sh | 0 .github/workflows/aqua-test.yaml | 4 ++-- .github/workflows/flux-diff.yaml | 4 ++-- .github/workflows/flux-hr-image-test.yaml | 6 +++--- .github/workflows/flux-hr-sync.yaml | 4 ++-- .github/workflows/flux-ks-sync.yaml | 5 ++--- .github/workflows/kubeconform.yaml | 7 +++---- .github/workflows/publish-schemas.yaml | 4 ++-- .github/workflows/publish-terraform.yaml | 5 ++--- 12 files changed, 19 insertions(+), 21 deletions(-) rename .github/{workflows/resources => }/aqua.yaml (100%) rename .github/{workflows/resources => scripts}/extract-images.mjs (100%) rename .github/{workflows/resources => scripts}/kubeconform.sh (100%) diff --git a/.github/workflows/resources/aqua.yaml b/.github/aqua.yaml similarity index 100% rename from .github/workflows/resources/aqua.yaml rename to .github/aqua.yaml diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 98508000fca59..3f91cfe32dd49 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -11,6 +11,7 @@ ":semanticCommits", ":skipStatusChecks", ":timezone(America/New_York)", + "github>aquaproj/aqua-renovate-config:file#1.13.0(.github/aqua.yaml)", "github>onedr0p/home-ops//.github/renovate/allowedVersions.json5", "github>onedr0p/home-ops//.github/renovate/autoMerge.json5", "github>onedr0p/home-ops//.github/renovate/clusters.json5", diff --git a/.github/workflows/resources/extract-images.mjs b/.github/scripts/extract-images.mjs similarity index 100% rename from .github/workflows/resources/extract-images.mjs rename to .github/scripts/extract-images.mjs diff --git a/.github/workflows/resources/kubeconform.sh b/.github/scripts/kubeconform.sh similarity index 100% rename from .github/workflows/resources/kubeconform.sh rename to .github/scripts/kubeconform.sh diff --git a/.github/workflows/aqua-test.yaml b/.github/workflows/aqua-test.yaml index e322956e4f0d1..f0292573b816d 100644 --- a/.github/workflows/aqua-test.yaml +++ b/.github/workflows/aqua-test.yaml @@ -8,7 +8,7 @@ on: branches: ["main"] env: - AQUA_CONFIG: ./.github/workflows/resources/aqua.yaml + AQUA_CONFIG: ./.github/aqua.yaml DEBCONF_NONINTERACTIVE_SEEN: "true" DEBIAN_FRONTEND: noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE: DontWarn @@ -39,7 +39,7 @@ jobs: uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.local/share/aquaproj-aqua - key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/workflows/resources/aqua.yaml')}} + key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/aqua.yaml')}} restore-keys: | v1-aqua-installer-${{runner.os}}-${{runner.arch}}- diff --git a/.github/workflows/flux-diff.yaml b/.github/workflows/flux-diff.yaml index 9bf134a66acf2..3af2967ac84e5 100644 --- a/.github/workflows/flux-diff.yaml +++ b/.github/workflows/flux-diff.yaml @@ -8,7 +8,7 @@ on: paths: ["kubernetes/**"] env: - AQUA_CONFIG: ./.github/workflows/resources/aqua.yaml + AQUA_CONFIG: ./.github/aqua.yaml DEBCONF_NONINTERACTIVE_SEEN: "true" DEBIAN_FRONTEND: noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE: DontWarn @@ -44,7 +44,7 @@ jobs: uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.local/share/aquaproj-aqua - key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/workflows/resources/aqua.yaml')}} + key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/aqua.yaml')}} restore-keys: | v1-aqua-installer-${{runner.os}}-${{runner.arch}}- diff --git a/.github/workflows/flux-hr-image-test.yaml b/.github/workflows/flux-hr-image-test.yaml index a1f5a97548b22..37bb01d585d43 100644 --- a/.github/workflows/flux-hr-image-test.yaml +++ b/.github/workflows/flux-hr-image-test.yaml @@ -8,7 +8,7 @@ on: paths: ["kubernetes/**/helmrelease.yaml"] env: - AQUA_CONFIG: ./.github/workflows/resources/aqua.yaml + AQUA_CONFIG: ./.github/aqua.yaml DEBCONF_NONINTERACTIVE_SEEN: "true" DEBIAN_FRONTEND: noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE: DontWarn @@ -79,7 +79,7 @@ jobs: uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.local/share/aquaproj-aqua - key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/workflows/resources/aqua.yaml')}} + key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/aqua.yaml')}} restore-keys: | v1-aqua-installer-${{runner.os}}-${{runner.arch}}- @@ -94,7 +94,7 @@ jobs: - name: Extract Images from Helm Release id: extract-images run: | - images=$(npx zx ./.github/workflows/resources/extract-images.mjs --kubernetes-dir "${{ env.KUBERNETES_DIR }}" --helmrelease "${{ matrix.files }}") + images=$(npx zx ./.github/scripts/extract-images.mjs --kubernetes-dir "${{ env.KUBERNETES_DIR }}" --helmrelease "${{ matrix.files }}") echo "images=${images}" >> $GITHUB_OUTPUT echo "${images}" diff --git a/.github/workflows/flux-hr-sync.yaml b/.github/workflows/flux-hr-sync.yaml index 3553ac0397fb2..26fd7f7c97585 100644 --- a/.github/workflows/flux-hr-sync.yaml +++ b/.github/workflows/flux-hr-sync.yaml @@ -21,7 +21,7 @@ on: paths: ["kubernetes/**/helmrelease.yaml"] env: - AQUA_CONFIG: ./.github/workflows/resources/aqua.yaml + AQUA_CONFIG: ./.github/aqua.yaml DEBCONF_NONINTERACTIVE_SEEN: "true" DEBIAN_FRONTEND: noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE: DontWarn @@ -52,7 +52,7 @@ jobs: uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.local/share/aquaproj-aqua - key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/workflows/resources/aqua.yaml')}} + key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/aqua.yaml')}} restore-keys: | v1-aqua-installer-${{runner.os}}-${{runner.arch}}- diff --git a/.github/workflows/flux-ks-sync.yaml b/.github/workflows/flux-ks-sync.yaml index bb7c41a3e0821..4421c45a140c2 100644 --- a/.github/workflows/flux-ks-sync.yaml +++ b/.github/workflows/flux-ks-sync.yaml @@ -8,11 +8,10 @@ on: paths: ["kubernetes/storage/**"] env: - AQUA_CONFIG: ./.github/workflows/resources/aqua.yaml + AQUA_CONFIG: ./.github/aqua.yaml DEBCONF_NONINTERACTIVE_SEEN: "true" DEBIAN_FRONTEND: noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE: DontWarn - WORKFLOW_RESOURCE_DIR: ./.github/workflows/resources jobs: sync: @@ -43,7 +42,7 @@ jobs: uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.local/share/aquaproj-aqua - key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/workflows/resources/aqua.yaml')}} + key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/aqua.yaml')}} restore-keys: | v1-aqua-installer-${{runner.os}}-${{runner.arch}}- diff --git a/.github/workflows/kubeconform.yaml b/.github/workflows/kubeconform.yaml index d50be78f51d1e..3d6934ccd2e83 100644 --- a/.github/workflows/kubeconform.yaml +++ b/.github/workflows/kubeconform.yaml @@ -9,11 +9,10 @@ on: paths: ["kubernetes/**"] env: - AQUA_CONFIG: ./.github/workflows/resources/aqua.yaml + AQUA_CONFIG: ./.github/aqua.yaml DEBCONF_NONINTERACTIVE_SEEN: "true" DEBIAN_FRONTEND: noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE: DontWarn - WORKFLOW_RESOURCE_DIR: ./.github/workflows/resources jobs: kubeconform: @@ -43,7 +42,7 @@ jobs: uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.local/share/aquaproj-aqua - key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/workflows/resources/aqua.yaml')}} + key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/aqua.yaml')}} restore-keys: | v1-aqua-installer-${{runner.os}}-${{runner.arch}}- @@ -57,4 +56,4 @@ jobs: - name: Run kubeconform shell: bash - run: bash ${{ env.WORKFLOW_RESOURCE_DIR }}/kubeconform.sh ${{ matrix.path }} + run: bash ./.github/scripts/kubeconform.sh ${{ matrix.path }} diff --git a/.github/workflows/publish-schemas.yaml b/.github/workflows/publish-schemas.yaml index a40cb9cc6d406..6dcd2820775ff 100644 --- a/.github/workflows/publish-schemas.yaml +++ b/.github/workflows/publish-schemas.yaml @@ -11,7 +11,7 @@ on: paths: [".github/workflows/publish-schemas.yaml"] env: - AQUA_CONFIG: ./.github/workflows/resources/aqua.yaml + AQUA_CONFIG: ./.github/aqua.yaml DEBCONF_NONINTERACTIVE_SEEN: "true" DEBIAN_FRONTEND: noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE: DontWarn @@ -45,7 +45,7 @@ jobs: uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.local/share/aquaproj-aqua - key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/workflows/resources/aqua.yaml')}} + key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/aqua.yaml')}} restore-keys: | v1-aqua-installer-${{runner.os}}-${{runner.arch}}- diff --git a/.github/workflows/publish-terraform.yaml b/.github/workflows/publish-terraform.yaml index 6c2ed435bc346..ad934def6bccb 100644 --- a/.github/workflows/publish-terraform.yaml +++ b/.github/workflows/publish-terraform.yaml @@ -9,11 +9,10 @@ on: paths: ["terraform/**"] env: - AQUA_CONFIG: ./.github/workflows/resources/aqua.yaml + AQUA_CONFIG: ./.github/aqua.yaml DEBCONF_NONINTERACTIVE_SEEN: "true" DEBIAN_FRONTEND: noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE: DontWarn - WORKFLOW_RESOURCE_DIR: ./.github/workflows/resources jobs: publish-terraform: @@ -43,7 +42,7 @@ jobs: uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.local/share/aquaproj-aqua - key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/workflows/resources/aqua.yaml')}} + key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('./.github/aqua.yaml')}} restore-keys: | v1-aqua-installer-${{runner.os}}-${{runner.arch}}-