Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow tidying #216

Merged
merged 2 commits into from
Feb 24, 2023
Merged
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
73 changes: 34 additions & 39 deletions .github/workflows/ci_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ jobs:
core.error('Failed to set image_tag');
console.log(context);


# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -164,6 +163,16 @@ jobs:
IS_PR
BRANCH

- name: Show version info
env:
VERSION: ${{ steps.build.outputs.version }}
VERSION_SHORT: ${{ steps.build.outputs.version_short }}
VERSION_MAJOR: ${{ steps.build.outputs.version_major }}
run: |
echo "VERSION=${VERSION}"
echo "VERSION_SHORT=${VERSION_SHORT}"
echo "VERSION_MAJOR=${VERSION_MAJOR}"

- uses: actions/upload-artifact@v3
name: Create dev AzDO VSIX artifact
with:
Expand All @@ -178,8 +187,9 @@ jobs:
path: ./output/devcontainers.ci-${{ steps.build.outputs.version }}.vsix
if-no-files-found: error

pr-checks:
name: Mark PR checks as complete
checks-succeeded:
# simple no-op job to use as step for check status
name: All succeeded
needs: # TODO - check what jobs need adding here
- build
- test-azdo
Expand All @@ -194,6 +204,18 @@ jobs:
- test-simple
- test-no-run
- test-platform-with-runcmd
- test-multiple-tags-job2
runs-on: ubuntu-latest
steps:
- name: Simple step
run: |
echo Done!


pr-checks:
name: Mark PR checks as complete
needs: # TODO - check what jobs need adding here
- checks-succeeded
runs-on: ubuntu-latest
if: ${{ inputs.prHeadSha }}
steps:
Expand All @@ -211,50 +233,17 @@ jobs:
status: "completed"
conclusion: "success"

pr-succeeded:
# simple no-op job to use as step for checks for PR checks
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
- test-gh-feature-docker-from-docker
- test-gh-docker-from-docker-non-root
- test-gh-docker-from-docker-root
- test-gh-skip-user-update
- test-compose-features
- test-simple
- test-no-run
- test-platform-with-runcmd
runs-on: ubuntu-latest
steps:
- name: Simple step
run: |
echo Done!

release:
name: Create release
runs-on: ubuntu-latest
needs:
- build
- test-azdo
- test-gh-run-args
- test-gh-build-args
- test-gh-dockerfile-context
- test-gh-feature-docker-from-docker
- test-gh-docker-from-docker-non-root
- test-gh-docker-from-docker-root
- test-gh-skip-user-update
- test-compose-features
- test-simple
- test-no-run
- test-platform-with-runcmd
- checks-succeeded
if: ${{ inputs.release == true }}
env:
VERSION: ${{ needs.build.outputs.version }}
VERSION_SHORT: ${{ needs.build.outputs.version_short }}
VERSION_MAJOR: ${{ needs.build.outputs.version_major }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -263,6 +252,12 @@ jobs:
# then the default checkout will apply
ref: ${{ inputs.prRef }}

- name: Show version info
run: |
echo "VERSION=${VERSION}"
echo "VERSION_SHORT=${VERSION_SHORT}"
echo "VERSION_MAJOR=${VERSION_MAJOR}"

- name: Download release VSIX
uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -335,7 +330,7 @@ jobs:
# Jobs to test
#
# When adding a new test:
# - add to the 'needs' section for the 'pr-succeeded', 'pr-checks' and 'releases' jobs
# - add to the 'needs' section for the 'checks-succeeded' job
# - add any new images to the image_names in clean_tags.sh
# - review the Azure DevOps pipeline and consider adding there for verification
#
Expand Down