-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using bowlby to simplify artifact service (#940)
* Using bowlby to simplify artifact service * added healthcheck action * Added static report job
- Loading branch information
1 parent
467b533
commit c60770b
Showing
5 changed files
with
112 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This workflow hits an endpoint of our bowlby instance and fails if we don't get a success response | ||
# This confirms that | ||
# * The OCI instance is still running | ||
# * The https cert is still good | ||
# * The github api token is still good | ||
|
||
name: health | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 8 * * *' | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check the deployed service URL | ||
uses: jtalk/url-health-check-action@v4 | ||
with: | ||
url: https://bowlby.flowty.dev/flow/latest/Mastercard/flow/test.yml | ||
max-attempts: 3 | ||
retry-delay: 5s | ||
retry-all: true |
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 was deleted.
Oops, something went wrong.
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,73 @@ | ||
# This workflow runs the tests and then dumps the flow reports into our pages branch. | ||
# While we like using bowlby to serve artifacts, it relies on a bunch of perishable | ||
# stuff like an OCI instance, SSL certs and an API token. If any of those go wrong | ||
# we still want to have a working demo of the execution reports. | ||
|
||
# Hence this manually-invoked job that dumps a set of reports onto our pages branch | ||
# We can run this whenever something noteworthy changes in the reports and have | ||
# confidence that we'll always have a report to link to in our documentation. | ||
|
||
name: static artifacts | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: # added using https://github.com/step-security/secure-workflows | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | ||
with: | ||
node-version: '14.15.1' | ||
cache: 'npm' | ||
cache-dependency-path: report/report-ng/package-lock.json | ||
|
||
- name: Build with Maven | ||
run: mvn -B -Dnode=system package | ||
|
||
- name: Save flow execution reports | ||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | ||
id: upload_flow | ||
with: | ||
name: flow_execution_reports | ||
path: 'example/**/target/mctf/latest' | ||
|
||
publish: | ||
permissions: | ||
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo | ||
needs: build | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
concurrency: pages_branch | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
ref: slim_pages | ||
|
||
- name: Delete old content | ||
run: rm -rf static | ||
|
||
- name: Download flow reports | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
with: | ||
name: flow_execution_reports | ||
path: static | ||
|
||
- name: Commit | ||
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1 | ||
with: | ||
branch: slim_pages |
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