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

WE-19955 - Adding runs-on and deploy-label #239

Merged
merged 1 commit into from
Oct 27, 2023
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
8 changes: 7 additions & 1 deletion .github/workflows/im-reusable-finish-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# setup-deployment-workflow:
# uses: im-practices/.github/.github/workflows/im-reusable-finish-build-workflow.yml@v2
# with:
# runs-on: im-linux
# next-version: ${{ needs.build-deployment-artifacts.outputs.NEXT_VERSION }}
# title-of-teams-post: 'My CI Build'
# is-merge-to-main: ${{ needs.examine-triggers.outputs.IS_MERGE_TO_MAIN }}
Expand All @@ -32,6 +33,11 @@
on:
workflow_call:
inputs:
runs-on:
description: 'The runner that this workflow will run on.'
required: false
type: string
default: 'im-linux'
Comment on lines +36 to +40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious what the rationale behind this change is. I'm not opposed to it but these are all pretty straightforward tasks so running on different runners shouldn't be a necessity. The im-linux runners have recently had their max number bumped so we shouldn't be running out of those runners when these builds come up.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...I guess what I'm asking is, do we have a different problem we need to address?

Copy link
Contributor Author

@jsclifford jsclifford Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have seen these wait on the im-linux runner far longer than my custom runners. This change will not affect any current workflows. I was going to fork your reusable workflows to change the runners, but this is far better. I think having the option to change the runner will have better adoption. The default is still im-linux. My team and other teams would like to have the option to change the runner.

next-version:
description: The next generated version
type: string
Expand Down Expand Up @@ -72,7 +78,7 @@ on:

jobs:
finish-build:
runs-on: im-linux
runs-on: ${{ inputs.runs-on }}

steps:
- uses: im-open/[email protected]
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/im-reusable-finish-deployment-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# finish-deployment-workflow:
# uses: im-practices/.github/.github/workflows/im-reusable-finish-deployment-workflow.yml@v2
# with:
# runs-on: im-linux
# gh-secrets-environment: ${{ inputs.environment-or-target }}
# deployment-environment: ${{ needs.set-vars.outputs.GH_SECRETS_ENVIRONMENT}}
# release-tag: ${{ inputs.tag }}
Expand Down Expand Up @@ -52,6 +53,11 @@ on:
required: true
type: string
# Optional Inputs
runs-on:
description: 'The runner that this workflow will run on.'
required: false
type: string
default: 'im-linux'
post-status-in-deployment-notifications-channel:
description: 'Flag indicating whether a post should be made to the Deployment Notifications channel.'
required: false
Expand All @@ -72,6 +78,11 @@ on:
required: false
type: string
default: ''
deployable-label:
description: 'Deployment board additional label for delete, destroy, or custom label.'
required: false
type: string
default: null
custom-facts-for-team-channel:
description: The custom facts that will be included in the post in the team's channel. By default Workflow, Run, Actor and Version are included.
required: false
Expand All @@ -90,7 +101,7 @@ on:

jobs:
finish-deployment-workflow:
runs-on: im-linux
runs-on: ${{ inputs.runs-on }}
environment: ${{ inputs.gh-secrets-environment }}
steps:
- uses: im-open/[email protected]
Expand All @@ -100,14 +111,15 @@ jobs:

- name: Update deployment board
if: always()
uses: im-open/update-deployment-board@v1.5
uses: im-open/update-deployment-board@v1.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
environment: ${{ inputs.deployment-environment }}
board-number: ${{ inputs.deployment-board-number }}
ref: ${{ inputs.release-tag }}
ref-type: 'tag'
deployable-type: ${{ inputs.deployable-type }}
deploy-label: ${{ inputs.deployable-label }}
deploy-status: ${{ steps.conclusion.outputs.workflow_conclusion }}
timezone: ${{ inputs.timezone }}

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/im-reusable-setup-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
on:
workflow_call:
inputs:
runs-on:
description: 'The runner that this workflow will run on.'
required: false
type: string
default: 'im-linux'
default-branch:
description: Default branch of which contains the tag
required: false
Expand Down Expand Up @@ -62,7 +67,7 @@ on:

jobs:
setup-build-workflow:
runs-on: im-linux
runs-on: ${{ inputs.runs-on }}

outputs:
CONTINUE_WORKFLOW: ${{ steps.set-vars.outputs.CONTINUE_WORKFLOW }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# setup-deployment-workflow:
# uses: im-practices/.github/.github/workflows/im-reusable-setup-deployment-workflow.yml@v2
# with:
# runs-on: im-linux
# ref-to-deploy: v1.2.3
# deployment-environment: prod
# production-environments: 'prod,prod-secondary'
Expand All @@ -17,6 +18,11 @@
on:
workflow_call:
inputs:
runs-on:
description: 'The runner that this workflow will run on.'
required: false
type: string
default: 'im-linux'
ref-to-deploy:
description: The branch, tag or sha that will be deployed.
type: string
Expand Down Expand Up @@ -47,7 +53,7 @@ on:

jobs:
setup-deployment-workflow:
runs-on: im-linux
runs-on: ${{ inputs.runs-on}}

steps:
- name: Construct Workflow Summary
Expand Down