Skip to content

Commit

Permalink
CI: Clobber upgrade-generate to replace the 1.17 zip file on S3
Browse files Browse the repository at this point in the history
We need to do this because CI has the S3 credentials to upload to that
bucket, but none of the current developers do.  This is a one-off that will
be deleted once the task is complete.

Signed-off-by: Mark Yen <mark.yen@suse.com>
  • Loading branch information
mook-as committed Jan 6, 2025
1 parent ce25c1c commit 02387aa
Showing 1 changed file with 19 additions and 94 deletions.
113 changes: 19 additions & 94 deletions .github/workflows/upgrade-generate.yaml
Original file line number Diff line number Diff line change
@@ -1,99 +1,24 @@
name: Generate Upgrade Test Data
on:
workflow_dispatch: {}
permissions:
contents: read
name: "Release 1.17: Overwrite Linux zip file"
on: workflow_dispatch
jobs:
build:
strategy:
matrix:
include:
- platform: mac
arch: x86_64
runs-on: macos-13
- platform: mac
arch: aarch64
runs-on: macos-latest
- platform: win
runs-on: windows-latest
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
# Needed to run `git describe` to get full version info
fetch-depth: 0
- uses: ./.github/actions/yarn-install
- run: yarn build
- run: yarn package
- name: Upload Windows installer
if: runner.os == 'Windows'
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: Rancher Desktop Setup.msi
path: dist/Rancher.Desktop*.msi
if-no-files-found: error
- if: runner.os == 'Windows'
run: cat dist/electron-builder.yaml
- name: Upload Windows build information
if: runner.os == 'Windows'
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: build-info.yml
path: dist/electron-builder.yaml
if-no-files-found: error
- name: Upload macOS archive
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: matrix.platform == 'mac'
with:
name: Rancher Desktop-mac.${{ matrix.arch }}.zip
path: dist/Rancher Desktop*.zip
if-no-files-found: error
release:
upload:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
contents: write # needed to list draft releases
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: ./.github/actions/yarn-install
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: gh-pages
path: pages
persist-credentials: true
- name: Download installer (msi)
id: msi
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: Rancher Desktop Setup.msi
path: RD_SETUP_MSI
- name: Download mac x86_64 archive
id: mac_x86_64
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: Rancher Desktop-mac.x86_64.zip
path: MACX86_ZIP
- name: Download mac aarch64 archive
id: mac_aarch64
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: Rancher Desktop-mac.aarch64.zip
path: MACARM_ZIP
- name: Download build information
id: info
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: build-info.yml
path: RD_BUILD_INFO
- run: node scripts/ts-wrapper.js scripts/populate-update-server.ts
- run: gh release download v1.17.0 --pattern 'rancher-desktop-linux-*'
- run: sha512sum --check *.sha512sum
- run: >-
aws s3 cp \
dist/rancher-desktop-*-linux.zip \
"s3://rancher-desktop-assets-for-obs/rancher-desktop-linux-release-1.17.zip"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
- run: >-
curl -X POST \
-H "Authorization: Token ${OBS_WEBHOOK_TOKEN}" \
"https://build.opensuse.org/trigger/runservice?project=isv:Rancher:dev&package=rancher-desktop-release-1.17"
env:
RD_SETUP_MSI: ${{ steps.msi.outputs.download-path }}
RD_MACX86_ZIP: ${{ steps.mac_x86_64.outputs.download-path }}
RD_MACARM_ZIP: ${{ steps.mac_aarch64.outputs.download-path }}
RD_BUILD_INFO: ${{ steps.info.outputs.download-path }}
RD_OUTPUT_DIR: ${{ github.workspace }}/pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}
OBS_WEBHOOK_TOKEN: ${{ secrets.OBS_WEBHOOK_TOKEN }}

0 comments on commit 02387aa

Please sign in to comment.