Skip to content

Commit

Permalink
chore: test on fork
Browse files Browse the repository at this point in the history
Signed-off-by: Case Wylie <[email protected]>
  • Loading branch information
cmwylie19 committed Mar 6, 2025
1 parent 81eaa98 commit c113eb7
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/actions/ironbank-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,24 @@ runs:
shell: bash
run: echo "PEPR=${GITHUB_WORKSPACE}/pepr" >> "$GITHUB_ENV"

- name: Clone Pepr Excellent Examples
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: defenseunicorns/pepr-excellent-examples
path: pepr-excellent-examples

- name: "set env: PEPR_EXCELLENT_EXAMPLES_PATH"
shell: bash
run: echo "PEPR_EXCELLENT_EXAMPLES_PATH=${GITHUB_WORKSPACE}/pepr-excellent-examples" >> "$GITHUB_ENV"

- name: Clone Iron Bank Repo & Transfer Dockerfiles
shell: bash
run: |
git clone https://repo1.dso.mil/dsop/opensource/defenseunicorns/pepr/controller.git
cd controller
git checkout development
mv Dockerfile $PEPR/Dockefile.ironbank.amd
mv Dockerfile.arm $PEPR/Dockerfile.ironbank.arm
mv removeScript.js $PEPR/removeScript.js
- name: Install Pepr Dependencies
shell: bash
Expand All @@ -65,8 +75,8 @@ runs:
shell: bash
run: |
cd "$PEPR"
docker build -t pepr:amd -f Dockerfile.ironbank.amd .
docker build -t pepr:arm -f Dockerfile.ironbank.arm .
docker build --build-arg PEPR_BUILD_VERSION=dev pepr:amd -f Dockerfile.ironbank.amd .
docker build --build-arg PEPR_BUILD_VERSION=dev -t pepr:arm -f Dockerfile.ironbank.arm .
- name: Import Pepr Iron Bank Images into K3d cluster
shell: bash
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/pepr-excellent-examples-ironbank-amd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: E2E - Pepr Excellent Examples - IronBank AMD Image

permissions:
contents: read

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *' # 2AM EST/11PM PST

jobs:
setup:
name: controller image
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.create-matrix.outputs.matrix }}
steps:
- name: Environment setup
uses: ./.github/ironbank-actions/setup
with:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}

- name: create matrix
run: |
matrix=$(
node "$PEPR/.github/workflows/pepr-excellent-examples-matrix.js" "$PEPR_EXCELLENT_EXAMPLES_PATH"
)
echo "matrix=${matrix}" >> "$GITHUB_OUTPUT"
id: create-matrix

- name: run e2e tests
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 6
command: |
cd "$PEPR_EXCELLENT_EXAMPLES_PATH"
npm run --workspace=${{ matrix.name }} test:e2e -- \
--image pepr:amd \
--custom-package ../pepr-0.0.0-development.tgz
- name: upload artifacts (troubleshooting)
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
if: always()
with:
name: "troubleshooting_logs_${{matrix.name}}"
path: |
pepr-excellent-examples/package.json
pepr-excellent-examples/package-lock.json
if-no-files-found: error
retention-days: 1

54 changes: 54 additions & 0 deletions .github/workflows/pepr-excellent-examples-ironbank-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: E2E - Pepr Excellent Examples - IronBank ARM Image

permissions:
contents: read

on:
workflow_dispatch:
schedule:
- cron: '0 5 * * *' # 1AM EST/10PM PST

jobs:
setup:
name: controller image
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.create-matrix.outputs.matrix }}
steps:
- name: Environment setup
uses: ./.github/ironbank-actions/setup
with:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}

- name: create matrix
run: |
matrix=$(
node "$PEPR/.github/workflows/pepr-excellent-examples-matrix.js" "$PEPR_EXCELLENT_EXAMPLES_PATH"
)
echo "matrix=${matrix}" >> "$GITHUB_OUTPUT"
id: create-matrix

- name: run e2e tests
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 6
command: |
cd "$PEPR_EXCELLENT_EXAMPLES_PATH"
npm run --workspace=${{ matrix.name }} test:e2e -- \
--image pepr:arm \
--custom-package ../pepr-0.0.0-development.tgz
- name: upload artifacts (troubleshooting)
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
if: always()
with:
name: "troubleshooting_logs_${{matrix.name}}"
path: |
pepr-excellent-examples/package.json
pepr-excellent-examples/package-lock.json
if-no-files-found: error
retention-days: 1

0 comments on commit c113eb7

Please sign in to comment.