Skip to content

Commit

Permalink
fix: flatten artifact signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
bnpfeife committed Apr 25, 2024
1 parent 673fc16 commit 7ed259a
Showing 1 changed file with 22 additions and 30 deletions.
52 changes: 22 additions & 30 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ workflows:
branches:
ignore: /.*/
tags:
only: /^[0-9]+(\.[0-9]+)*(\S*)([a|rc|beta]([0-9]+))+$/
only: /^[0-9]+(\.[0-9]+)*(\S*)([a|rc|beta]([0-9]+))+$/
- deploy-release:
requires:
- build
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
--release \
--package \
--platform all \
--arch all \
--arch all
--upload-overwrite \
--upload \
--bucket dl.influxdata.com/chronograf/releases
Expand Down Expand Up @@ -209,43 +209,35 @@ jobs:
- attach_workspace:
at: /tmp/workspace
- run: |
for target in /tmp/workspace/build/*
do
case "${target}"
in
# rsign is shipped on Alpine Linux which uses "busybox ash" instead
# of bash. ash is somewhat more posix compliant and is missing some
# extensions and niceties from bash.
*.deb|*.rpm|*.tar.gz|*.zip)
rsign "${target}"
;;
esac
done
mkdir -p /tmp/workspace/signatures
find /tmp/workspace/build \
-type f \( \
-iname '*.deb' \
-o -iname '*.rpm' \
-o -iname '*.tar.gz' \
-o -iname '*.zip' \
\) -exec rsign "{}" \; -exec mv "{}.asc" /tmp/workspace/signatures \;
- persist_to_workspace:
root: /tmp/workspace
paths:
- build
- signatures
- store_artifacts:
path: /tmp/workspace/build
path: /tmp/workspace/signatures

packages-upload-signatures:
docker:
# `cimg/python` may seem incorrect, but apparently it includes `curl`
# which is required for `aws-s3/sync` to work. This image is also
# suggested by the orb's documentation:
# https://circleci.com/developer/orbs/orb/circleci/aws-s3#usage-examples
- image: 'cimg/python:3.6'
- image: cimg/python:3.12.3
steps:
- attach_workspace:
at: /tmp/workspace/build
at: /tmp/workspace
- aws-s3/sync:
arguments: |
--dryrun \
--exclude '*' \
--include '*.asc' \
arguments: >
--exclude '*'
--include 'chronograf-*.asc'
--include 'chronograf_*.asc'
--acl public-read
aws-region: AWS_REGION
aws-access-key-id: AWS_ACCESS_KEY_ID
aws-region: AWS_REGION
aws-access-key-id: AWS_ACCESS_KEY_ID
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
from: '/tmp/workspace/build'
to: 's3://dl.influxdata.com/chronograf/releases/'
from: /tmp/workspace/signatures/
to: s3://dl.influxdata.com/chronograf/releases/

0 comments on commit 7ed259a

Please sign in to comment.