Skip to content

Commit

Permalink
feat: add upstream and unicorn flavors
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Kruggel committed Jul 25, 2024
1 parent 5525715 commit 21374a6
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-docs-shim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
flavor: [registry1]
flavor: [upstream, registry1, unicorn]
type: [install, upgrade]
steps:
- name: Shim for ${{ matrix.type }} ${{ matrix.flavor }}
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/tag-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
name: Publish package
strategy:
matrix:
flavor: [registry1]
flavor: [upstream, registry1, unicorn]

permissions:
contents: read
Expand All @@ -41,9 +41,24 @@ jobs:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}

# Determine repository to publish to
- name: Determine destination repository
id: repo
run: |
repo=ghcr.io/defenseunicorns/packages
# Publish unicorn flavor to private repository
if [ "${{ matrix.flavor }}" = "unicorn" ]; then
repo+=/private
fi
repo+=/uds
echo "repo=${repo}" >> "$GITHUB_OUTPUT"
echo "Publishing packages and bundles to ${repo}"
- name: Publish Package
run: uds run -f tasks/publish.yaml package --set FLAVOR=${{ matrix.flavor }}
run: uds run -f tasks/publish.yaml package --set FLAVOR=${{ matrix.flavor }} --set TARGET_REPO=${{ steps.repo.outputs.repo }} --no-progress

- name: Save logs
if: always()
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ concurrency:

permissions:
contents: read
id-token: write

jobs:
run-test:
Expand All @@ -38,7 +39,7 @@ jobs:
timeout-minutes: 25
strategy:
matrix:
flavor: [registry1]
flavor: [upstream, registry1, unicorn]
type: [install, upgrade]

steps:
Expand All @@ -51,6 +52,7 @@ jobs:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}

- name: Test
uses: defenseunicorns/uds-common/.github/actions/test@a7549ad75a9bbd8e71ce2236ec17c1e33ec4df61 # v0.8.1
Expand Down
11 changes: 1 addition & 10 deletions values/registry1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ controller:
image:
registry: "registry1.dso.mil"
repository: "ironbank/opensource/jenkins/jenkins"
tag: "2.452.3-lts"
tag: "2.469-jdk17"
sidecars:
configAutoReload:
image:
Expand All @@ -16,12 +16,3 @@ agent:
repository: "registry1.dso.mil/ironbank/opensource/jenkins/inbound-agent"
# -- Tag of the image to pull
tag: "3186.vc3b_7249b_87eb_-1"

helmtest:
# A testing framework for bash
bats:
# Bash Automated Testing System (BATS)
image:
registry: "registry1.dso.mil"
repository: "ironbank/opensource/bats/bats"
tag: "v1.10.0-ubi9"
18 changes: 18 additions & 0 deletions values/unicorn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
controller:
image:
registry: "cgr.dev"
repository: "du-uds-defenseunicorns/jenkins"
tag: "2.469"
sidecars:
configAutoReload:
image:
registry: "cgr.dev"
repository: "du-uds-defenseunicorns/k8s-sidecar"
tag: "1.27.5"

agent:
image:
# -- Repository to pull the agent jnlp image from
repository: "registry1.dso.mil/ironbank/opensource/jenkins/inbound-agent"
# -- Tag of the image to pull
tag: "3186.vc3b_7249b_87eb_-1"
18 changes: 18 additions & 0 deletions values/upstream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
controller:
image:
registry: "docker.io"
repository: "jenkins/jenkins"
tag: "2.469-jdk17"
sidecars:
configAutoReload:
image:
registry: "docker.io"
repository: "kiwigrid/k8s-sidecar"
tag: "1.27.5"

agent:
image:
# -- Repository to pull the agent jnlp image from
repository: "docker.io/jenkins/inbound-agent"
# -- Tag of the image to pull
tag: "3256.v88a_f6e922152-1"
42 changes: 40 additions & 2 deletions zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,26 @@ components:
description: "SSO secret for jenkins"
import:
path: common

# Note: upstream flavor is experimental
- name: jenkins
required: true
description: "Deploy jenkins with upstream images"
import:
path: common
only:
flavor: upstream
cluster:
architecture: amd64
charts:
- name: jenkins
valuesFiles:
- values/upstream.yaml
images:
- docker.io/jenkins/jenkins:2.469-jdk17
- docker.io/kiwigrid/k8s-sidecar:1.27.5
- docker.io/jenkins/inbound-agent:3256.v88a_f6e922152-1

- name: jenkins
required: true
description: "Deploy jenkins with registry1 images"
Expand All @@ -32,7 +52,25 @@ components:
valuesFiles:
- values/registry1.yaml
images:
- registry1.dso.mil/ironbank/opensource/jenkins/jenkins:2.452.3-lts
- registry1.dso.mil/ironbank/opensource/jenkins/jenkins:2.469-jdk17
- registry1.dso.mil/ironbank/opensource/jenkins/inbound-agent:3186.vc3b_7249b_87eb_-1
- registry1.dso.mil/ironbank/kiwigrid/k8s-sidecar:1.27.5
- registry1.dso.mil/ironbank/opensource/bats/bats:v1.10.0-ubi9

# Note: unicorn flavor is experimental
- name: jenkins
required: true
description: "Deploy jenkins with unicorn images"
import:
path: common
only:
flavor: unicorn
cluster:
architecture: amd64
charts:
- name: jenkins
valuesFiles:
- values/unicorn.yaml
images:
- cgr.dev/du-uds-defenseunicorns/jenkins:2.469
- registry1.dso.mil/ironbank/opensource/jenkins/inbound-agent:3186.vc3b_7249b_87eb_-1
- cgr.dev/du-uds-defenseunicorns/k8s-sidecar:1.27.5

0 comments on commit 21374a6

Please sign in to comment.