feat: added scripts to run playbook #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Testing | ||
on: | ||
push: | ||
jobs: | ||
docker-build: | ||
name: Tagged Docker release to Google Artifact Registry | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
steps: | ||
- id: checkout | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- id: commit | ||
uses: prompt/actions-commit-hash@v3 | ||
- id: auth | ||
name: Authenticate with Google Cloud | ||
uses: google-github-actions/auth@v0 | ||
with: | ||
token_format: access_token | ||
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_POOL_PROVIDER_NAME }} | ||
service_account: ${{ secrets.SVC_ACCOUNT_EMAIL }} | ||
access_token_lifetime: 300s | ||
- name: Login to Artifact Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ secrets.GCP_REGION }}-docker.pkg.dev | ||
username: oauth2accesstoken | ||
password: ${{ steps.auth.outputs.access_token }} | ||
- id: docker-push-tagged | ||
name: Tag Docker image and push to Google Artifact Registry | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: | | ||
${{ secrets.GCP_REGION }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_GAR_REPO }}/ansible-helm-apigee-hybrid-deployer:${{ steps.commit.outputs.short }} | ||
${{ secrets.GCP_REGION }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_GAR_REPO }}/ansible-helm-apigee-hybrid-deployer:latest | ||
deploy-control-plane: | ||
name: Deploy Apigee Hybrid Control Plane | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
steps: | ||
- id: checkout | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- id: auth | ||
name: Authenticate with Google Cloud | ||
uses: google-github-actions/auth@v0 | ||
with: | ||
token_format: access_token | ||
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_POOL_PROVIDER_NAME }} | ||
service_account: ${{ secrets.SVC_ACCOUNT_EMAIL }} | ||
access_token_lifetime: 300s | ||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v2 | ||
with: | ||
terraform_version: 1.5.2 | ||
terraform_wrapper: false | ||
- name: Run Terraform | ||
id: init | ||
run: | | ||
bash deploy_terraform.sh ${{ github.workspace }}/test/terraform/control-plane | ||
shell: bash | ||
working-directory: ./test/scripts | ||
env: | ||
TF_BACKEND_BUCKET: ${{ secrets.TF_BACKEND_BUCKET }} | ||
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
GCP_REGION: ${{ secrets.GCP_REGION }} | ||
deploy-runtime-plane-gke: | ||
name: Deploy Apigee Hybrid Runtime GKE Platform | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
steps: | ||
- id: checkout | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- id: auth | ||
name: Authenticate with Google Cloud | ||
uses: google-github-actions/auth@v0 | ||
with: | ||
token_format: access_token | ||
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_POOL_PROVIDER_NAME }} | ||
service_account: ${{ secrets.SVC_ACCOUNT_EMAIL }} | ||
access_token_lifetime: 300s | ||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v2 | ||
with: | ||
terraform_version: 1.5.2 | ||
terraform_wrapper: false | ||
- name: Run Terraform | ||
id: init | ||
run: | | ||
bash deploy_terraform.sh ${{ github.workspace }}/test/terraform/runtime-plane-gke | ||
shell: bash | ||
working-directory: ./test/scripts | ||
env: | ||
TF_BACKEND_BUCKET: ${{ secrets.TF_BACKEND_BUCKET }} | ||
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
GCP_REGION: ${{ secrets.GCP_REGION }} | ||
deploy-runtime-plane: | ||
name: Deploy Apigee Hybrid Runtime GKE Platform | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' | ||
needs: | ||
- docker-build | ||
- deploy-runtime-plane-gke | ||
- deploy-control-plane | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
steps: | ||
- id: checkout | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- id: commit | ||
uses: prompt/actions-commit-hash@v3 | ||
- id: auth | ||
name: Authenticate with Google Cloud | ||
uses: google-github-actions/auth@v0 | ||
with: | ||
token_format: access_token | ||
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_POOL_PROVIDER_NAME }} | ||
service_account: ${{ secrets.SVC_ACCOUNT_EMAIL }} | ||
access_token_lifetime: 300s | ||
create_credentials_file: true | ||
- name: Login to Artifact Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ secrets.GCP_REGION }}-docker.pkg.dev | ||
username: oauth2accesstoken | ||
password: ${{ steps.auth.outputs.access_token }} | ||
- name: Run Terraform | ||
id: init | ||
run: | | ||
bash | ||
shell: bash run_playbook.sh \ | ||
Check failure on line 165 in .github/workflows/testing.yml GitHub Actions / E2E TestingInvalid workflow file
|
||
${{ github.workspace }} \ | ||
${{ steps.commit.outputs.short }} | ||
working-directory: ./test/scripts | ||
env: | ||
TF_BACKEND_BUCKET: ${{ secrets.TF_BACKEND_BUCKET }} | ||
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
GCP_REGION: ${{ secrets.GCP_REGION }} | ||
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }} |