Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ on:
required: false
type: string
default: ""
checkout-ref:
description: "Git ref to check out for build inputs (defaults to the workflow SHA)"
required: false
type: string
default: ""

env:
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -150,6 +155,7 @@ jobs:
component: ${{ needs.resolve.outputs.binary_component }}
arch: ${{ matrix.arch }}
cargo-version: ${{ inputs['cargo-version'] }}
checkout-ref: ${{ inputs['checkout-ref'] }}
features: openshell-core/dev-settings
artifact-name: ${{ needs.resolve.outputs.artifact_prefix }}-linux-${{ matrix.arch }}
secrets: inherit
Expand Down Expand Up @@ -181,6 +187,7 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs['checkout-ref'] || github.sha }}
fetch-depth: 0

- name: Mark workspace safe for git
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
required: false
type: string
default: "linux-amd64-cpu8"
checkout-ref:
description: "Git ref to check out for test inputs (defaults to the workflow SHA)"
required: false
type: string
default: ""

permissions:
contents: read
Expand Down Expand Up @@ -54,6 +59,8 @@ jobs:
OPENSHELL_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs['checkout-ref'] || github.sha }}

- name: Install OS test dependencies
if: matrix.apt_packages != ''
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
rpm_release: ${{ steps.v.outputs.rpm_release }}
# Semver without 'v' prefix (e.g. 0.6.0), used for image tags and release body
semver: ${{ steps.v.outputs.semver }}
# Commit resolved from RELEASE_TAG, used for image tags and downstream metadata
source_sha: ${{ steps.v.outputs.source_sha }}
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -67,33 +69,41 @@ jobs:
echo "rpm_version=$(uv run python tasks/scripts/release.py get-version --rpm-version)" >> "$GITHUB_OUTPUT"
echo "rpm_release=$(uv run python tasks/scripts/release.py get-version --rpm-release)" >> "$GITHUB_OUTPUT"
echo "semver=${RELEASE_TAG#v}" >> "$GITHUB_OUTPUT"
echo "source_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

build-gateway:
needs: [compute-versions]
uses: ./.github/workflows/docker-build.yml
with:
component: gateway
cargo-version: ${{ needs.compute-versions.outputs.cargo_version }}
image-tag: ${{ needs.compute-versions.outputs.source_sha }}
checkout-ref: ${{ inputs.tag || github.ref }}

build-supervisor:
needs: [compute-versions]
uses: ./.github/workflows/docker-build.yml
with:
component: supervisor
cargo-version: ${{ needs.compute-versions.outputs.cargo_version }}
image-tag: ${{ needs.compute-versions.outputs.source_sha }}
checkout-ref: ${{ inputs.tag || github.ref }}

build-cluster:
needs: [compute-versions]
uses: ./.github/workflows/docker-build.yml
with:
component: cluster
cargo-version: ${{ needs.compute-versions.outputs.cargo_version }}
image-tag: ${{ needs.compute-versions.outputs.source_sha }}
checkout-ref: ${{ inputs.tag || github.ref }}

e2e:
needs: [build-gateway, build-supervisor, build-cluster]
needs: [compute-versions, build-gateway, build-supervisor, build-cluster]
uses: ./.github/workflows/e2e-test.yml
with:
image-tag: ${{ github.sha }}
image-tag: ${{ needs.compute-versions.outputs.source_sha }}
checkout-ref: ${{ inputs.tag || github.ref }}
runner: linux-arm64-cpu8

tag-ghcr-release:
Expand All @@ -110,16 +120,17 @@ jobs:
set -euo pipefail
REGISTRY="ghcr.io/nvidia/openshell"
VERSION="${{ needs.compute-versions.outputs.semver }}"
SOURCE_TAG="${{ needs.compute-versions.outputs.source_sha }}"
for component in gateway supervisor cluster; do
echo "Tagging ${REGISTRY}/${component}:${{ github.sha }} as ${VERSION} and latest..."
echo "Tagging ${REGISTRY}/${component}:${SOURCE_TAG} as ${VERSION} and latest..."
docker buildx imagetools create \
--prefer-index=false \
-t "${REGISTRY}/${component}:${VERSION}" \
"${REGISTRY}/${component}:${{ github.sha }}"
"${REGISTRY}/${component}:${SOURCE_TAG}"
docker buildx imagetools create \
--prefer-index=false \
-t "${REGISTRY}/${component}:latest" \
"${REGISTRY}/${component}:${{ github.sha }}"
"${REGISTRY}/${component}:${SOURCE_TAG}"
done

build-python-wheels-linux:
Expand Down Expand Up @@ -918,6 +929,7 @@ jobs:
env:
GITLAB_CI_TRIGGER_TOKEN: ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }}
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }}
COMMIT_SHA: ${{ needs.compute-versions.outputs.source_sha }}
RELEASE_VERSION: ${{ needs.compute-versions.outputs.python_version }}
RELEASE_TAG: ${{ env.RELEASE_TAG }}
WHEEL_FILENAMES: ${{ needs.release.outputs.wheel_filenames }}
Expand All @@ -936,7 +948,7 @@ jobs:
-F "ref=main" \
-F "variables[PIPELINE_ACTION]=publish_wheels" \
-F "variables[GITHUB_REPOSITORY]=${GITHUB_REPOSITORY}" \
-F "variables[COMMIT_SHA]=${GITHUB_SHA}" \
-F "variables[COMMIT_SHA]=${COMMIT_SHA}" \
-F "variables[RELEASE_TAG]=${RELEASE_TAG}" \
-F "variables[RELEASE_VERSION]=${RELEASE_VERSION}" \
-F "variables[RELEASE_KIND]=stable" \
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/shadow-rust-native-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ on:
required: false
type: string
default: ""
checkout-ref:
description: "Git ref to check out for build inputs (defaults to the workflow SHA)"
required: false
type: string
default: ""
workflow_dispatch:
inputs:
component:
Expand Down Expand Up @@ -75,6 +80,11 @@ on:
required: false
type: string
default: ""
checkout-ref:
description: "Git ref to check out for build inputs (defaults to the workflow SHA)"
required: false
type: string
default: ""

permissions:
contents: read
Expand Down Expand Up @@ -113,6 +123,7 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs['checkout-ref'] || github.sha }}
fetch-depth: 0

- name: Mark workspace safe for git
Expand Down
Loading