Skip to content

Commit

Permalink
Fix linting issues in github actions (#1637)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirkamara authored Mar 31, 2022
1 parent 42f155b commit a1c0878
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 50 deletions.
34 changes: 17 additions & 17 deletions .github/actions/devcontainer_run_command/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,55 +47,55 @@ inputs:
required: true
API_CLIENT_ID:
description: "The API Client Id."
required: true
required: false
AAD_TENANT_ID:
description: "The Tenant Id where the App is registered and the Test User is registered for the E2E Tests."
required: true
required: false
TEST_APP_ID:
description: "The Test Application Id used to interact with the API."
required: true
required: false
TEST_ACCOUNT_CLIENT_ID:
description: "The Test Automation Account Client Id used to interact with the API."
required: true
required: false
TEST_ACCOUNT_CLIENT_SECRET:
description: "The Test Automation Account Client Secret used to interact with the API."
required: true
required: false
TEST_WORKSPACE_APP_ID:
description: "The Test Workspace Id used to interact with the API."
required: true
required: false
TRE_ID:
description: "The TRE Id."
required: true
required: false
TF_VAR_terraform_state_container_name:
description: "The name of the container to store the Terraform state."
required: true
required: false
TF_VAR_mgmt_resource_group_name:
description: "The resource group used to store the Terraform state."
required: true
required: false
TF_VAR_mgmt_storage_account_name:
description: "The storage account used to store the Terraform state."
required: true
required: false
TF_VAR_core_address_space:
description: "Core address space."
required: true
required: false
TF_VAR_tre_address_space:
description: "TRE address apace."
required: true
required: false
TF_VAR_swagger_ui_client_id:
description: "The Swagger UI Client ID."
required: true
required: false
TF_VAR_api_client_id:
description: "The API Client Id. (Same as Resource)"
required: true
required: false
TF_VAR_api_client_secret:
description: "The API Client Secret."
required: true
required: false
ACR_NAME:
description: "The Container Registry that holds our Research images."
required: true
required: false
LOCATION:
description: "The Azure Region (e.g. WestEurope)."
required: true
required: false
BUNDLE_TYPE:
description: "The Bundle type (workspace / Workspace-service / User Resource)."
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_docker_images.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Docker build

on:
on: # yamllint disable-line rule:truthy
pull_request:
branches: [main]
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Publish docs via Github Pages

on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches: [main]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean_validation_envs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Clean Validation Environments

on:
on: # yamllint disable-line rule:truthy
schedule:
# Every 2 hours
- cron: "0 */2 * * *"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
name: "CodeQL"

on:
on: # yamllint disable-line rule:truthy
push:
branches: [main]
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_tre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy Azure TRE
# This workflow is the integration build run for pushes to the main branch
# It also runs on a schedule, serving as the nightly build

on:
on: # yamllint disable-line rule:truthy
schedule:
# 1am each night https://crontab.guru/#0_1_*_*_*
- cron: "0 1 * * *"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_tre_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Deploy Azure TRE (branch)
# Note that the branch must be in the main repo as secrets are not passed
# to workflows run from forks

on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
runExtendedTests:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
echo "git SHA: $(git rev-parse --abbrev-ref HEAD)"
echo "git ref: $(git rev-parse HEAD)"
echo "github ref: ${GITHUB_REF}"
REFID=$(echo ${GITHUB_REF} | shasum | cut -c1-8)
REFID=$(echo "${GITHUB_REF}" | shasum | cut -c1-8)
echo "using id of: ${REFID} for GitHub Ref: ${GITHUB_REF}"
echo "::set-output name=refid::${REFID}"
Expand Down
39 changes: 32 additions & 7 deletions .github/workflows/deploy_tre_reusable.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Deploy Azure TRE Resuable

on:
on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
prRef:
Expand All @@ -23,58 +23,85 @@ on:
required: false
secrets:
AAD_TENANT_ID:
description: ""
required: true
ACR_NAME:
description: ""
required: true
ACTIONS_ACR_NAME:
description: ""
required: true
ACTIONS_ACR_URI:
description: ""
required: true
ACTIONS_ACR_PASSWORD:
description: ""
required: true
ACTIONS_DEVCONTAINER_TAG:
description: ""
required: true
API_CLIENT_ID:
description: ""
required: true
API_CLIENT_SECRET:
description: ""
required: true
ARM_CLIENT_ID:
description: ""
required: true
ARM_CLIENT_SECRET:
description: ""
required: true
ARM_SUBSCRIPTION_ID:
description: ""
required: true
ARM_TENANT_ID:
description: ""
required: true
CORE_ADDRESS_SPACE:
description: ""
required: true
LOCATION:
description: ""
required: true
MGMT_RESOURCE_GROUP:
description: ""
required: true
MS_TEAMS_WEBHOOK_URI:
description: ""
required: true
STATE_STORAGE_ACCOUNT_NAME:
description: ""
required: true
SWAGGER_UI_CLIENT_ID:
description: ""
required: true
TEST_APP_ID:
description: ""
required: true
TEST_WORKSPACE_APP_ID:
description: ""
required: true
TEST_ACCOUNT_CLIENT_ID:
description: ""
required: true
TEST_ACCOUNT_CLIENT_SECRET:
description: ""
required: true
TF_STATE_CONTAINER:
description: ""
required: true
TRE_ADDRESS_SPACE:
description: ""
required: true
TRE_ID:
description: ""
required: true
CI_CACHE_ACR_NAME:
description: ""
required: false
TF_LOG:
description: ""
required: false

# This will prevent multiple runs of this entire workflow.
Expand Down Expand Up @@ -116,7 +143,7 @@ jobs:
- name: Build new devcontainer
shell: bash
env:
DOCKER_BUILDKIT: 1
DOCKER_BUILDKIT: 1
run: |
set -e
USER_UID=$(id -u)
Expand Down Expand Up @@ -397,8 +424,7 @@ jobs:
strategy:
matrix:
include:
# bundles type can be inferred from the bundle
# dir (but this is more explicit)
# bundles type can be inferred from the bundle dir (but this is more explicit)
- {BUNDLE_TYPE: "workspace",
BUNDLE_DIR: "./templates/workspaces/base"}
- {BUNDLE_TYPE: "workspace",
Expand Down Expand Up @@ -481,8 +507,7 @@ jobs:
strategy:
matrix:
include:
# bundles type can be inferred from the bundle
# dir (but this is more explicit)
# bundles type can be inferred from the bundle dir (but this is more explicit)
- {BUNDLE_TYPE: "workspace",
BUNDLE_DIR: "./templates/workspaces/base"}
- {BUNDLE_TYPE: "workspace",
Expand Down Expand Up @@ -655,7 +680,7 @@ jobs:
- uses: technote-space/workflow-conclusion-action@v2

- name: Notify teams channel
if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure
if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure
uses: sachinkundu/[email protected]
with:
github-token: ${{ github.token }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: End to End Tests

on:
workflow_call:
on: # yamllint disable-line rule:truthy
# workflow_call:
workflow_dispatch:

jobs:
Expand All @@ -19,9 +19,9 @@ jobs:
- name: Run E2E Tests
uses: ./.github/actions/devcontainer_run_command
with:
DISPLAY_NAME: "Run E2E Tests (Smoke)"
COMMAND: "make test-e2e-smoke"
ACTIONS_ACR_NAME: ${{ secrets.ACTIONS_ACR_NAME }}
ACTIONS_ACR_URI: ${{ secrets.ACTIONS_ACR_NAME }}.azurecr.io/
ACTIONS_ACR_PASSWORD: ${{ secrets.ACTIONS_ACR_PASSWORD }}
ACTIONS_DEVCONTAINER_TAG: ${{ secrets.ACTIONS_DEVCONTAINER_TAG }}
ARM_TENANT_ID: "${{ secrets.ARM_TENANT_ID }}"
Expand Down Expand Up @@ -52,9 +52,9 @@ jobs:
- name: Run E2E Tests (Extended)
uses: ./.github/actions/devcontainer_run_command
with:
DISPLAY_NAME: "Run E2E Tests (Extended)"
COMMAND: "make test-e2e-extended"
ACTIONS_ACR_NAME: ${{ secrets.ACTIONS_ACR_NAME }}
ACTIONS_ACR_URI: ${{ secrets.ACTIONS_ACR_NAME }}.azurecr.io/
ACTIONS_ACR_PASSWORD: ${{ secrets.ACTIONS_ACR_PASSWORD }}
ACTIONS_DEVCONTAINER_TAG: ${{ secrets.ACTIONS_DEVCONTAINER_TAG }}
ARM_TENANT_ID: "${{ secrets.ARM_TENANT_ID }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flag_external_pr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flag_external_pr

on:
on: # yamllint disable-line rule:truthy
pull_request_target:
types: [opened] # only run on new PRs
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lets_encrypt.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Renew Lets Encrypt Certificates

on:
on: # yamllint disable-line rule:truthy
schedule:
# 3am each month https://crontab.guru/#0_3_1_*_*
- cron: "0 3 1 * *"
Expand All @@ -13,8 +13,8 @@ concurrency: letsencrypt

env:
USE_ENV_VARS_NOT_FILES: true
TF_INPUT: 0 # interactive is off
TF_IN_AUTOMATION: 1 # Run in headless mode
TF_INPUT: 0 # interactive is off
TF_IN_AUTOMATION: 1 # Run in headless mode

jobs:
renew_letsencrypt_certs:
Expand Down
Loading

0 comments on commit a1c0878

Please sign in to comment.