Skip to content

Commit

Permalink
publish releases as rpm packages on SOS (#555)
Browse files Browse the repository at this point in the history
We use a script in go.mk as a custom publisher to publish releases to
SOS. As with debian releases, we only keep the last 10 versions of the cli available in the bucket.

The packages can be installed on Fedora by adding a repo file `/etc/yum.repos.d/exoscale-cli.repo` with the following content:
```
[exoscale-cli-repo]
name=exocale-cli
baseurl=https://sos-ch-gva-2.exo.io/exoscale-packages/rpm/cli
enabled=1
repo_gpgcheck=1
gpgcheck=0
gpgkey=https://keys.openpgp.org/vks/v1/by-fingerprint/7100E8BFD6199CE0374CB7F003686F8CDE378D41
```

---------

Co-authored-by: Philipp Sauter <[email protected]>
  • Loading branch information
sauterp and sauterp authored Oct 26, 2023
1 parent 55da87a commit c7e96e0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
id: get-version-tag
shell: bash

- run: echo "linux_amd64_checksum="$(grep -P 'exoscale-cli_[0-9]+\.[0-9]+\.[0-9]_linux_amd64.tar.gz' dist/exoscale-cli_*_checksums.txt | head -n 1 | cut -c1-64) >> $GITHUB_OUTPUT
- run: echo "linux_amd64_checksum="$(grep -P 'exoscale-cli_[0-9]+\.[0-9]+\.[0-9]+_linux_amd64.tar.gz' dist/exoscale-cli_*_checksums.txt | head -n 1 | cut -c1-64) >> $GITHUB_OUTPUT
id: get-linux-amd64-checksum
shell: bash

Expand Down
9 changes: 8 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,17 @@ scoops:
branch: master

publishers:
- name: rpms
env:
- AWS_ACCESS_KEY_ID={{ .Env.EXOSCALE_API_KEY }}
- AWS_SECRET_ACCESS_KEY={{ .Env.EXOSCALE_API_SECRET }}
ids:
- nfpms
cmd: ./go.mk/scripts/publish-rpm-artifact-to-sos.sh {{ .ArtifactPath }} exoscale-packages rpm/cli 10
- name: aptly
env:
- AWS_ACCESS_KEY_ID={{ .Env.EXOSCALE_API_KEY }}
- AWS_SECRET_ACCESS_KEY={{ .Env.EXOSCALE_API_SECRET }}
ids:
- nfpms
cmd: ./go.mk/scripts/publish-deb-artifact-to-sos.sh {{ .ArtifactPath }} exoscale-packages deb/cli 10
cmd: ./go.mk/scripts/publish-deb-artifact-to-sos.sh {{ .ArtifactPath }} exoscale-packages deb/cli 10 {{ .ProjectName }}
2 changes: 1 addition & 1 deletion go.mk

0 comments on commit c7e96e0

Please sign in to comment.