-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: use fqin tagging throughout the CI jobs
Use the newer Fully-Qualified-Image-Name tagging scheme in the github ci actions yaml. This makes the naming of each image better match the core build parameters (kind, package source, distro base (aka OS), and arch). The major build and test targets all get an IMG_TAG env var to help organize and make the rest of the yaml structure consistent. One workaround we need to apply is to the toolbox builds as the FROM line in the dockerfiles don't match FQINs nor do they match the old scheme consistently (see #146). So we just do a little hack in that section alone to get things working correctly. Signed-off-by: John Mulligan <[email protected]>
- Loading branch information
1 parent
8a631d9
commit a6022f2
Showing
1 changed file
with
40 additions
and
20 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 |
---|---|---|
|
@@ -43,14 +43,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
BUILDAH_FORMAT: oci | ||
IMG_TAG: default-${{ matrix.os }}-${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the server image | ||
run: make KIND=server OS_NAME=${{ matrix.os}} BUILD_ARCH=${{ matrix.arch}} build-image | ||
- name: Upload server image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "samba-server:${{ matrix.os }}-latest" | ||
image: "samba-server:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
retention_days: 1 | ||
|
||
|
@@ -64,14 +65,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
BUILDAH_FORMAT: oci | ||
IMG_TAG: default-${{ matrix.os }}-${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the ad server image | ||
run: make KIND=ad-server OS_NAME=${{matrix.os}} BUILD_ARCH=${{matrix.arch}} build-image | ||
- name: Upload ad server image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "samba-ad-server:${{ matrix.os}}-latest" | ||
image: "samba-ad-server:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
retention_days: 1 | ||
|
||
|
@@ -83,6 +85,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
BUILDAH_FORMAT: oci | ||
IMG_TAG: default-${{ matrix.os }}-${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: build the client image | ||
|
@@ -92,7 +95,7 @@ jobs: | |
- name: Upload the client image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "quay.io/samba.org/samba-client:${{ matrix.os }}-latest" | ||
image: "samba-client:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
retention_days: 1 | ||
|
||
|
@@ -105,15 +108,22 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
BUILDAH_FORMAT: oci | ||
IMG_TAG: default-${{ matrix.os }}-${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# Download locally stored samba-client image to be used as base for building | ||
# samba-toolbox. | ||
- name: Download client image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "quay.io/samba.org/samba-client:${{ matrix.os }}-latest" | ||
image: "samba-client:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
# Workaround: retag the image so that the FQIN image matches the name in | ||
# the toolbox containerfiles. | ||
- name: Apply OS-latest tag to image (for centos) | ||
run: ${{ env.CONTAINER_CMD }} tag samba-client:${{ env.IMG_TAG }} quay.io/samba.org/samba-client:${{ matrix.os }}-latest | ||
- name: Apply latest tag to image (for fedora) | ||
run: ${{ env.CONTAINER_CMD }} tag samba-client:${{ env.IMG_TAG }} quay.io/samba.org/samba-client:latest | ||
- name: Build the toolbox image | ||
run: make KIND=toolbox OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image | ||
|
||
|
@@ -124,15 +134,18 @@ jobs: | |
arch: [amd64] | ||
needs: build-server | ||
runs-on: ubuntu-latest | ||
env: | ||
BUILDAH_FORMAT: oci | ||
IMG_TAG: default-${{ matrix.os }}-${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download server image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "samba-server:${{ matrix.os }}-latest" | ||
image: "samba-server:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
- name: Test the server image | ||
run: LOCAL_TAG="samba-server:${{ matrix.os}}-latest" tests/test-samba-container.sh | ||
run: LOCAL_TAG=samba-server:${{ env.IMG_TAG }} tests/test-samba-container.sh | ||
|
||
# Reminder: the nightly-server images consume nightly samba rpm builds | ||
# it is not *just* an image that gets built nightly | ||
|
@@ -144,14 +157,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
BUILDAH_FORMAT: oci | ||
IMG_TAG: nightly-${{ matrix.os }}-${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the nightly server image | ||
run: make KIND=server PACKAGE_SOURCE=nightly OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image | ||
- name: Upload nightly server image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "samba-server:${{ matrix.os }}-nightly" | ||
image: "samba-server:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
retention_days: 1 | ||
|
||
|
@@ -163,14 +177,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
BUILDAH_FORMAT: oci | ||
IMG_TAG: nightly-${{ matrix.os }}-${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the nightly ad server image | ||
run: make KIND=ad-server PACKAGE_SOURCE=nightly OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image | ||
- name: Upload nightly AD server image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "samba-ad-server:${{ matrix.os }}-nightly" | ||
image: "samba-ad-server:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
retention_days: 1 | ||
|
||
|
@@ -181,15 +196,18 @@ jobs: | |
arch: [amd64] | ||
needs: build-nightly-server | ||
runs-on: ubuntu-latest | ||
env: | ||
BUILDAH_FORMAT: oci | ||
IMG_TAG: nightly-${{ matrix.os }}-${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download nightly server image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "samba-server:${{ matrix.os }}-nightly" | ||
image: "samba-server:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
- name: Test the nightly server image | ||
run: LOCAL_TAG=samba-server:${{ matrix.os }}-nightly tests/test-samba-container.sh | ||
run: LOCAL_TAG=samba-server:${{ env.IMG_TAG }} tests/test-samba-container.sh | ||
|
||
test-ad-server-kubernetes: | ||
strategy: | ||
|
@@ -204,7 +222,8 @@ jobs: | |
# need to explicitly use 20.04 to avoid problems with jq... | ||
runs-on: ubuntu-20.04 | ||
env: | ||
IMG_TAG: ${{ matrix.os }}-latest | ||
BUILDAH_FORMAT: oci | ||
IMG_TAG: default-${{ matrix.os }}-${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: nolar/setup-k3d-k3s@v1 | ||
|
@@ -213,17 +232,17 @@ jobs: | |
- name: Download ad server image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "samba-ad-server:${{ matrix.os }}-latest" | ||
image: "samba-ad-server:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
- name: import ad server image | ||
run: k3d image import samba-ad-server:${{ matrix.os }}-latest | ||
run: k3d image import samba-ad-server:${{ env.IMG_TAG }} | ||
- name: Download file server image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "samba-server:${{ matrix.os }}-latest" | ||
image: "samba-server:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
- name: import file server image | ||
run: k3d image import samba-server:${{ matrix.os }}-latest | ||
run: k3d image import samba-server:${{ env.IMG_TAG }} | ||
- name: run the ad-dc deployment test | ||
run: ./tests/test-samba-ad-server-kubernetes.sh | ||
|
||
|
@@ -238,7 +257,8 @@ jobs: | |
# need to explicitly use 20.04 to avoid problems with jq... | ||
runs-on: ubuntu-20.04 | ||
env: | ||
IMG_TAG: ${{ matrix.os }}-nightly | ||
BUILDAH_FORMAT: oci | ||
IMG_TAG: nightly-${{ matrix.os }}-${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: nolar/setup-k3d-k3s@v1 | ||
|
@@ -247,17 +267,17 @@ jobs: | |
- name: Download nightly ad server image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "samba-ad-server:${{ matrix.os }}-nightly" | ||
image: "samba-ad-server:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
- name: import nightly ad server image | ||
run: k3d image import samba-ad-server:${{ matrix.os }}-nightly | ||
run: k3d image import samba-ad-server:${{ env.IMG_TAG }} | ||
- name: Download nightly file server image | ||
uses: ishworkh/[email protected] | ||
with: | ||
image: "samba-server:${{ matrix.os }}-nightly" | ||
image: "samba-server:${{ env.IMG_TAG }}" | ||
container_engine: ${{ env.CONTAINER_CMD }} | ||
- name: import nightly file server image | ||
run: k3d image import samba-server:${{ matrix.os }}-nightly | ||
run: k3d image import samba-server:${{ env.IMG_TAG }} | ||
- name: run the ad-dc deployment test | ||
run: ./tests/test-samba-ad-server-kubernetes.sh | ||
|
||
|