mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
ci: switch gcp accounts to oidc (#983)
This commit is contained in:
parent
7902dc470f
commit
fa7bac3868
4
.github/actions/e2e_test/action.yml
vendored
4
.github/actions/e2e_test/action.yml
vendored
@ -32,7 +32,7 @@ inputs:
|
|||||||
gcpProject:
|
gcpProject:
|
||||||
description: "The GCP project to deploy Constellation in."
|
description: "The GCP project to deploy Constellation in."
|
||||||
required: false
|
required: false
|
||||||
gcp_service_account_json:
|
gcp_service_account:
|
||||||
description: "Service account with permissions to create Constellation on GCP."
|
description: "Service account with permissions to create Constellation on GCP."
|
||||||
required: false
|
required: false
|
||||||
gcpClusterServiceAccountKey:
|
gcpClusterServiceAccountKey:
|
||||||
@ -129,7 +129,7 @@ runs:
|
|||||||
if: inputs.cloudProvider == 'gcp'
|
if: inputs.cloudProvider == 'gcp'
|
||||||
uses: ./.github/actions/login_gcp
|
uses: ./.github/actions/login_gcp
|
||||||
with:
|
with:
|
||||||
gcp_service_account_json: ${{ inputs.gcp_service_account_json }}
|
service_account: ${{ inputs.gcp_service_account }}
|
||||||
|
|
||||||
- name: Login to AWS
|
- name: Login to AWS
|
||||||
if: inputs.cloudProvider == 'aws'
|
if: inputs.cloudProvider == 'aws'
|
||||||
|
7
.github/actions/login_gcp/action.yml
vendored
7
.github/actions/login_gcp/action.yml
vendored
@ -1,8 +1,8 @@
|
|||||||
name: GCP login
|
name: GCP login
|
||||||
description: "Login to GCP & configure gcloud CLI."
|
description: "Login to GCP & configure gcloud CLI."
|
||||||
inputs:
|
inputs:
|
||||||
gcp_service_account_json:
|
service_account:
|
||||||
description: "Service account with permissions to create Constellation on GCP."
|
description: "GCP service account name. Format: <account-name>@<project-name>.iam.gserviceaccount.com"
|
||||||
required: true
|
required: true
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
@ -12,7 +12,8 @@ runs:
|
|||||||
- name: Authorize GCP access
|
- name: Authorize GCP access
|
||||||
uses: google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d # v1.0.0
|
uses: google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d # v1.0.0
|
||||||
with:
|
with:
|
||||||
credentials_json: ${{ inputs.gcp_service_account_json }}
|
workload_identity_provider: projects/796962942582/locations/global/workloadIdentityPools/constellation-ci-pool/providers/constellation-ci-provider
|
||||||
|
service_account: ${{ inputs.service_account }}
|
||||||
|
|
||||||
# Even if preinstalled in Github Actions runner image, this setup does some magic authentication required for gsutil.
|
# Even if preinstalled in Github Actions runner image, this setup does some magic authentication required for gsutil.
|
||||||
- name: Set up Cloud SDK
|
- name: Set up Cloud SDK
|
||||||
|
2
.github/workflows/build-os-image.yml
vendored
2
.github/workflows/build-os-image.yml
vendored
@ -422,7 +422,7 @@ jobs:
|
|||||||
uses: ./.github/actions/login_gcp
|
uses: ./.github/actions/login_gcp
|
||||||
if: matrix.csp == 'gcp'
|
if: matrix.csp == 'gcp'
|
||||||
with:
|
with:
|
||||||
gcp_service_account_json: ${{ secrets.GCP_IMAGE_UPLOAD_SERVICE_ACCOUNT }}
|
service_account: "constellation-cos-builder@constellation-331613.iam.gserviceaccount.com"
|
||||||
|
|
||||||
- name: Prepare PKI for image upload
|
- name: Prepare PKI for image upload
|
||||||
id: prepare-pki
|
id: prepare-pki
|
||||||
|
2
.github/workflows/e2e-test-daily.yml
vendored
2
.github/workflows/e2e-test-daily.yml
vendored
@ -93,7 +93,7 @@ jobs:
|
|||||||
azureUserAssignedIdentity: ${{ secrets.AZURE_E2E_USER_ASSIGNED_IDENTITY }}
|
azureUserAssignedIdentity: ${{ secrets.AZURE_E2E_USER_ASSIGNED_IDENTITY }}
|
||||||
azureResourceGroup: ${{ steps.az_resource_group_gen.outputs.res_group_name }}
|
azureResourceGroup: ${{ steps.az_resource_group_gen.outputs.res_group_name }}
|
||||||
gcpProject: ${{ secrets.GCP_E2E_PROJECT }}
|
gcpProject: ${{ secrets.GCP_E2E_PROJECT }}
|
||||||
gcp_service_account_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
|
gcp_service_account: "constellation-e2e@constellation-331613.iam.gserviceaccount.com"
|
||||||
gcpClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }}
|
gcpClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }}
|
||||||
test: "sonobuoy full"
|
test: "sonobuoy full"
|
||||||
|
|
||||||
|
2
.github/workflows/e2e-test-manual.yml
vendored
2
.github/workflows/e2e-test-manual.yml
vendored
@ -279,7 +279,7 @@ jobs:
|
|||||||
cloudProvider: ${{ inputs.cloudProvider }}
|
cloudProvider: ${{ inputs.cloudProvider }}
|
||||||
machineType: ${{ inputs.machineType }}
|
machineType: ${{ inputs.machineType }}
|
||||||
gcpProject: ${{ secrets.GCP_E2E_PROJECT }}
|
gcpProject: ${{ secrets.GCP_E2E_PROJECT }}
|
||||||
gcp_service_account_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
|
gcp_service_account: "constellation-e2e@constellation-331613.iam.gserviceaccount.com"
|
||||||
gcpClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }}
|
gcpClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }}
|
||||||
test: ${{ inputs.test }}
|
test: ${{ inputs.test }}
|
||||||
kubernetesVersion: ${{ inputs.kubernetesVersion }}
|
kubernetesVersion: ${{ inputs.kubernetesVersion }}
|
||||||
|
2
.github/workflows/e2e-test-weekly.yml
vendored
2
.github/workflows/e2e-test-weekly.yml
vendored
@ -131,7 +131,7 @@ jobs:
|
|||||||
azureUserAssignedIdentity: ${{ secrets.AZURE_E2E_USER_ASSIGNED_IDENTITY }}
|
azureUserAssignedIdentity: ${{ secrets.AZURE_E2E_USER_ASSIGNED_IDENTITY }}
|
||||||
azureResourceGroup: ${{ steps.az_resource_group_gen.outputs.res_group_name }}
|
azureResourceGroup: ${{ steps.az_resource_group_gen.outputs.res_group_name }}
|
||||||
gcpProject: ${{ secrets.GCP_E2E_PROJECT }}
|
gcpProject: ${{ secrets.GCP_E2E_PROJECT }}
|
||||||
gcp_service_account_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
|
gcp_service_account: "constellation-e2e@constellation-331613.iam.gserviceaccount.com"
|
||||||
gcpClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }}
|
gcpClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }}
|
||||||
test: ${{ matrix.test }}
|
test: ${{ matrix.test }}
|
||||||
|
|
||||||
|
2
.github/workflows/generate-measurements.yml
vendored
2
.github/workflows/generate-measurements.yml
vendored
@ -120,7 +120,7 @@ jobs:
|
|||||||
controlNodesCount: 1
|
controlNodesCount: 1
|
||||||
cloudProvider: ${{ matrix.provider }}
|
cloudProvider: ${{ matrix.provider }}
|
||||||
gcpProject: ${{ secrets.GCP_E2E_PROJECT }}
|
gcpProject: ${{ secrets.GCP_E2E_PROJECT }}
|
||||||
gcp_service_account_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
|
gcp_service_account: "constellation-e2e@constellation-331613.iam.gserviceaccount.com"
|
||||||
gcpClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }}
|
gcpClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }}
|
||||||
azureSubscription: ${{ secrets.AZURE_E2E_SUBSCRIPTION_ID }}
|
azureSubscription: ${{ secrets.AZURE_E2E_SUBSCRIPTION_ID }}
|
||||||
azureTenant: ${{ secrets.AZURE_E2E_TENANT_ID }}
|
azureTenant: ${{ secrets.AZURE_E2E_TENANT_ID }}
|
||||||
|
2
.github/workflows/versionsapi.yml
vendored
2
.github/workflows/versionsapi.yml
vendored
@ -170,7 +170,7 @@ jobs:
|
|||||||
if: steps.check-rights.outputs.auth == 'true'
|
if: steps.check-rights.outputs.auth == 'true'
|
||||||
uses: ./.github/actions/login_gcp
|
uses: ./.github/actions/login_gcp
|
||||||
with:
|
with:
|
||||||
gcp_service_account_json: ${{ secrets.GCP_IMAGE_UPLOAD_SERVICE_ACCOUNT }}
|
service_account: "constellation-cos-builder@constellation-331613.iam.gserviceaccount.com"
|
||||||
|
|
||||||
- name: Execute versionsapi CLI
|
- name: Execute versionsapi CLI
|
||||||
id: run
|
id: run
|
||||||
|
Loading…
Reference in New Issue
Block a user