Skip to content

Commit

Permalink
Build 1.21 bullseye
Browse files Browse the repository at this point in the history
Removed unused ppc64le arch
Removed ruby dependency package_cloud
If atotto/packagecloud#5 gets merged, then we
should change the location in pc.sh
  • Loading branch information
alephnull committed Dec 14, 2023
1 parent 0643c57 commit 1e6894e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ jobs:
matrix:
gover:
- "1.21"
- "1.20"
- "1.19"
debver:
- bookworm
include:
- gover: "1.19"
debver: bullseye
- bullseye
- bookworm

runs-on: ubuntu-latest

Expand Down
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ARG DEB_VERSION
ARG DEBIAN_FRONTEND=noninteractive
# Install deps
RUN dpkg --add-architecture arm64 \
&& dpkg --add-architecture ppc64el \
&& dpkg --add-architecture s390x \
&& apt-get update \
&& apt-get dist-upgrade -y -q \
Expand Down Expand Up @@ -43,8 +42,7 @@ RUN dpkg --add-architecture arm64 \
unzip \
sudo \
jq \
rpm \
ruby-dev
rpm

# install docker cli
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
Expand All @@ -62,8 +60,8 @@ RUN curl -fsSL https://github.com/goreleaser/goreleaser/releases/latest/download
# experimental features are not enabled for the CLI - to mitigate that.
ENV DOCKER_CLI_EXPERIMENTAL=enabled

# Upload to packagecloud.io
RUN gem install rake package_cloud
# pc.sh needs packagecloud
RUN go install github.com/tyklabs/packagecloud@latest

COPY unlock-agent.sh pc.sh /
COPY daemon.json /etc/docker/daemon.json
14 changes: 8 additions & 6 deletions pc.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

# goreleaser calls a custom publisher for each artefact
# packagecloud expects the distro version when pushing
# this script bridges both by choosing the appropriate list of distro versions from $DEBVERS and $RPMVERS
# $REPO, $DEBVERS and $RPMVERS are expected to be set by goreleaser
# goreleaser calls a custom publisher for each artefact packagecloud
# expects the distro version when pushing this script bridges both by
# choosing the appropriate list of distro versions from $DEBVERS and
# $RPMVERS
# $REPO, $DEBVERS and $RPMVERS are expected to be set by the
# user

REQUIRED_VARS="PACKAGECLOUD_TOKEN REPO"

Expand Down Expand Up @@ -63,7 +65,7 @@ for i in $vers; do
[[ ! -s ${pkg} ]] && echo "File is empty or does not exists" && exit 1

# Yank packages first to enable tag re-use
package_cloud yank $REPO/$i $(basename $pkg) || true
package_cloud push $REPO/$i $pkg
packagecloud rm $REPO/$i $(basename $pkg) || true
packagecloud push $REPO/$i $pkg

done

0 comments on commit 1e6894e

Please sign in to comment.