Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WX-983 Prototype Azure e2e workflow test #7202

Draft
wants to merge 24 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fdca4a2
WX-983 initial skeleton of workflow, checking if test call works and …
JVThomas Aug 14, 2023
27b4031
WX-983 fully commented out github context action
JVThomas Aug 14, 2023
5445798
WX-983 updated branch ref to point to testing/ticket branch
JVThomas Aug 14, 2023
69914ca
WX-983 swapping workflow_dispatch for push just to test workflow skel…
JVThomas Aug 14, 2023
474f485
WX-983 additional workflow updates
JVThomas Aug 22, 2023
cca2f44
WX-983 added basic e2e script, updated workflow script, need to test
JVThomas Aug 28, 2023
3cfd3ad
WX-983 adjusted print statement
JVThomas Aug 28, 2023
98031a3
WX-983 added branches attribute to workflow file
JVThomas Aug 28, 2023
ce6a0e9
WX-983 removed old comments, added push attribute
JVThomas Aug 28, 2023
98b9786
WX-983 added needs attribute to create-bee step, input reference update
JVThomas Aug 28, 2023
49ced65
WX-983 removed push attribute, changed needs and if conditions on som…
JVThomas Aug 29, 2023
82f6904
WX-983 syntax corrections, removed invalid branches attribute
JVThomas Aug 29, 2023
06596c1
WX-983 updates to env and action input variables
JVThomas Aug 29, 2023
d9b135f
WX-983 masked echoed token, step rearrangement, gitignore update
JVThomas Aug 29, 2023
1987a6f
WX-983 adjustments to variable assignment, sleep calls in workflow an…
JVThomas Sep 6, 2023
fd98f28
WX-983 minor updates
JVThomas Sep 11, 2023
a111fa9
WX-983 ref updates, use dev for bee template testing
JVThomas Sep 11, 2023
3dbd77f
WX-983 json correction, env variable renaming, still debugging workflow
JVThomas Sep 12, 2023
e5bb442
WX-983 added if conditional to attach step to check on access_token
JVThomas Sep 12, 2023
4ea80f6
WX-983 updated workflow to match new expectations from terra-github-w…
JVThomas Sep 12, 2023
e5f0b10
WX-983 adding always() condition to see if cleanup jobs still run on …
JVThomas Sep 15, 2023
970d24d
WX-983 going to just use always() just to test if condition
JVThomas Sep 15, 2023
b1f0276
WX-983 added missing comma
JVThomas Sep 15, 2023
06f7724
WX-983 path correction on workflow
JVThomas Sep 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WX-983 updates to env and action input variables
JVThomas committed Aug 29, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 06596c1aee02a06b779cbf4a16f025051bfa9377
42 changes: 9 additions & 33 deletions .github/workflows/run_workflow.yml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ on:
type: string
# Replace user data with seeded data provided by devOps (once available)
owner-subject:
description: 'User who will be submitting workflow'
description: 'Owner of billing project'
required: true
default: '[email protected]'
type: string
@@ -23,36 +23,11 @@ on:
required: true
default: 'profile, email, openid'
type: string
tenant-id:
description: 'Azure tenant ID. The default tenant is DSP Terra Dev'
required: true
# Swap with devOps provided tenant ID when available
default: 'fad90753-2022-4456-9b0a-c7e5b934e408'
type: string
subscription-id:
description: 'Azure subscription ID'
required: true
# Update this with the static variable provided by devOps (once it's available)
default: 'f557c728-871d-408c-a28b-eb6b2141a087'
type: string
mrg-id:
# Update this with the static variable devOps provides (when available)
description: 'Azure Managed Resource Group name. The default is staticTestingMrg within subscription 8201558-dsp-azure-testing.'
required: true
default: 'staticTestingMrg'
type: string
landing-zone-id:
description: 'Landing Zone ID. An existing LZID tag within a given MRG.'
required: true
# NOTE: LZs are deleted and recreated after a couple of days, need to figure out a way to get this dynamically
# Might not be an issue. DevOps is working on getting static Landing Zones up and running
# Update this with the static value from devOps (once available)
default: 'f41c1a97-179b-4a18-9615-5214d79ba600'
type: string

env:
BEE_NAME: '${{ github.event.repository.name }}-${{ github.run_id }}-${{ github.run_attempt}}-dev'
TOKEN: '${{ secrets.BROADBOT_GITHUB_TOKEN }}' # github token for access to kick off a job in the private repo
RUN_NAME_SUFFIX: '${{ github.event.repository.name }}-${{ github.run_id }}-${{ github.run_attempt }}'

jobs:
init-github-context:
@@ -108,16 +83,12 @@ jobs:
access_token_scopes: ${{ inputs.access-token-scopes }}
access_token_subject: ${{ inputs.owner-subject }}
export_environment_variables: false

# UPDATE: may not need this either if DevOps provides a static billing project, landing zone, and resource group.
- name: Generate a random billing project name
id: 'gen'
run: |
project_name=$(echo "tmp-billing-project-$(uuidgen)" | cut -c -30)
echo "project_name=${project_name}" >> $GITHUB_OUTPUT

# NOTE: Ivan is currently building out a workflow to handle this
# Should I wait or move forward with my own implementation?
attach-landing-zone-to-bee-workflow:
runs-on: ubuntu-latest
needs: [az-e2e-params-gen, create-bee-workflow]
@@ -133,9 +104,14 @@ jobs:
with:
workflow: attach-landing-zone-to-bee.yaml
repo: broadinstitute/terra-github-workflows
ref: refs/heads/iv-az-e2e-1
token: ${{ env.TOKEN }}
# NOTE: Replace these values with devOps' static values
inputs: '{ "bee-name": "${{ env.BEE_NAME }}", "billing-project": "${{ needs.az-e2e-params-gen.outputs.project-name }}", "tenant-id": "${{ inputs.tenant-id }}", "subscription-id": "${{ inputs.subscription-id }}", "mrg-id": "${{ inputs.mrg-id }}", "landing-zone-id": "${{ inputs.landing-zone-id }}", "billing-project-creator": "${{ inputs.owner-subject }}", "service-account": "${{ inputs.service-account }}" }'
inputs: '{
"bee-name": "${{ env.BEE_NAME }}",
"run-name": "attach-landing-zone-to-bee-${{env.RUN_NAME_SUFFIX}}"
"billing-project": "${{ needs.az-e2e-params-gen.outputs.project-name }}",
"billing-project-creator": "${{ inputs.owner-subject }}",
"service-account": "${{ inputs.service-account }}" }'

run-cromwell-az-e2e:
runs-on: ubuntu-latest