diff --git a/.github/workflows/ci_common.yml b/.github/workflows/ci_common.yml index c5e1ea0d..a8325c41 100644 --- a/.github/workflows/ci_common.yml +++ b/.github/workflows/ci_common.yml @@ -197,7 +197,6 @@ jobs: name: All succeeded needs: # TODO - check what jobs need adding here - build - # - test-azdo - test-gh-run-args - test-gh-build-args - test-gh-dockerfile-context @@ -294,34 +293,6 @@ jobs: (cd github-action/ && npm install && npm run build && npm run package) (cd merge/ && npm install && npm run build && npm run package) - # - name: Publish AzDO Task - # uses: ./ - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # AZDO_PROJECT: ${{ inputs.AZDO_PROJECT }} - # AZDO_BUILD: ${{ inputs.AZDO_BUILD }} - # AZDO_ORG: ${{ inputs.AZDO_ORG }} - # AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }} - # AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZDO_TOKEN }} - # BUILD_NUMBER: ${{ github.run_id }} - # IS_PR: ${{ github.head_ref }} - # BRANCH: ${{ github.ref }} - # with: - # imageName: ghcr.io/devcontainers/ci-devcontainer - # runCmd: | - # echo "Starting" - # ./scripts/publish-azdo-task.sh - # env: | - # BUILD_NUMBER - # IS_CI=1 - # IS_PR - # BRANCH - # AZDO_TOKEN - # AZURE_DEVOPS_EXT_PAT - # AZDO_ORG - # AZDO_PROJECT - # AZDO_BUILD - - name: Create GitHub Action Release env: TAG_NAME: v${{ needs.build.outputs.version_short }} @@ -338,89 +309,156 @@ jobs: # # When adding a new test: # - add to the 'needs' section for the 'checks-succeeded' job + # (except test-azdo: it must not block the GitHub Action release) # - add any new images to the image_names in clean_tags.sh # - review the Azure DevOps pipeline and consider adding there for verification # - # test-azdo: - # name: Run AzDO test - # runs-on: ubuntu-latest - # needs: build - # if: ${{ needs.build.outputs.image_push_option == 'filter' }} - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - # with: - # persist-credentials: false - # # if the following value is missing (i.e. not triggered via comment workflow) - # # then the default checkout will apply - # ref: ${{ inputs.prRef }} - - # - name: Show version - # env: - # VERSION: ${{ needs.build.outputs.version }} - # VERSION_SHORT: ${{ needs.build.outputs.version_short }} - # run: | - # echo "VERSION: $VERSION" - # echo "VERSION_SHORT: $VERSION_SHORT" - - # - name: Download workflow artifacts - # uses: actions/download-artifact@v4 - # with: - # path: output - - # - name: Download release VSIX - # uses: actions/download-artifact@v4 - # with: - # name: azdo-task-dev - # path: output - - # - name: Login to GitHub Container Registry - # uses: docker/login-action@v3 - # if: github.ref == 'refs/heads/main' # only need this for push (on `main`) - # with: - # registry: ghcr.io - # username: ${{ github.repository_owner }} - # password: ${{ secrets.GITHUB_TOKEN }} - - # # Published action contains compiled JS, but we need to compile it here - # - uses: actions/setup-node@v6 - # with: - # node-version: 24 - # - name: Compile GH action - # run: | - # (cd common && npm install && npm run build) - # (cd github-action/ && npm install && npm run build && npm run package) - - # - name: Run AzDO test pipeline - # uses: ./ - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # AZDO_PROJECT: ${{ inputs.AZDO_PROJECT }} - # AZDO_BUILD: ${{ inputs.AZDO_BUILD }} - # AZDO_ORG: ${{ inputs.AZDO_ORG }} - # AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }} - # AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZDO_TOKEN }} - # BUILD_NUMBER: ${{ github.run_id }} - # IS_PR: ${{ github.head_ref }} - # BRANCH: ${{ github.ref }} - # IMAGE_TAG: ${{ needs.build.outputs.image_tag }} - # with: - # imageName: ghcr.io/devcontainers/ci-devcontainer - # runCmd: | - # echo "Starting" - # ./scripts/test-azdo.sh - # env: | - # BUILD_NUMBER - # IMAGE_TAG - # IS_CI=1 - # IS_PR - # BRANCH - # AZDO_TOKEN - # AZURE_DEVOPS_EXT_PAT - # AZDO_ORG - # AZDO_PROJECT - # AZDO_BUILD + test-azdo: + name: Run AzDO test + runs-on: ubuntu-latest + needs: build + if: ${{ needs.build.outputs.image_push_option == 'filter' }} + # Not in 'checks-succeeded' needs: an AzDO failure must not block the GitHub Action release. + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: false + # if the following value is missing (i.e. not triggered via comment workflow) + # then the default checkout will apply + ref: ${{ inputs.prRef }} + + - name: Show version + env: + VERSION: ${{ needs.build.outputs.version }} + VERSION_SHORT: ${{ needs.build.outputs.version_short }} + run: | + echo "VERSION: $VERSION" + echo "VERSION_SHORT: $VERSION_SHORT" + + - name: Download workflow artifacts + uses: actions/download-artifact@v4 + with: + path: output + + - name: Download release VSIX + uses: actions/download-artifact@v4 + with: + name: azdo-task-dev + path: output + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + if: github.ref == 'refs/heads/main' # only need this for push (on `main`) + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Published action contains compiled JS, but we need to compile it here + - uses: actions/setup-node@v6 + with: + node-version: 24 + - name: Compile GH action + run: | + (cd common && npm install && npm run build) + (cd github-action/ && npm install && npm run build && npm run package) + + - name: Run AzDO test pipeline + uses: ./ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + AZDO_PROJECT: ${{ inputs.AZDO_PROJECT }} + AZDO_BUILD: ${{ inputs.AZDO_BUILD }} + AZDO_ORG: ${{ inputs.AZDO_ORG }} + AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }} + AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZDO_TOKEN }} + BUILD_NUMBER: ${{ github.run_id }} + IS_PR: ${{ github.head_ref }} + BRANCH: ${{ github.ref }} + IMAGE_TAG: ${{ needs.build.outputs.image_tag }} + with: + imageName: ghcr.io/devcontainers/ci-devcontainer + runCmd: | + echo "Starting" + ./scripts/test-azdo.sh + env: | + BUILD_NUMBER + IMAGE_TAG + IS_CI=1 + IS_PR + BRANCH + AZDO_TOKEN + AZURE_DEVOPS_EXT_PAT + AZDO_ORG + AZDO_PROJECT + AZDO_BUILD + + publish-azdo: + name: Publish AzDO Task + runs-on: ubuntu-latest + needs: + - build + - test-azdo + - release + if: ${{ inputs.release == true }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Download release VSIX + uses: actions/download-artifact@v4 + with: + name: azdo-task + path: output + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + if: github.ref == 'refs/heads/main' # only need this for push (on `main`) + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Published action contains compiled JS, but we need to compile it here + - uses: actions/setup-node@v6 + with: + node-version: 24 + - name: Compile GH action + run: | + (cd common && npm install && npm run build) + (cd github-action/ && npm install && npm run build && npm run package) + + - name: Publish AzDO Task + uses: ./ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + AZDO_PROJECT: ${{ inputs.AZDO_PROJECT }} + AZDO_BUILD: ${{ inputs.AZDO_BUILD }} + AZDO_ORG: ${{ inputs.AZDO_ORG }} + AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }} + AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZDO_TOKEN }} + BUILD_NUMBER: ${{ github.run_id }} + IS_PR: ${{ github.head_ref }} + BRANCH: ${{ github.ref }} + with: + imageName: ghcr.io/devcontainers/ci-devcontainer + runCmd: | + echo "Starting" + ./scripts/publish-azdo-task.sh + env: | + BUILD_NUMBER + IS_CI=1 + IS_PR + BRANCH + AZDO_TOKEN + AZURE_DEVOPS_EXT_PAT + AZDO_ORG + AZDO_PROJECT + AZDO_BUILD test-simple: name: Run simple test diff --git a/azdo-task/DevcontainersCi/task.json b/azdo-task/DevcontainersCi/task.json index 636a8445..30ccdac8 100644 --- a/azdo-task/DevcontainersCi/task.json +++ b/azdo-task/DevcontainersCi/task.json @@ -142,13 +142,29 @@ "description": "The output of the command specified in the runCmd input" }], "execution": { - "Node20": { + "Node24": { + "target": "run-main.js", + "argumentFormat": "" + }, + "Node20_1": { + "target": "run-main.js", + "argumentFormat": "" + }, + "Node16": { "target": "run-main.js", "argumentFormat": "" } }, "postjobexecution": { - "Node20": { + "Node24": { + "target": "run-post.js", + "argumentFormat": "" + }, + "Node20_1": { + "target": "run-post.js", + "argumentFormat": "" + }, + "Node16": { "target": "run-post.js", "argumentFormat": "" } diff --git a/azdo-task/DevcontainersMerge/task.json b/azdo-task/DevcontainersMerge/task.json index 1c96ac29..3b3776b7 100644 --- a/azdo-task/DevcontainersMerge/task.json +++ b/azdo-task/DevcontainersMerge/task.json @@ -43,6 +43,14 @@ } ], "execution": { + "Node24": { + "target": "run-main.js", + "argumentFormat": "" + }, + "Node20_1": { + "target": "run-main.js", + "argumentFormat": "" + }, "Node16": { "target": "run-main.js", "argumentFormat": "" diff --git a/merge/action.yml b/merge/action.yml index 459ff869..3aa2754b 100644 --- a/merge/action.yml +++ b/merge/action.yml @@ -16,5 +16,5 @@ inputs: required: true description: 'Comma-separated list of platforms in standard format (e.g., linux/amd64,linux/arm64). Tag suffixes are auto-derived.' runs: - using: 'node20' + using: 'node24' main: 'run-main.js'