-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into sampling-container
- Loading branch information
Showing
142 changed files
with
3,271 additions
and
434 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Custom Linter | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, ready_for_review] | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
# OpenAPI request bodies should contain the property `required` and be set to true | ||
# | ||
# // Valid (request body required) | ||
# | ||
# requestBody: { | ||
# required: true, | ||
# content: {} | ||
# } | ||
# | ||
# // Invalid (request body not required) | ||
# | ||
# requestBody: { | ||
# content: {} | ||
# } | ||
# | ||
openApiRequiredRequestBody: | ||
name: OpenAPI requestBody missing required:true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Find schemas with optional request bodies | ||
run: | | ||
# For OpenAPI schemas, find all request bodies that don't have `required:true` | ||
# | ||
# Find all non-test files in apr/src/paths | ||
# Find all request bodies that don't contain required:true property | ||
# Print to stdout line num + filename and return exit code | ||
find api/src/paths -type f ! -name '*.test.ts' -exec \ | ||
awk ' | ||
BEGIN {found=0} | ||
/requestBody:/ {found=1} | ||
/required: true/ {found=0} | ||
/content:/ { | ||
if (found) print "line: " NR, FILENAME; | ||
found=0; | ||
} | ||
' {} \; \ | ||
| grep . && exit 1 || exit 0 | ||
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
# Switch to Draft | ||
# Scales down running PODS when switching to Draft | ||
name: Draft Scale Down | ||
|
||
on: | ||
pull_request: | ||
types: [converted_to_draft] | ||
|
||
jobs: | ||
scaleDownPods: | ||
name: Scale down the pods for this PR | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
steps: | ||
# Log in to OpenShift. | ||
# Note: The secrets needed to log in are NOT available if the PR comes from a FORK. | ||
# PR's must originate from a branch off the original repo or else all openshift `oc` commands will fail. | ||
- name: Log in to OpenShift | ||
run: oc login --token=${{ secrets.TOOLS_SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 | ||
|
||
- name: Scale down | ||
run: oc get deploymentconfig --namespace af2668-dev --selector env-id=$PR_NUMBER -o name | awk '{print "oc scale --replicas=0 " $1}' | bash | ||
# Switch to Draft | ||
# Scales down running PODS when switching to Draft | ||
name: Draft Scale Down | ||
|
||
on: | ||
pull_request: | ||
types: [converted_to_draft] | ||
|
||
jobs: | ||
scaleDownPods: | ||
name: Scale down the pods for this PR | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
steps: | ||
# Install oc, which was removed from the ubuntu-latest image in v24.04 | ||
- name: Install OpenShift CLI tools | ||
uses: redhat-actions/openshift-tools-installer@v1 | ||
with: | ||
oc: "4.14" | ||
|
||
# Log in to OpenShift. | ||
# Note: The secrets needed to log in are NOT available if the PR comes from a FORK. | ||
# PR's must originate from a branch off the original repo or else all openshift `oc` commands will fail. | ||
- name: Log in to OpenShift | ||
run: oc login --token=${{ secrets.TOOLS_SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 | ||
|
||
- name: Scale down | ||
run: oc get deploymentconfig --namespace af2668-dev --selector env-id=$PR_NUMBER -o name | awk '{print "oc scale --replicas=0 " $1}' | bash |
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
Oops, something went wrong.