From 0a82e57478ab7fceeb0b4bd5b4404c1187386b90 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 5 Dec 2023 11:38:34 -0500 Subject: [PATCH 1/8] Clean up GitHub Actions. Update verify.yml --- .github/workflows/build.yml | 20 -------------------- .github/workflows/propagate.yml | 26 +------------------------- .github/workflows/release.yml | 29 ++--------------------------- 3 files changed, 3 insertions(+), 72 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 884fe6fb26..37d346540b 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -420,16 +420,6 @@ jobs: name: Install State Tool uses: ActiveState/setup-state-tool@v1 - - # === Setup === - name: Setup - shell: bash - run: | - bin=$(pwd)/.github/deps/${{ runner.os }}/bin - echo "Adding $bin to PATH" - echo "$bin" >> $GITHUB_PATH - ls -ahl $bin - printenv - - # === Download All Build Session Artifacts === name: Download All Build Session Artifacts uses: actions/download-artifact@v2 @@ -445,16 +435,6 @@ jobs: find . -mindepth 2 -maxdepth 2 -print0 | xargs -0 -I file rsync -av file . rm -Rf session* - - # === Install Deps === - name: Install Deps - shell: bash - run: state run install-deps - - - # === Preprocess === - name: Preprocess - shell: bash - run: state run preprocess -v - - # === Cleanup Build Dir === name: Cleanup Build Dir shell: bash diff --git a/.github/workflows/propagate.yml b/.github/workflows/propagate.yml index 7c32c260c6..9b80fef2c4 100644 --- a/.github/workflows/propagate.yml +++ b/.github/workflows/propagate.yml @@ -13,14 +13,7 @@ jobs: propagate: name: Propagate to affected version branches runs-on: ubuntu-20.04 - strategy: - matrix: - go-version: - - 1.20.x env: - ACTIVESTATE_CI: true - ACTIVESTATE_CLI_DISABLE_RUNTIME: true - SHELL: bash GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JIRA_USERNAME: ${{ secrets.JIRA_EMAIL }} JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} @@ -40,33 +33,16 @@ jobs: name: Install Go uses: actions/setup-go@v3 with: - go-version: ${{ matrix.go-version }} - - - # === Install State Tool === - name: Install State Tool - uses: ActiveState/setup-state-tool@v1 + go-version: '1.20.x' - # === Setup === name: Setup shell: bash run: | - bin=$(pwd)/.github/deps/${{ runner.os }}/bin - echo "Adding $bin to PATH" - echo "$bin" >> $GITHUB_PATH # We specify our custom user because we need privileges to push to protected branches git config user.name "AS-builds" git config user.email "nathanr+asbuilds@activestate.com" - - # === Install Deps === - name: Install Deps - shell: bash - run: state run install-deps - - - # === Preprocess === - name: Preprocess - shell: bash - run: state run preprocess -v - - # === Propagate PR === name: Propagate PR id: propagate_pr diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68350a8700..375c7f4aa5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,14 +15,8 @@ jobs: if: github.event.ref_type == 'tag' && contains(github.event.ref, 'release/remote-installer') permissions: id-token: write # This is required for requesting the JWT - strategy: - matrix: - go-version: - - 1.20.x env: ACTIVESTATE_CI: true - ACTIVESTATE_CLI_DISABLE_RUNTIME: true - SHELL: bash GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} AWS_REGION : "us-east-1" AWS_ROLE_SESSION_NAME: "gha-activestate-cli" @@ -37,31 +31,12 @@ jobs: name: Install Go uses: actions/setup-go@v3 with: - go-version: ${{ matrix.go-version }} + go-version: '1.20.x' - # === Install State Tool === name: Install State Tool uses: ActiveState/setup-state-tool@v1 - - # === Setup === - name: Setup - shell: bash - run: | - bin=$(pwd)/.github/deps/${{ runner.os }}/bin - echo "Adding $bin to PATH" - echo "$bin" >> $GITHUB_PATH - - - # === Setup Windows === - name: Setup (Windows) - shell: pwsh - run: | - echo "${PSScriptRoot}/.github/deps/${{ runner.os }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - - - # === Install Deps === - name: Install Deps - shell: bash - run: state run install-deps - - # === Preprocess === name: Preprocess shell: bash @@ -88,7 +63,7 @@ jobs: env: CODE_SIGNING_PASSWD: ${{ secrets.CODE_SIGNING_PASSWD }} MSI_CERT_BASE64: ${{ secrets.MSI_CERT_BASE64 }} - + - # === Configure AWS credentials == name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v2 From 7badd5296aa9fc8fa31dc752b3aed29676fb8463 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 5 Dec 2023 11:38:34 -0500 Subject: [PATCH 2/8] Clean up GitHub Actions. --- .github/workflows/build.yml | 25 ------------------------- .github/workflows/propagate.yml | 26 +------------------------- .github/workflows/release.yml | 29 ++--------------------------- activestate.yaml | 9 --------- 4 files changed, 3 insertions(+), 86 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 884fe6fb26..8876545093 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -112,11 +112,6 @@ jobs: run: brew install fish if: runner.os == 'macOS' - - # === Install Deps === - name: Install Deps - shell: bash - run: state run install-deps - - # === Preprocess === name: Preprocess shell: bash @@ -420,16 +415,6 @@ jobs: name: Install State Tool uses: ActiveState/setup-state-tool@v1 - - # === Setup === - name: Setup - shell: bash - run: | - bin=$(pwd)/.github/deps/${{ runner.os }}/bin - echo "Adding $bin to PATH" - echo "$bin" >> $GITHUB_PATH - ls -ahl $bin - printenv - - # === Download All Build Session Artifacts === name: Download All Build Session Artifacts uses: actions/download-artifact@v2 @@ -445,16 +430,6 @@ jobs: find . -mindepth 2 -maxdepth 2 -print0 | xargs -0 -I file rsync -av file . rm -Rf session* - - # === Install Deps === - name: Install Deps - shell: bash - run: state run install-deps - - - # === Preprocess === - name: Preprocess - shell: bash - run: state run preprocess -v - - # === Cleanup Build Dir === name: Cleanup Build Dir shell: bash diff --git a/.github/workflows/propagate.yml b/.github/workflows/propagate.yml index 7c32c260c6..9b80fef2c4 100644 --- a/.github/workflows/propagate.yml +++ b/.github/workflows/propagate.yml @@ -13,14 +13,7 @@ jobs: propagate: name: Propagate to affected version branches runs-on: ubuntu-20.04 - strategy: - matrix: - go-version: - - 1.20.x env: - ACTIVESTATE_CI: true - ACTIVESTATE_CLI_DISABLE_RUNTIME: true - SHELL: bash GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JIRA_USERNAME: ${{ secrets.JIRA_EMAIL }} JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} @@ -40,33 +33,16 @@ jobs: name: Install Go uses: actions/setup-go@v3 with: - go-version: ${{ matrix.go-version }} - - - # === Install State Tool === - name: Install State Tool - uses: ActiveState/setup-state-tool@v1 + go-version: '1.20.x' - # === Setup === name: Setup shell: bash run: | - bin=$(pwd)/.github/deps/${{ runner.os }}/bin - echo "Adding $bin to PATH" - echo "$bin" >> $GITHUB_PATH # We specify our custom user because we need privileges to push to protected branches git config user.name "AS-builds" git config user.email "nathanr+asbuilds@activestate.com" - - # === Install Deps === - name: Install Deps - shell: bash - run: state run install-deps - - - # === Preprocess === - name: Preprocess - shell: bash - run: state run preprocess -v - - # === Propagate PR === name: Propagate PR id: propagate_pr diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68350a8700..375c7f4aa5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,14 +15,8 @@ jobs: if: github.event.ref_type == 'tag' && contains(github.event.ref, 'release/remote-installer') permissions: id-token: write # This is required for requesting the JWT - strategy: - matrix: - go-version: - - 1.20.x env: ACTIVESTATE_CI: true - ACTIVESTATE_CLI_DISABLE_RUNTIME: true - SHELL: bash GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} AWS_REGION : "us-east-1" AWS_ROLE_SESSION_NAME: "gha-activestate-cli" @@ -37,31 +31,12 @@ jobs: name: Install Go uses: actions/setup-go@v3 with: - go-version: ${{ matrix.go-version }} + go-version: '1.20.x' - # === Install State Tool === name: Install State Tool uses: ActiveState/setup-state-tool@v1 - - # === Setup === - name: Setup - shell: bash - run: | - bin=$(pwd)/.github/deps/${{ runner.os }}/bin - echo "Adding $bin to PATH" - echo "$bin" >> $GITHUB_PATH - - - # === Setup Windows === - name: Setup (Windows) - shell: pwsh - run: | - echo "${PSScriptRoot}/.github/deps/${{ runner.os }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - - - # === Install Deps === - name: Install Deps - shell: bash - run: state run install-deps - - # === Preprocess === name: Preprocess shell: bash @@ -88,7 +63,7 @@ jobs: env: CODE_SIGNING_PASSWD: ${{ secrets.CODE_SIGNING_PASSWD }} MSI_CERT_BASE64: ${{ secrets.MSI_CERT_BASE64 }} - + - # === Configure AWS credentials == name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v2 diff --git a/activestate.yaml b/activestate.yaml index b8bcd048a7..378cc33ca8 100644 --- a/activestate.yaml +++ b/activestate.yaml @@ -46,14 +46,6 @@ constants: if: ne .OS.Name "Windows" value: .sh scripts: - - name: install-deps - language: bash - if: ne .Shell "cmd" - value: | - if ! type "gozip" &> /dev/null; then - echo "gozip was not found on your PATH, installing .." - go install github.com/ActiveState/gozip/cmd/gozip@e455986 - fi - name: install-deps-dev language: bash if: ne .Shell "cmd" @@ -410,7 +402,6 @@ events: if: ne .Shell "cmd" value: | $scripts.install-deps-dev.path() - $scripts.install-deps.path() - name: file-changed scope: ["internal/locale/locales"] value: build From 73af8d8e74f1bdcff46598e1854d8ec6f34e43b5 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 5 Dec 2023 12:14:27 -0500 Subject: [PATCH 3/8] Temporarily enable some GitHub Actions for testing. --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8876545093..824c9876d5 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -396,7 +396,7 @@ jobs: SHELL: bash GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} timeout-minutes: 10 - if: contains(fromJSON('["refs/heads/master", "refs/heads/beta", "refs/heads/release", "refs/heads/LTS"]'), github.ref) || startsWith(github.event.pull_request.head.ref, 'version/') + #if: contains(fromJSON('["refs/heads/master", "refs/heads/beta", "refs/heads/release", "refs/heads/LTS"]'), github.ref) || startsWith(github.event.pull_request.head.ref, 'version/') # === Deploy Steps === steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 375c7f4aa5..d30dbce5cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,11 @@ name: Release # === Triggers === "on": - create + pull_request: + types: + - edited + - labeled + - synchronize # === JOBS === jobs: @@ -12,7 +16,7 @@ jobs: name: Remote Installer timeout-minutes: 30 runs-on: windows-2019 - if: github.event.ref_type == 'tag' && contains(github.event.ref, 'release/remote-installer') + #if: github.event.ref_type == 'tag' && contains(github.event.ref, 'release/remote-installer') permissions: id-token: write # This is required for requesting the JWT env: From 7d2861c4b05b418000794595f9964e2a323f5f09 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 5 Dec 2023 12:19:14 -0500 Subject: [PATCH 4/8] Temporarily increase timeout. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d30dbce5cd..fd688186ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: - # === Preprocess === name: Preprocess shell: bash - timeout-minutes: 1 + timeout-minutes: 2 run: state run preprocess -v - # === Build Remote Installer === From 664e0e593b375bbff1f93f0def0194f442835280 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 5 Dec 2023 12:55:00 -0500 Subject: [PATCH 5/8] Restore the preprocess step for deploy. --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 824c9876d5..a7f02f358a 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -430,6 +430,11 @@ jobs: find . -mindepth 2 -maxdepth 2 -print0 | xargs -0 -I file rsync -av file . rm -Rf session* + - # === Preprocess === + name: Preprocess + shell: bash + run: state run preprocess -v + - # === Cleanup Build Dir === name: Cleanup Build Dir shell: bash From ff34013ec1b269d82ad42bb725c47ef64cae8135 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 5 Dec 2023 13:31:47 -0500 Subject: [PATCH 6/8] Revert "Temporarily increase timeout." This reverts commit 7d2861c4b05b418000794595f9964e2a323f5f09. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd688186ef..d30dbce5cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: - # === Preprocess === name: Preprocess shell: bash - timeout-minutes: 2 + timeout-minutes: 1 run: state run preprocess -v - # === Build Remote Installer === From e68f4e2c6e872e50d14fa34f42c997847365e26f Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 5 Dec 2023 13:35:02 -0500 Subject: [PATCH 7/8] Revert "Temporarily enable some GitHub Actions for testing." This reverts commit 73af8d8e74f1bdcff46598e1854d8ec6f34e43b5. --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7f02f358a..6962172a8d 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -396,7 +396,7 @@ jobs: SHELL: bash GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} timeout-minutes: 10 - #if: contains(fromJSON('["refs/heads/master", "refs/heads/beta", "refs/heads/release", "refs/heads/LTS"]'), github.ref) || startsWith(github.event.pull_request.head.ref, 'version/') + if: contains(fromJSON('["refs/heads/master", "refs/heads/beta", "refs/heads/release", "refs/heads/LTS"]'), github.ref) || startsWith(github.event.pull_request.head.ref, 'version/') # === Deploy Steps === steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d30dbce5cd..375c7f4aa5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,11 +2,7 @@ name: Release # === Triggers === "on": - pull_request: - types: - - edited - - labeled - - synchronize + create # === JOBS === jobs: @@ -16,7 +12,7 @@ jobs: name: Remote Installer timeout-minutes: 30 runs-on: windows-2019 - #if: github.event.ref_type == 'tag' && contains(github.event.ref, 'release/remote-installer') + if: github.event.ref_type == 'tag' && contains(github.event.ref, 'release/remote-installer') permissions: id-token: write # This is required for requesting the JWT env: From e3dd707d2a29939c6b00144f76ad5670b3b972c3 Mon Sep 17 00:00:00 2001 From: mitchell Date: Thu, 7 Dec 2023 14:53:24 -0500 Subject: [PATCH 8/8] Restore preprocess step for propagate-pr action. --- .github/workflows/propagate.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/propagate.yml b/.github/workflows/propagate.yml index 9b80fef2c4..2ba49e6624 100644 --- a/.github/workflows/propagate.yml +++ b/.github/workflows/propagate.yml @@ -14,6 +14,7 @@ jobs: name: Propagate to affected version branches runs-on: ubuntu-20.04 env: + ACTIVESTATE_CI: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JIRA_USERNAME: ${{ secrets.JIRA_EMAIL }} JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} @@ -35,6 +36,10 @@ jobs: with: go-version: '1.20.x' + - # === Install State Tool === + name: Install State Tool + uses: ActiveState/setup-state-tool@v1 + - # === Setup === name: Setup shell: bash @@ -43,6 +48,11 @@ jobs: git config user.name "AS-builds" git config user.email "nathanr+asbuilds@activestate.com" + - # === Preprocess === + name: Preprocess + shell: bash + run: state run preprocess -v + - # === Propagate PR === name: Propagate PR id: propagate_pr