diff --git a/.github/workflows/prom-fed-ci.yaml b/.github/workflows/ci.yaml similarity index 100% rename from .github/workflows/prom-fed-ci.yaml rename to .github/workflows/ci.yaml diff --git a/.github/workflows/hl-ci.yaml b/.github/workflows/hl-ci.yaml index 81c8ed16..15083ed5 100644 --- a/.github/workflows/hl-ci.yaml +++ b/.github/workflows/hl-ci.yaml @@ -1,27 +1,27 @@ -name: "[helm-locker] CI" +# name: "[helm-locker] CI" -on: - workflow_call: - pull_request: - push: - branches: - - main +# on: +# workflow_call: +# pull_request: +# push: +# branches: +# - main -jobs: - build: - strategy: - matrix: - arch: - - x64 - - arm64 - runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name : Set up Go - uses : actions/setup-go@v5 - with: - go-version: 1.22 - - name: Run CI - run: BUILD_TARGET=helm-locker make ci +# jobs: +# build: +# strategy: +# matrix: +# arch: +# - x64 +# - arm64 +# runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }} +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name : Set up Go +# uses : actions/setup-go@v5 +# with: +# go-version: 1.22 +# - name: Run CI +# run: BUILD_TARGET=helm-locker make ci diff --git a/.github/workflows/hl-e2e.yaml b/.github/workflows/hl-e2e.yaml index 45140740..6c25896e 100644 --- a/.github/workflows/hl-e2e.yaml +++ b/.github/workflows/hl-e2e.yaml @@ -1,55 +1,55 @@ -name: "[helm-locker] CI-e2e" +# name: "[helm-locker] CI-e2e" -on: - pull_request: - push: - branches: - - main - paths: - - 'go.mod' - - 'charts/helm-locker*/**' - - 'crds/helm-locker/**' - - 'package/Dockerfile-helm-locker' - - 'cmd/helm-locker/**' - - 'pkg/helm-locker/**' +# on: +# pull_request: +# push: +# branches: +# - main +# paths: +# - 'go.mod' +# - 'charts/helm-locker*/**' +# - 'crds/helm-locker/**' +# - 'package/Dockerfile-helm-locker' +# - 'cmd/helm-locker/**' +# - 'pkg/helm-locker/**' -env: - CLUSTER_NAME : e2e-ci-helm-locker - K3S_VERSION : v1.27.9-k3s1 +# env: +# CLUSTER_NAME : e2e-ci-helm-locker +# K3S_VERSION : v1.27.9-k3s1 -jobs: - build: - strategy: - matrix: - arch: - - x64 - - arm64 - runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name : Set up Go - uses : actions/setup-go@v5 - with: - go-version: 1.22 - - uses: azure/setup-kubectl@v3 - - uses: azure/setup-helm@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: build - run: BUILD_TARGET=helm-locker make build - - name : Install k3d - run : ./.github/workflows/e2e/scripts/install-k3d.sh - - name : Setup k3d cluster - run : K3S_VERSION=${{ env.K3S_VERSION }} ./.github/workflows/e2e/scripts/setup-cluster.sh - # temporary hack to run the helm-locker controller in the k3d cluster - - name : run helm-locker - run : | - kubectl create ns cattle-helm-system - ./build/bin/helm-locker & - - name : run e2e tests - run: | - k3d kubeconfig get ${{ env.CLUSTER_NAME }} > kubeconfig.yaml - export KUBECONFIG=$(pwd)/kubeconfig.yaml - cd tests && KUBECONFIG=$KUBECONFIG go test -v -race -timeout 30m ./... +# jobs: +# build: +# strategy: +# matrix: +# arch: +# - x64 +# - arm64 +# runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }} +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name : Set up Go +# uses : actions/setup-go@v5 +# with: +# go-version: 1.22 +# - uses: azure/setup-kubectl@v3 +# - uses: azure/setup-helm@v3 +# with: +# token: ${{ secrets.GITHUB_TOKEN }} +# - name: build +# run: BUILD_TARGET=helm-locker make build +# - name : Install k3d +# run : ./.github/workflows/e2e/scripts/install-k3d.sh +# - name : Setup k3d cluster +# run : K3S_VERSION=${{ env.K3S_VERSION }} ./.github/workflows/e2e/scripts/setup-cluster.sh +# # temporary hack to run the helm-locker controller in the k3d cluster +# - name : run helm-locker +# run : | +# kubectl create ns cattle-helm-system +# ./build/bin/helm-locker & +# - name : run e2e tests +# run: | +# k3d kubeconfig get ${{ env.CLUSTER_NAME }} > kubeconfig.yaml +# export KUBECONFIG=$(pwd)/kubeconfig.yaml +# cd tests && KUBECONFIG=$KUBECONFIG go test -v -race -timeout 30m ./... diff --git a/.github/workflows/hpo-ci.yaml b/.github/workflows/hpo-ci.yaml index bcccf4bd..08f5cce8 100644 --- a/.github/workflows/hpo-ci.yaml +++ b/.github/workflows/hpo-ci.yaml @@ -1,71 +1,71 @@ -name: "[helm-project-operator] ci" +# name: "[helm-project-operator] ci" -env: - CGO_ENABLED: 0 - YQ_VERSION: v4.44.3 +# env: +# CGO_ENABLED: 0 +# YQ_VERSION: v4.44.3 -on: - pull_request: - workflow_call: - inputs: - skip_build: - default: 'false' - required: false - type: string +# on: +# pull_request: +# workflow_call: +# inputs: +# skip_build: +# default: 'false' +# required: false +# type: string -permissions: - contents: read +# permissions: +# contents: read -jobs: - build: - strategy: - matrix: - arch: - - x64 - - arm64 - runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name : setup Go - uses : actions/setup-go@v5 - with: - go-version: 1.22 - - name: Install mikefarah/yq - run: | - sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${{ matrix.arch == 'x64' && 'amd64' || matrix.arch }} -O /usr/bin/yq && sudo chmod +x /usr/bin/yq; - - uses: azure/setup-helm@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: Perform CI - run : BUILD_TARGET=helm-project-operator make ci - build-images: - if: ${{ inputs.skip_build != 'true' }} - strategy: - matrix: - arch: - - x64 - - arm64 - runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name : Set up Go - uses : actions/setup-go@v5 - with: - go-version: 1.22 - - name : Export image version - run : | - source ./scripts/version - echo IMAGE=$IMAGE >> $GITHUB_ENV - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build Helm Project Operator image - uses: docker/build-push-action@v5 - with: - context: . - file: ./package/Dockerfile-helm-project-operator - push: false - tags: ${{ env.IMAGE }} +# jobs: +# build: +# strategy: +# matrix: +# arch: +# - x64 +# - arm64 +# runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }} +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name : setup Go +# uses : actions/setup-go@v5 +# with: +# go-version: 1.22 +# - name: Install mikefarah/yq +# run: | +# sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${{ matrix.arch == 'x64' && 'amd64' || matrix.arch }} -O /usr/bin/yq && sudo chmod +x /usr/bin/yq; +# - uses: azure/setup-helm@v3 +# with: +# token: ${{ secrets.GITHUB_TOKEN }} +# - name: Perform CI +# run : BUILD_TARGET=helm-project-operator make ci +# build-images: +# if: ${{ inputs.skip_build != 'true' }} +# strategy: +# matrix: +# arch: +# - x64 +# - arm64 +# runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }} +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name : Set up Go +# uses : actions/setup-go@v5 +# with: +# go-version: 1.22 +# - name : Export image version +# run : | +# source ./scripts/version +# echo IMAGE=$IMAGE >> $GITHUB_ENV +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v3 +# - name: Build Helm Project Operator image +# uses: docker/build-push-action@v5 +# with: +# context: . +# file: ./package/Dockerfile-helm-project-operator +# push: false +# tags: ${{ env.IMAGE }} diff --git a/.github/workflows/hpo-e2e-ci.yaml b/.github/workflows/hpo-e2e-ci.yaml index 2db59cc2..8a93527c 100644 --- a/.github/workflows/hpo-e2e-ci.yaml +++ b/.github/workflows/hpo-e2e-ci.yaml @@ -1,97 +1,97 @@ -name: "[helm-project-operator] E2E Helm Project Operator" +# name: "[helm-project-operator] E2E Helm Project Operator" -on: - workflow_dispatch: - inputs: - debug: - description: "Enable debug logs" - required: false - default: "false" - k3s_version: - description: "Version of k3s to use for the underlying cluster, should exist in https://hub.docker.com/r/rancher/k3s/tags" - required: false - pull_request: - paths-ignore: - - 'docs/**' - - 'scripts/**' - - '*.md' - - '*.dapper' - - '.gitignore' - - 'CODEOWNERS' - - 'LICENSE' - - 'Makefile' +# on: +# workflow_dispatch: +# inputs: +# debug: +# description: "Enable debug logs" +# required: false +# default: "false" +# k3s_version: +# description: "Version of k3s to use for the underlying cluster, should exist in https://hub.docker.com/r/rancher/k3s/tags" +# required: false +# pull_request: +# paths-ignore: +# - 'docs/**' +# - 'scripts/**' +# - '*.md' +# - '*.dapper' +# - '.gitignore' +# - 'CODEOWNERS' +# - 'LICENSE' +# - 'Makefile' -env: - CLUSTER_NAME: e2e-ci-helm-project-operator - CGO_ENABLED: 0 - YQ_VERSION: v4.44.3 - E2E_CI: true - REPO: rancher - TAG: v0.0.0-dev.1 - APISERVER_PORT: 8001 - DEFAULT_SLEEP_TIMEOUT_SECONDS: 10 - KUBECTL_WAIT_TIMEOUT: 120s - DEBUG: ${{ github.event.inputs.debug || false }} +# env: +# CLUSTER_NAME: e2e-ci-helm-project-operator +# CGO_ENABLED: 0 +# YQ_VERSION: v4.44.3 +# E2E_CI: true +# REPO: rancher +# TAG: v0.0.0-dev.1 +# APISERVER_PORT: 8001 +# DEFAULT_SLEEP_TIMEOUT_SECONDS: 10 +# KUBECTL_WAIT_TIMEOUT: 120s +# DEBUG: ${{ github.event.inputs.debug || false }} -permissions: - contents: write +# permissions: +# contents: write -jobs: - e2e-helm-project-operator: - strategy: - matrix: - arch: - - x64 - - arm64 - k3s_version: - # k3d version list k3s | sed 's/+/-/' | sort -h - - ${{ github.event.inputs.k3s_version || 'v1.27.9-k3s1' }} - runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }} - env: - K3S_VERSION: ${{ matrix.k3s_version }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name : setup Go - uses : actions/setup-go@v5 - with: - go-version: 1.22 - - name: Install mikefarah/yq - run: | - sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${{ matrix.arch == 'x64' && 'amd64' || matrix.arch }} -O /usr/bin/yq && sudo chmod +x /usr/bin/yq; - - name: Perform pre-e2e image build - run: | - BUILD_TARGET=helm-project-operator REPO=${REPO} TAG=${TAG} ./scripts/build; - BUILD_TARGET=helm-project-operator REPO=${REPO} TAG=${TAG} ./scripts/package; - - name : Install k3d - run : ./.github/workflows/e2e/scripts/install-k3d.sh - - name : Setup k3d cluster - run : K3S_VERSION=${{ env.K3S_VERSION }} ./.github/workflows/e2e/scripts/setup-cluster.sh - - name: Import Images Into k3d - run: | - k3d image import ${REPO}/helm-project-operator:${TAG} -c "$CLUSTER_NAME"; - - name: Setup kubectl context - run: | - kubectl config use-context "k3d-$CLUSTER_NAME"; - - name: Install Helm Project Operator - run: ./.github/workflows/e2e/scripts/hpo-install-helm-project-operator.sh; +# jobs: +# e2e-helm-project-operator: +# strategy: +# matrix: +# arch: +# - x64 +# - arm64 +# k3s_version: +# # k3d version list k3s | sed 's/+/-/' | sort -h +# - ${{ github.event.inputs.k3s_version || 'v1.27.9-k3s1' }} +# runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }} +# env: +# K3S_VERSION: ${{ matrix.k3s_version }} +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name : setup Go +# uses : actions/setup-go@v5 +# with: +# go-version: 1.22 +# - name: Install mikefarah/yq +# run: | +# sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${{ matrix.arch == 'x64' && 'amd64' || matrix.arch }} -O /usr/bin/yq && sudo chmod +x /usr/bin/yq; +# - name: Perform pre-e2e image build +# run: | +# BUILD_TARGET=helm-project-operator REPO=${REPO} TAG=${TAG} ./scripts/build; +# BUILD_TARGET=helm-project-operator REPO=${REPO} TAG=${TAG} ./scripts/package; +# - name : Install k3d +# run : ./.github/workflows/e2e/scripts/install-k3d.sh +# - name : Setup k3d cluster +# run : K3S_VERSION=${{ env.K3S_VERSION }} ./.github/workflows/e2e/scripts/setup-cluster.sh +# - name: Import Images Into k3d +# run: | +# k3d image import ${REPO}/helm-project-operator:${TAG} -c "$CLUSTER_NAME"; +# - name: Setup kubectl context +# run: | +# kubectl config use-context "k3d-$CLUSTER_NAME"; +# - name: Install Helm Project Operator +# run: ./.github/workflows/e2e/scripts/hpo-install-helm-project-operator.sh; - - name: Check if Helm Project Operator is up - run: ./.github/workflows/e2e/scripts/hpo-validate-helm-project-operator.sh; +# - name: Check if Helm Project Operator is up +# run: ./.github/workflows/e2e/scripts/hpo-validate-helm-project-operator.sh; - - name: Check if Project Registration Namespace is auto-created on namespace detection - run: ./.github/workflows/e2e/scripts/hpo-create-project-namespace.sh; +# - name: Check if Project Registration Namespace is auto-created on namespace detection +# run: ./.github/workflows/e2e/scripts/hpo-create-project-namespace.sh; - - name: Deploy Example Chart via ProjectHelmChart CR - run: ./.github/workflows/e2e/scripts/hpo-create-projecthelmchart.sh; +# - name: Deploy Example Chart via ProjectHelmChart CR +# run: ./.github/workflows/e2e/scripts/hpo-create-projecthelmchart.sh; - - name: Delete Example Chart - run: ./.github/workflows/e2e/scripts/hpo-delete-projecthelmchart.sh; +# - name: Delete Example Chart +# run: ./.github/workflows/e2e/scripts/hpo-delete-projecthelmchart.sh; - - name: Uninstall Helm Project Operator - run: ./.github/workflows/e2e/scripts/hpo-uninstall-helm-project-operator.sh; +# - name: Uninstall Helm Project Operator +# run: ./.github/workflows/e2e/scripts/hpo-uninstall-helm-project-operator.sh; - - name: Delete k3d cluster - if: always() - run: k3d cluster delete "$CLUSTER_NAME"; +# - name: Delete k3d cluster +# if: always() +# run: k3d cluster delete "$CLUSTER_NAME"; diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml new file mode 100644 index 00000000..2bbc2a7f --- /dev/null +++ b/.github/workflows/integration.yaml @@ -0,0 +1,80 @@ +name : Integration test + +permissions: + contents : read + +on: + workflow_call: + push: + branches: + - main + - release/v[0-9]+.(0|x) + - release/v[0-9]+.[0-9]+.[0-9]+ + paths-ignore: + - 'docs/**' + - '*.md' + - '.gitignore' + - 'CODEOWNERS' + - 'LICENSE' + pull_request: + paths-ignore: + - 'docs/**' + - '*.md' + - '.gitignore' + - 'CODEOWNERS' + - 'LICENSE' + + +jobs: + test: + strategy: + matrix: + arch: + - x64 + - arm64 + K3S_VERSION : + - v1.28.9-k3s1 + - v1.31.4-k3s1 + name : integration-test + runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }} + steps: + - name : Checkout repository + uses : actions/checkout@v4 + - name: Install go + uses: actions/setup-go@v5 + with: + go-version: 1.23 + - name : Install helm + uses: azure/setup-helm@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name : Install k3d + run : ./.github/workflows/e2e/scripts/install-k3d.sh + - name : Setup test environment + run : | + CLUSTER_NAME=test-cluster K3S_VERSION=${{ matrix.K3S_VERSION }} ./.github/workflows/e2e/scripts/setup-cluster.sh + k3d kubeconfig get test-cluster > kubeconfig.yaml + - name : Debug kubeconfig + run : cat kubeconfig.yaml + # (start) FIXME: the following steps won't be required once the integration tests run the helm-project-operator code in-process + - name: Build Helm Project Operator image + uses: docker/build-push-action@v5 + with: + context: . + file: ./package/Dockerfile-helm-project-operator + push: false + tags: rancher/helm-project-operator:dev + - name : Debug + run : | + docker image ls + - name : Import dev image into cluster + run : | + k3d image import -c test-cluster rancher/helm-project-operator:dev + # (end) + - name : Run e2e tests + run : | + ./scripts/integration + env: + KUBECONFIG: ${{ github.workspace }}/kubeconfig.yaml \ No newline at end of file diff --git a/.github/workflows/pr-debug-publish.yaml b/.github/workflows/pr-debug-publish.yaml index cc5953ed..8fd1a332 100644 --- a/.github/workflows/pr-debug-publish.yaml +++ b/.github/workflows/pr-debug-publish.yaml @@ -42,50 +42,50 @@ jobs: echo "PR ${pr_number}" >> $GITHUB_STEP_SUMMARY echo "PR SHA: ${head_sha:0:7}" >> $GITHUB_STEP_SUMMARY echo "PR SHA FULL: ${head_sha}" >> $GITHUB_STEP_SUMMARY - build_dev_helm_locker: - name: Build and push helm-locker - runs-on: ${{ github.repository == 'rancher/prometheus-federator' && format('runs-on,image=ubuntu22-full-x64,runner=4cpu-linux-x64,run-id={0}', github.run_id) || 'ubuntu-latest' }} - needs: prepare_pr_info - permissions: - contents: read - packages: write - attestations: write - id-token: write - outputs: - tags: ${{ steps.meta-helm-locker.outputs.tags }} - steps: - # Checkout the code at the head of the specified PR - - name: Checkout PR Head - uses: actions/checkout@v3 - with: - ref: ${{ needs.prepare_pr_info.outputs.head_sha }} - # Proceed to build images - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.GHCR_REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for helm-locker image - id: meta-helm-locker - uses: docker/metadata-action@v5 - with: - images: ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}/helm-locker - tags: | - type=raw,value=pr-${{ github.event.inputs.pr_number }}-${{ needs.prepare_pr_info.outputs.head_sha_short }} - type=raw,value=pr-${{ github.event.inputs.pr_number }} - - name: Build and push helm-locker image - id: push - uses: docker/build-push-action@v5 - with: - context: . - file: ./package/Dockerfile-helm-locker - push: true - tags: ${{ steps.meta-helm-locker.outputs.tags }} - labels: ${{ steps.meta-helm-locker.outputs.labels }} - platforms: linux/amd64,linux/arm64 + # build_dev_helm_locker: + # name: Build and push helm-locker + # runs-on: ${{ github.repository == 'rancher/prometheus-federator' && format('runs-on,image=ubuntu22-full-x64,runner=4cpu-linux-x64,run-id={0}', github.run_id) || 'ubuntu-latest' }} + # needs: prepare_pr_info + # permissions: + # contents: read + # packages: write + # attestations: write + # id-token: write + # outputs: + # tags: ${{ steps.meta-helm-locker.outputs.tags }} + # steps: + # # Checkout the code at the head of the specified PR + # - name: Checkout PR Head + # uses: actions/checkout@v3 + # with: + # ref: ${{ needs.prepare_pr_info.outputs.head_sha }} + # # Proceed to build images + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # - name: Log in to the Container registry + # uses: docker/login-action@v3 + # with: + # registry: ${{ env.GHCR_REGISTRY }} + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} + # - name: Extract metadata (tags, labels) for helm-locker image + # id: meta-helm-locker + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}/helm-locker + # tags: | + # type=raw,value=pr-${{ github.event.inputs.pr_number }}-${{ needs.prepare_pr_info.outputs.head_sha_short }} + # type=raw,value=pr-${{ github.event.inputs.pr_number }} + # - name: Build and push helm-locker image + # id: push + # uses: docker/build-push-action@v5 + # with: + # context: . + # file: ./package/Dockerfile-helm-locker + # push: true + # tags: ${{ steps.meta-helm-locker.outputs.tags }} + # labels: ${{ steps.meta-helm-locker.outputs.labels }} + # platforms: linux/amd64,linux/arm64 build_dev_helm_project_operator: name: Build and push helm-project-operator runs-on: ${{ github.repository == 'rancher/prometheus-federator' && format('runs-on,image=ubuntu22-full-x64,runner=4cpu-linux-x64,run-id={0}', github.run_id) || 'ubuntu-latest' }} @@ -178,7 +178,7 @@ jobs: runs-on: ${{ github.repository == 'rancher/prometheus-federator' && format('runs-on,image=ubuntu22-full-x64,runner=4cpu-linux-x64,run-id={0}', github.run_id) || 'ubuntu-latest' }} needs: - prepare_pr_info - - build_dev_helm_locker + # - build_dev_helm_locker - build_dev_helm_project_operator - build_dev_prometheus_federator permissions: @@ -187,7 +187,7 @@ jobs: - name: Comment on PR with image details uses: actions/github-script@v6 env: - meta-helm-locker: ${{ needs.build_dev_helm_locker.outputs.tags }} + # meta-helm-locker: ${{ needs.build_dev_helm_locker.outputs.tags }} meta-helm-project-operator: ${{ needs.build_dev_helm_project_operator.outputs.tags }} meta-prometheus-federator: ${{ needs.build_dev_prometheus_federator.outputs.tags }} prNumber: ${{ github.event.inputs.pr_number }} @@ -196,11 +196,6 @@ jobs: script: | const prNumber = context.payload.inputs.pr_number; const images = [ - { - name: 'Helm Locker', - key: 'meta-helm-locker', - url: `https://github.com/${{ github.repository }}/pkgs/container/prometheus-federator%2Fhelm-locker` - }, { name: 'Helm Project Operator', key: 'meta-helm-project-operator', diff --git a/.github/workflows/prom-fed-e2e-ci.yaml b/.github/workflows/prom-fed-e2e-ci.yaml index 03f59cec..a147105a 100644 --- a/.github/workflows/prom-fed-e2e-ci.yaml +++ b/.github/workflows/prom-fed-e2e-ci.yaml @@ -1,6 +1,7 @@ name: "[prom-fed] E2E CI" on: + workflow_call: workflow_dispatch: inputs: debug: diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 07a8ec19..7e491f43 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,18 +12,24 @@ env: YQ_VERSION: v4.44.3 jobs: - helm-locker-ci: - uses: ./.github/workflows/hl-ci.yaml - helm-project-operator-ci: - uses: ./.github/workflows/hpo-ci.yaml - with: - skip_build: 'true' + # helm-locker-ci: + # uses: ./.github/workflows/hl-ci.yaml + # helm-project-operator-ci: + # uses: ./.github/workflows/hpo-ci.yaml + # with: + # skip_build: 'true' + ci: + uses: ./.github/workflows/ci.yaml + integration: + uses: ./.github/workflows/integration.yaml + e2e: + uses : ./.github/workflows/prom-fed-e2e-ci.yaml goreleaser: name: Build go binaries and helm chart runs-on : runs-on,image=ubuntu22-full-x64,runner=4cpu-linux-x64,run-id=${{ github.run_id }} needs: [ - helm-locker-ci, - helm-project-operator-ci, + ci, + integration, ] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -47,7 +53,6 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Prepare helm charts for debug artifacts run: | - BUILD_TARGET=helm-locker make package-helm && echo "hl: chart success" BUILD_TARGET=helm-project-operator make package-helm && echo "hpo: embeded chart success" BUILD_TARGET=prometheus-federator make package-helm && echo "pf: embeded chart success" - name: Prepare embedded helm chart (needed for build) @@ -66,8 +71,8 @@ jobs: name : Build and push helm-locker & Helm-Project-Operator images runs-on : runs-on,image=ubuntu22-full-x64,runner=4cpu-linux-x64,run-id=${{ github.run_id }} needs: [ - helm-locker-ci, - helm-project-operator-ci, + ci, + integration, ] permissions: contents: read @@ -85,21 +90,21 @@ jobs: registry: ${{ env.GHCR_REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for helm-locker image - id: meta-locker - uses: docker/metadata-action@v5 - with: - images: ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}/helm-locker - - name: Build and push helm-locker image - id: push - uses: docker/build-push-action@v5 - with: - context: . - file: ./package/Dockerfile-helm-locker - push: true - tags: ${{ steps.meta-locker.outputs.tags }} - labels: ${{ steps.meta-locker.outputs.labels }} - platforms : linux/amd64,linux/arm64 + # - name: Extract metadata (tags, labels) for helm-locker image + # id: meta-locker + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}/helm-locker + # - name: Build and push helm-locker image + # id: push + # uses: docker/build-push-action@v5 + # with: + # context: . + # file: ./package/Dockerfile-helm-locker + # push: true + # tags: ${{ steps.meta-locker.outputs.tags }} + # labels: ${{ steps.meta-locker.outputs.labels }} + # platforms : linux/amd64,linux/arm64 - name: Extract metadata (tags, labels) for Helm-Project-Operator image id: meta-hpo uses: docker/metadata-action@v5 @@ -119,8 +124,9 @@ jobs: name: Publish prometheus-federator image runs-on: ubuntu-latest needs: [ - helm-locker-ci, - helm-project-operator-ci, + ci, + integration, + e2e, ] permissions: contents : read