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

Devsecops/matts/workflow fixes #17186

Merged
merged 6 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/actions/azviz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ inputs:
```yml
jobs:
generate-viz:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Login to Azure
uses: azure/login@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/checksum-validate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
jobs:
generate-checksums:
name: Generate checksum
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

Expand All @@ -34,7 +34,7 @@ jobs:
name: Validate checksum
needs:
- generate-checksums
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/connect-ovpn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ example.

```yml
connect-open-vpn:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Open VPN
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/reliable-pull-request/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04]
os: [ubuntu-latest]
steps:
- name: Checkout the repo
uses: actions/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/remote-branch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
jobs:
create-branch-action:
name: Create branch
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand All @@ -27,7 +27,7 @@ jobs:
jobs:
create-branch-action:
name: Create branch
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand All @@ -51,7 +51,7 @@ jobs:
jobs:
create-branch-action:
name: Create branch
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ updates:
directory: "/frontend-react"
schedule:
interval: "weekly"
versioning-strategy: increase-if-necessary

# slack-boltjs-app (chatops)
- package-ecosystem: "gitsubmodule"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/StaleItemsReport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
alert_stale_items:
name: Alert on Stale items in github
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Check Out Changes
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
Expand Down Expand Up @@ -67,8 +67,8 @@ jobs:
message: |
${{ steps.stale_out.outputs.MESSAGE_RESPONSE }}
icon-emoji: ':hourglass_flowing_sand:'
channel: prime-reportstream-engineering
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: cdc-reportstream-bot-notifications
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }}
color: warning
slackify-markdown: true

Expand All @@ -80,7 +80,7 @@ jobs:
message: |
${{ steps.stale_out.outputs.MESSAGE_ISSUES_RESPONSE }}
icon-emoji: ':hourglass_flowing_sand:'
channel: prime-reportstream-engineering
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: cdc-reportstream-bot-notifications
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }}
color: warning
slackify-markdown: true
2 changes: 1 addition & 1 deletion .github/workflows/alert_MBUsers_Inactive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
alert_version_upgrade:
name: Alert about Metabase Inactive users
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Check Out Changes
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/alert_PD_schedule_Slack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ on:

env:
channel: cdc-reportstream-bot-notifications
# Updated Slack Channel
jobs:
pre_job:
name: Pre Job
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
outputs:
IsMonday: ${{ steps.IsMonday.outputs.IsMonday }}
WeekDay: ${{ steps.WeekDay.outputs.IsWeekDay }}
Expand All @@ -34,7 +33,7 @@ jobs:
name: PD Alert for Monday
needs: pre_job
if: ${{ needs.pre_job.outputs.IsMonday == 'true' }}
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Check Out Changes
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
Expand Down Expand Up @@ -89,7 +88,7 @@ jobs:
name: PD Alert for WeekDays
needs: pre_job
if: ${{ needs.pre_job.outputs.WeekDay == 'true' }}
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Check Out Changes
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
Expand Down Expand Up @@ -135,3 +134,4 @@ jobs:
channel: ${{ env.channel }}
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }}
color: good

2 changes: 1 addition & 1 deletion .github/workflows/alert_cert_expire.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

jobs:
check-certificates:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Check Out Changes
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/alert_resource_costs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
rg: [prime-data-hub-demo1, prime-data-hub-demo2, prime-data-hub-demo3]
runs-on: ubuntu-24.04
runs-on: ubuntu-latest

steps:
- name: Check out changes
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/alert_stale_branches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
alert_stale_branches:
name: Alert on Stale branches
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Check Out Changes
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
Expand All @@ -30,6 +30,6 @@ jobs:
Merged ${{ steps.counts.outputs.MERGE_COUNT }}
Not Merged ${{ steps.counts.outputs.NOT_MERGE_COUNT }}
icon-emoji: ':bell:'
channel: temp_branch_dump
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: cdc-reportstream-bot-notifications
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }}
color: warning
5 changes: 2 additions & 3 deletions .github/workflows/alert_terraform_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
env: [staging, prod]
environment: ${{ matrix.env }}
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Check Out Changes
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
Expand Down Expand Up @@ -66,6 +66,5 @@ jobs:
icon-emoji: ':bell:'
channel: cdc-reportstream-bot-notifications
# Updated Slack channel
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }} # Updated webhook secret
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }}
color: warning
6 changes: 3 additions & 3 deletions .github/workflows/alert_version_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
alert_version_upgrade:
name: Alert on Version upgrade
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Check Out Changes
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
"Staging Metabase Version": "${{ env.Schedules_UpgradeDetails_0_StgVersion }}"
"Production Metabase Version": "${{ env.Schedules_UpgradeDetails_0_PrdVersion }}"
icon-emoji: ':bell:'
channel: prime-devops
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: cdc-reportstream-bot-notifications
webhook-url: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }}
color: warning

4 changes: 2 additions & 2 deletions .github/workflows/build_frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:
jobs:
pre_job:
name: Pre Job
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
outputs:
# Should not run for PRs (except deployment)
is_permitted: ${{ steps.build_vars.outputs.has_frontend_change == 'true' && (github.event_name != 'pull_request' || steps.build_vars.outputs.is_deployment_pr == 'true') }}
Expand All @@ -38,7 +38,7 @@ jobs:
name: Build Frontend React
needs: pre_job
if: needs.pre_job.outputs.is_permitted == 'true'
runs-on: ubuntu-24.04
runs-on: ubuntu-latest

defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env:
jobs:
pre_job:
name: Pre Job
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
outputs:
has_router_change: ${{ steps.build_vars.outputs.has_router_change }}
steps:
Expand All @@ -38,7 +38,7 @@ jobs:

build_router:
name: Build Router
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
needs: pre_job
if: ${{ needs.pre_job.outputs.has_router_change == 'true' }}
defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cleanup_acr_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

jobs:
cleanup_images:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
analyze:
name: Analyze
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions:
pull-requests: write
jobs:
dependency-review:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
Expand Down
51 changes: 22 additions & 29 deletions .github/workflows/deploy_terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ needs.pre_job.outputs.env_name }}
cancel-in-progress: true
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
outputs:
env_name: ${{ steps.build_vars.outputs.env_name }}
tf_change: ${{ steps.build_vars.outputs.has_terraform_change }}
Expand All @@ -37,7 +37,7 @@ jobs:
needs:
- pre_job
environment: ${{ needs.pre_job.outputs.env_name }}
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
outputs:
change_count: ${{ steps.stats1.outputs.change-count }}
steps:
Expand All @@ -60,42 +60,36 @@ jobs:
terraform-directory: operations/app/terraform/vars/${{ needs.pre_job.outputs.env_name }}
terraform-version: 1.7.4
add-args: "-refresh=false"

- name: Terraform Format
- name: Terraform Format
# fails on formatting issues, fix locally with `tf fmt -recursive` and push again if this step fails
run: terraform fmt -check -recursive

- name: "Terraform init"
- name: Terraform Init
run: terraform init -input=false

- name: "Terraform validate"
- name: Terraform Validate
run: terraform validate

- name: Terraform Plan
run: |
terraform plan -out=tf.plan -input=false -no-color -lock-timeout=600s
run: terraform plan -out=tf.plan -input=false -no-color -lock-timeout=600s
- name: Comment Plan on PR
uses: blinqas/tf-plan-pr-comment@v1
with:
output_file: ${{ github.workspace }}/plan_output.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
approve_deploy:
name: Approve Deploy - ${{ needs.pre_job.outputs.env_name }}
concurrency:
group: ${{ github.workflow }}-${{ needs.pre_job.outputs.env_name }}
cancel-in-progress: true
needs:
- pre_job
- confirm_changes
if: needs.confirm_changes.outputs.change_count > '0'
runs-on: ubuntu-24.04
environment: ${{ needs.pre_job.outputs.env_name }}_terraform
steps:
- name: Echo change count
run: echo ${{ needs.confirm_changes.outputs.change_count }}

approve_deploy:
name: Approve Deploy - ${{ needs.pre_job.outputs.env_name }}
concurrency:
group: ${{ github.workflow }}-${{ needs.pre_job.outputs.env_name }}
cancel-in-progress: true
needs:
- pre_job
- confirm_changes
if: needs.confirm_changes.outputs.change_count > '0'
runs-on: ubuntu-latest
environment: ${{ needs.pre_job.outputs.env_name }}_terraform
steps:
- name: Echo change count
run: echo ${{ needs.confirm_changes.outputs.change_count }}

run_deploy:
name: Run Deploy - ${{ needs.pre_job.outputs.env_name }}
Expand All @@ -106,7 +100,7 @@ jobs:
- pre_job
- approve_deploy
if: needs.confirm_changes.outputs.change_count > '0'
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
environment: ${{ needs.pre_job.outputs.env_name }}
defaults:
run:
Expand Down Expand Up @@ -136,4 +130,3 @@ jobs:
terraform fmt -recursive
terraform plan -out ${{ needs.pre_job.outputs.env_name }}-tf.plan
terraform apply -input=false -no-color -lock-timeout=600s -auto-approve ${{ needs.pre_job.outputs.env_name }}-tf.plan
#THIS IS JUST A COMMENT FOR THE COMMIT TO TAKE ACTION
2 changes: 1 addition & 1 deletion .github/workflows/deployment_rollback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

jobs:
DeployToCandidateSlot:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
env:
ALLOWED_USERS: "devopsmatt,emvaldes,scott-aquia,bethbeza"

Expand Down
Loading
Loading