diff --git a/.github/workflows/manual-reset-local-registry.yml b/.github/workflows/manual-reset-local-registry.yml new file mode 100644 index 000000000..a138f1b4f --- /dev/null +++ b/.github/workflows/manual-reset-local-registry.yml @@ -0,0 +1,59 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +name: Clean up Local Registry on manual event +on: + workflow_dispatch: + inputs: + nodes: + default: "gaudi,xeon" + description: "Hardware to clean up" + required: true + type: string + +env: + EXAMPLES: ${{ vars.NIGHTLY_RELEASE_EXAMPLES }} + +jobs: + get-build-matrix: + runs-on: ubuntu-latest + outputs: + examples: ${{ steps.get-matrix.outputs.examples }} + nodes: ${{ steps.get-matrix.outputs.nodes }} + steps: + - name: Create Matrix + id: get-matrix + run: | + examples=($(echo ${EXAMPLES} | tr ',' ' ')) + examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.') + echo "examples=$examples_json" >> $GITHUB_OUTPUT + nodes=($(echo ${{ inputs.nodes }} | tr ',' ' ')) + nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.') + echo "nodes=$nodes_json" >> $GITHUB_OUTPUT + + clean-up: + needs: get-build-matrix + strategy: + matrix: + node: ${{ fromJson(needs.get-build-matrix.outputs.nodes) }} + fail-fast: false + runs-on: "docker-build-${{ matrix.node }}" + steps: + - name: Clean Up Local Registry + run: | + echo "Cleaning up local registry on ${{ matrix.node }}" + bash /home/sdp/workspace/fully_registry_cleanup.sh + docker ps | grep registry + + build: + needs: [get-build-matrix, clean-up] + strategy: + matrix: + example: ${{ fromJson(needs.get-build-matrix.outputs.examples) }} + node: ${{ fromJson(needs.get-build-matrix.outputs.nodes) }} + fail-fast: false + uses: ./.github/workflows/_example-workflow.yml + with: + node: ${{ matrix.node }} + example: ${{ matrix.example }} + secrets: inherit diff --git a/.github/workflows/nightly-docker-build-publish.yml b/.github/workflows/nightly-docker-build-publish.yml index d30562224..0e95d5e7f 100644 --- a/.github/workflows/nightly-docker-build-publish.yml +++ b/.github/workflows/nightly-docker-build-publish.yml @@ -5,11 +5,11 @@ name: Nightly build/publish latest docker images on: schedule: - - cron: "30 13 * * *" # UTC time + - cron: "30 14 * * *" # UTC time workflow_dispatch: env: - EXAMPLES: "AgentQnA,AudioQnA,ChatQnA,CodeGen,CodeTrans,DocIndexRetriever,DocSum,FaqGen,InstructionTuning,MultimodalQnA,ProductivitySuite,RerankFinetuning,SearchQnA,Translation,VideoQnA,VisualQnA" + EXAMPLES: ${{ vars.NIGHTLY_RELEASE_EXAMPLES }} TAG: "latest" PUBLISH_TAGS: "latest" @@ -32,7 +32,7 @@ jobs: echo "TAG=$TAG" >> $GITHUB_OUTPUT echo "PUBLISH_TAGS=$PUBLISH_TAGS" >> $GITHUB_OUTPUT - build: + build-and-test: needs: get-build-matrix strategy: matrix: @@ -42,6 +42,7 @@ jobs: with: node: gaudi example: ${{ matrix.example }} + test_compose: true secrets: inherit get-image-list: @@ -51,7 +52,7 @@ jobs: examples: ${{ needs.get-build-matrix.outputs.EXAMPLES }} publish: - needs: [get-build-matrix, get-image-list, build] + needs: [get-build-matrix, get-image-list, build-and-test] strategy: matrix: image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}