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

Remove compiled JS content #210

Merged
merged 10 commits into from
Feb 23, 2023
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
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ RUN sudo groupadd docker && sudo usermod -aG docker $USERNAME && newgrp docker
COPY scripts/act.sh /tmp/
RUN /bin/bash /tmp/act.sh 0.2.21

RUN sudo npm install -g tfx-cli
# Pin to 0.12.0: https://github.com/microsoft/tfs-cli/issues/427
RUN sudo npm install -g tfx-cli@0.12.0

# azure-cli-no-mount
COPY scripts/azure-cli.sh /tmp/
Expand Down
194 changes: 161 additions & 33 deletions .github/workflows/ci_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ jobs:
runs-on: ubuntu-latest
name: build, test, package
outputs:
version_short: ${{ steps.build.outputs.version_short }}
version: ${{ steps.build.outputs.version }}
version_short: ${{ steps.build.outputs.version_short }}
version_major: ${{ steps.build.outputs.version_major }}
image_tag: ${{ steps.set_image_tag.outputs.image_tag }}
image_push_option: ${{ steps.set_image_push_option.outputs.image_push_option }}
build_number: ${{ steps.build_number.outputs.build_number }}
Expand Down Expand Up @@ -124,6 +125,21 @@ 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:
node-version: 16
- name: Compile GH action
run: |
node --version
npm --version
echo "** Installing and building common..."
(cd common && npm install && npm run build)
(cd common && npm run tsc_version)
echo "** Installing and building github-action..."
(cd github-action/ && npm install && npm run build && npm run package)

- name: Build in dev container
uses: ./
id: build
Expand Down Expand Up @@ -266,40 +282,14 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
draft: false
prerelease: true

- name: Create Major/Minor tag
id: create_tag_short_verison
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION_SHORT: v${{ env.VERSION_SHORT }}
node-version: 16
- name: Compile GH action
run: |
echo "VERSION_SHORT: $VERSION_SHORT"
# sudo chown -R $(whoami) .
git config user.name "CI build"
git config user.email stuart@leeks.net
git tag -fa $VERSION_SHORT -m $VERSION_SHORT
git push -f origin $VERSION_SHORT

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./output/devcontainers.ci-${{ needs.build.outputs.version }}.vsix
asset_name: devcontainers.ci-${{ needs.build.outputs.version }}.vsix
asset_content_type: application/zip
(cd common && npm install && npm run build)
(cd github-action/ && npm install && npm run build && npm run package)

- name: Publish AzDO Task
uses: ./
Expand Down Expand Up @@ -329,6 +319,18 @@ jobs:
AZDO_PROJECT
AZDO_BUILD

- name: Create GitHub Action Release
env:
TAG_NAME: v0.1
RELEASE_NAME: v0.1.${{ github.run_number }}
GH_TOKEN: ${{ github.token }}
run: |
git config user.name "CI build"
git config user.email automated-build@example.com

./scripts/gh-release.sh


#
# Jobs to test
#
Expand Down Expand Up @@ -379,6 +381,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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:
Expand Down Expand Up @@ -423,6 +434,15 @@ jobs:
# then the default checkout will apply
ref: ${{ inputs.prRef }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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 test
uses: ./
id: simpletest
Expand Down Expand Up @@ -463,6 +483,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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 test
uses: ./
with:
Expand Down Expand Up @@ -499,6 +528,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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 test
uses: ./
with:
Expand Down Expand Up @@ -535,6 +573,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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 test
uses: ./
with:
Expand Down Expand Up @@ -571,6 +618,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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 test
uses: ./
with:
Expand Down Expand Up @@ -607,6 +663,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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 test
uses: ./
with:
Expand Down Expand Up @@ -643,6 +708,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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 test
uses: ./
with:
Expand Down Expand Up @@ -679,6 +753,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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 test
uses: ./
with:
Expand Down Expand Up @@ -723,6 +806,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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 test
uses: ./
with:
Expand All @@ -748,6 +840,15 @@ jobs:
# then the default checkout will apply
ref: ${{ inputs.prRef }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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 test
uses: ./
with:
Expand Down Expand Up @@ -780,6 +881,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- 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 test
uses: ./
id: platform-with-runcmd
Expand Down Expand Up @@ -825,6 +935,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Compile GH action
run: |
(cd common && npm install && npm run build)
(cd github-action/ && npm install && npm run build && npm run package)

- name: Build and push with multiple tags and single platform
uses: ./
id: multiple-tags-single-platform
Expand Down Expand Up @@ -854,6 +973,15 @@ jobs:
sudo apt-get update
sudo apt-get install skopeo

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Compile GH action
run: |
(cd common && npm install && npm run build)
(cd github-action/ && npm install && npm run build && npm run package)

- name: Build and push with multiple tags and multiple platforms
uses: ./
id: multiple-tags-multiple-platforms
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,7 @@ lib/**/*
output

.taskkey

common_lib
lib
dist
20 changes: 0 additions & 20 deletions azdo-task/DevcontainersCi/dist/config.d.ts

This file was deleted.

Loading