MSP-3918: Fix reconciliation logic for scenarios with maintenance=tru… #833
Workflow file for this run
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
name: Build All in one job | |
on: | |
push: | |
paths-ignore: | |
- '.github/**' | |
- 'docs/**' | |
- 'CODEOWNERS' | |
- 'LICENSE' | |
- 'PROJECT' | |
- 'README.md' | |
- 'SECURITY.md' | |
- 'images/jail/gpubench/**' | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
jobs: | |
pre-build: | |
runs-on: self-hosted | |
outputs: | |
UNSTABLE: ${{ steps.set-env.outputs.unstable }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Set environment to global output variables based on branch | |
id: set-env | |
run: | | |
if [ "${{ github.ref }}" == "refs/heads/main" ]; then | |
echo "unstable=false" >> $GITHUB_OUTPUT | |
else | |
echo "unstable=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Print UNSTABLE from output | |
run: | | |
echo "Branch is - ${{ github.ref }}" | |
echo "UNSTABLE - ${{ steps.set-env.outputs.unstable }}" | |
one_job: | |
runs-on: self-hosted | |
needs: pre-build | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install GO | |
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version-file: 'go.mod' | |
- name: Debug vars | |
run: | | |
echo "UNSTABLE - is ${{ needs.pre-build.outputs.unstable }}" | |
make get-version UNSTABLE=${{ needs.pre-build.outputs.unstable }} | |
- name: Check if version synced | |
run: make test-version-sync | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 | |
- name: Log in to the Github Container registry | |
uses: docker/login-action@7ca345011ac4304463197fac0e56eab1bc7e6af0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run all | |
run: | | |
UNSTABLE=${{ needs.pre-build.outputs.unstable }} | |
IMAGE_VERSION=$(make get-image-version UNSTABLE=${UNSTABLE}) | |
VERSION=$(make get-version UNSTABLE=${UNSTABLE}) | |
OPERATOR_IMAGE_TAG=$(make get-operator-tag-version UNSTABLE=${UNSTABLE}) | |
make sync-version UNSTABLE=${UNSTABLE} | |
echo "Updating CRDs & auto-generated code (included in test step) & run tests" | |
make test UNSTABLE="${UNSTABLE}" | |
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=worker_slurmd DOCKERFILE=worker/slurmd.dockerfile | |
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=worker_slurmd | |
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=controller_slurmctld DOCKERFILE=controller/slurmctld.dockerfile | |
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=controller_slurmctld | |
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=controller_slurmdbd DOCKERFILE=accounting/slurmdbd.dockerfile | |
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=controller_slurmdbd | |
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=login_sshd DOCKERFILE=login/sshd.dockerfile | |
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=login_sshd | |
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=munge DOCKERFILE=munge/munge.dockerfile | |
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=munge | |
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=nccl_benchmark DOCKERFILE=nccl_benchmark/nccl_benchmark.dockerfile | |
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=nccl_benchmark | |
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=exporter DOCKERFILE=exporter/exporter.dockerfile | |
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=exporter | |
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=slurmrestd DOCKERFILE=restd/slurmrestd.dockerfile | |
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=slurmrestd | |
echo "Common images were built" | |
echo "Removing previous jail rootfs tar archive" | |
rm -rf images/jail_rootfs.tar | |
echo "Building tarball for jail" | |
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=jail DOCKERFILE=jail/jail.dockerfile DOCKER_OUTPUT="--output type=tar,dest=jail_rootfs.tar" | |
echo "Built tarball jail_rootfs.tar" | |
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=populate_jail DOCKERFILE=populate_jail/populate_jail.dockerfile | |
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=populate_jail | |
echo "Building image of the operator" | |
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=slurm-operator DOCKERFILE=Dockerfile IMAGE_VERSION="$OPERATOR_IMAGE_TAG" | |
echo "Pushing image of the operator" | |
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=slurm-operator IMAGE_VERSION="$OPERATOR_IMAGE_TAG" | |
echo "Pushing Helm charts" | |
make release-helm UNSTABLE="${UNSTABLE}" OPERATOR_IMAGE_TAG="$OPERATOR_IMAGE_TAG" |