Skip to content

Commit 232c256

Browse files
authoredJan 21, 2024
feat: add Zarf Flavors to support Iron Bank & upstream images (#63)
Adds zarf flavors for upstream images and IB. Includes refactoring of zarf packages using composability to cleanup the config and keep things dry and refactoring of the values files to image flavors specific + common. Both flavors deploy successfully on their respective architectures. On arm64 (or at least darwin arm64) when using the registry1(x86) flavor it fails at metrics server regarding the istio init container, which seems to be an issue [emulating x86 on mac](istio/istio#36762 (comment)).
1 parent 942ad54 commit 232c256

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1048
-405
lines changed
 

‎.github/actions/setup/action.yaml

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# action.yml
22
name: "Setup Environment"
33
description: "UDS Environment Setup"
4+
inputs:
5+
gh_token:
6+
description: 'GITHUB_TOKEN'
7+
required: true
8+
ib_user:
9+
description: 'IRON_BANK_ROBOT_USERNAME'
10+
required: true
11+
ib_password:
12+
description: 'IRON_BANK_ROBOT_PASSWORD'
13+
required: true
414

515
runs:
616
using: "composite"
@@ -27,4 +37,21 @@ runs:
2737
- name: Install UDS CLI
2838
shell: bash
2939
# renovate: datasource=github-tags depName=defenseunicorns/uds-cli versioning=semver
30-
run: brew install defenseunicorns/tap/uds@0.5.3
40+
run: brew install defenseunicorns/tap/uds@0.6.1
41+
42+
- name: Login to GHCR
43+
uses: docker/login-action@v3
44+
with:
45+
registry: ghcr.io
46+
username: dummy
47+
password: ${{ inputs.gh_token }}
48+
49+
# Retries intermittent registry1 login action
50+
- uses: Wandalen/wretry.action@v1
51+
with:
52+
attempt_limit: 3
53+
action: docker/login-action@v3
54+
with: |
55+
registry: registry1.dso.mil
56+
username: ${{ inputs.ib_user }}
57+
password: ${{ inputs.ib_password }}

‎.github/workflows/pull-request-conditionals.yaml

+38
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,32 @@ defaults:
1515
run:
1616
shell: bash -e -o pipefail {0} # Ensures that scripts fail on error and pipefail is set.
1717

18+
# Abort prior jobs in the same workflow / PR
19+
concurrency:
20+
group: test-${{ github.ref }}
21+
cancel-in-progress: true
22+
1823
jobs:
24+
lint-check:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Use Node.js latest
29+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
30+
with:
31+
node-version: 20
32+
- name: Set up Homebrew
33+
uses: Homebrew/actions/setup-homebrew@master
34+
- name: Install UDS CLI
35+
shell: bash
36+
# renovate: datasource=github-tags depName=defenseunicorns/uds-cli versioning=semver
37+
run: brew install defenseunicorns/tap/uds@0.6.1
38+
- name: Run Formatting Checks
39+
run: uds run lint-check
40+
1941
# This job checks if there are changes in specific paths source packages.
2042
check-paths:
43+
needs: lint-check
2144
runs-on: ubuntu-latest
2245
name: Select Jobs
2346
outputs:
@@ -41,7 +64,22 @@ jobs:
4164
strategy:
4265
matrix:
4366
package: ${{ fromJSON(needs.check-paths.outputs.packages) }}
67+
flavor: [upstream, registry1]
4468
uses: ./.github/workflows/test.yaml
4569
with:
4670
package: ${{ matrix.package }}
71+
flavor: ${{ matrix.flavor }}
72+
secrets: inherit # Inherits all secrets from the parent workflow.
73+
74+
# This job triggers a separate workflow for each flavor core package.
75+
run-package-upgrade-test:
76+
needs: check-paths
77+
name: Schedule
78+
strategy:
79+
matrix:
80+
package: [all]
81+
flavor: [upstream, registry1]
82+
uses: ./.github/workflows/test-upgrade.yaml
83+
with:
84+
flavor: ${{ matrix.flavor }}
4785
secrets: inherit # Inherits all secrets from the parent workflow.

0 commit comments

Comments
 (0)