From 6c00573fa689e7b5e9c79813a4897f68b0d53130 Mon Sep 17 00:00:00 2001 From: Daniel Lipovetsky Date: Thu, 30 May 2024 08:14:33 -0700 Subject: [PATCH] ci: Use activation key and org ID instead of username and password (#1096) * ci: Use activation key and org ID instead of username and password * fixup! ci: Use activation key and org ID instead of username and password Update makefile and vsphere readme Signed-off-by: Daniel Lipovetsky --- .github/workflows/aws-e2e.yaml | 4 ++-- .github/workflows/release-ami.yaml | 2 ++ .github/workflows/release-vsphere-template.yaml | 2 ++ .github/workflows/vsphere-e2e.yaml | 4 +++- Makefile | 4 +++- docs/dev/vsphere.md | 9 +++++++++ 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/aws-e2e.yaml b/.github/workflows/aws-e2e.yaml index 0dd700a51..e94654582 100644 --- a/.github/workflows/aws-e2e.yaml +++ b/.github/workflows/aws-e2e.yaml @@ -141,8 +141,8 @@ jobs: args: runE2e "${{ matrix.os }}" "${{ matrix.buildConfig }}" aws true env: GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }} - RHSM_USER: ${{ secrets.RHSM_USER }} - RHSM_PASS: ${{ secrets.RHSM_PASS }} + RHSM_ACTIVATION_KEY: ${{ secrets.RHSM_ACTIVATION_KEY }} + RHSM_ORG_ID: ${{ secrets.RHSM_ORG_ID }} - name: Run make destroy to clean up failed tests if: ${{ always() }} diff --git a/.github/workflows/release-ami.yaml b/.github/workflows/release-ami.yaml index 9de6bcbf7..da4f759c2 100644 --- a/.github/workflows/release-ami.yaml +++ b/.github/workflows/release-ami.yaml @@ -88,3 +88,5 @@ jobs: args: runE2e "${{ matrix.os }}" "${{ matrix.buildConfig }}" aws false env: GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }} + RHSM_ACTIVATION_KEY: ${{ secrets.RHSM_ACTIVATION_KEY }} + RHSM_ORG_ID: ${{ secrets.RHSM_ORG_ID }} diff --git a/.github/workflows/release-vsphere-template.yaml b/.github/workflows/release-vsphere-template.yaml index 4e3380ff8..a9ac69124 100644 --- a/.github/workflows/release-vsphere-template.yaml +++ b/.github/workflows/release-vsphere-template.yaml @@ -79,6 +79,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }} VSPHERE_SERVER: ${{ secrets.VSPHERE_SERVER }} VSPHERE_DATASTORE: ${{ secrets.VSPHERE_DATASTORE }} + RHSM_ACTIVATION_KEY: ${{ secrets.RHSM_ACTIVATION_KEY }} + RHSM_ORG_ID: ${{ secrets.RHSM_ORG_ID }} - name: Run make destroy to clean up failed tests if: ${{ always() }} diff --git a/.github/workflows/vsphere-e2e.yaml b/.github/workflows/vsphere-e2e.yaml index 391e2c8e5..032d2494d 100644 --- a/.github/workflows/vsphere-e2e.yaml +++ b/.github/workflows/vsphere-e2e.yaml @@ -88,7 +88,9 @@ jobs: VSPHERE_SERVER: ${{ secrets.VSPHERE_SERVER }} VSPHERE_DATASTORE: ${{ secrets.VSPHERE_DATASTORE }} VSPHERE_DATACENTER: ${{ secrets.VSPHERE_DATACENTER }} - + RHSM_ACTIVATION_KEY: ${{ secrets.RHSM_ACTIVATION_KEY }} + RHSM_ORG_ID: ${{ secrets.RHSM_ORG_ID }} + - name: Run make destroy to clean up failed tests if: ${{ always() }} run: make infra.vsphere.destroy || true diff --git a/Makefile b/Makefile index 80511b0b9..b0980dcad 100644 --- a/Makefile +++ b/Makefile @@ -74,7 +74,9 @@ export DOCKER_DEVKIT_VSPHERE_ARGS ?= \ --env VSPHERE_USERNAME \ --env VSPHERE_PASSWORD \ --env RHSM_USER \ - --env RHSM_PASS + --env RHSM_PASS \ + --env RHSM_ACTIVATION_KEY \ + --env RHSM_ORG_ID export DOCKER_DEVKIT_BASTION_ARGS ?= \ --env SSH_BASTION_USERNAME \ diff --git a/docs/dev/vsphere.md b/docs/dev/vsphere.md index d4df9cece..a771ef11e 100644 --- a/docs/dev/vsphere.md +++ b/docs/dev/vsphere.md @@ -26,11 +26,20 @@ VSPHERE_PASSWORD=example_password **Environment Variables for RedHat subscription:** +For username and password: + ```bash RHSM_USER=example_user RHSM_PASS=example_password ``` +Or activation key and org ID: + +```bash +RHSM_ACTIVATION_KEY=example_key +RHSM_ORG_ID=example_org_id +``` + **Packer variables for vSphere:** Following variables are needed for the vSphere. Add this configuration in the `image.yaml`