From 7da58c8eaaa1ad9e0792b9464d7204b77d73479a Mon Sep 17 00:00:00 2001 From: Dominik Broj Date: Thu, 11 Jul 2024 12:28:46 +0200 Subject: [PATCH] run `mage buildAll || true` when building the plugin (#4658) # What this PR does `oncall-private` is using [actions/build-sign-and-package-plugin/action.yml](https://github.com/grafana/oncall/pull/4658/files#diff-6200ac63c387869ca55bc34d1b343a96c667daef428602f910d696836cb09f84) from the dev branch of this repo when doing the deployment. In order to deploy new OnCall initialization which has Go backend component, we need this action to install Go, Mage and do the `mage buildAll`. For other branches where there are no Go files yet, it would just swallow the error thanks to the `|| true` part ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes. --- .github/actions/build-sign-and-package-plugin/action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/actions/build-sign-and-package-plugin/action.yml b/.github/actions/build-sign-and-package-plugin/action.yml index 7ce4e42a..731d47b1 100644 --- a/.github/actions/build-sign-and-package-plugin/action.yml +++ b/.github/actions/build-sign-and-package-plugin/action.yml @@ -27,6 +27,13 @@ runs: # yamllint disable rule:line-length run: | echo filename="grafana-oncall${{ inputs.is_enterprise == 'true' && '-ee' || '' }}-app-${{ inputs.plugin_version_number }}.zip" >> $GITHUB_OUTPUT + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: "1.21.5" + - name: Install Mage + shell: bash + run: go install github.com/magefile/mage@v1.15.0 - name: Build, sign, and package plugin shell: bash working-directory: ${{ inputs.working_directory }} @@ -35,6 +42,7 @@ runs: run: | jq --arg v "${{ inputs.plugin_version_number }}" '.version=$v' package.json > package.new && mv package.new package.json && jq '.version' package.json; yarn build + mage buildAll || true yarn sign if [ ! -f dist/MANIFEST.txt ]; then echo "Sign failed, MANIFEST.txt not created, aborting." && exit 1; fi mv dist grafana-oncall-app