fix: correct CHANGELOG.md upload destination (#24287)
This updates the job logic so that workflow condition is evaluated by CircleCI rather than the shell. This also uses the "aws-s3" orb for uploading to S3 (rather than awscli).pull/24299/head
parent
b352a179a2
commit
3dabfcdd08
|
@ -898,25 +898,28 @@ jobs:
|
||||||
changelog:
|
changelog:
|
||||||
parameters:
|
parameters:
|
||||||
workflow:
|
workflow:
|
||||||
type: string
|
type: string
|
||||||
default: snapshot
|
|
||||||
docker:
|
docker:
|
||||||
- image: quay.io/influxdb/changelogger:latest
|
- image: quay.io/influxdb/changelogger:latest
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: |
|
- when:
|
||||||
export DESCRIPTION="In addition to the list of changes below, please also see the [official release \
|
condition:
|
||||||
notes](https://docs.influxdata.com/influxdb/${CIRCLE_BRANCH}/reference/release-notes/influxdb/) for \
|
or:
|
||||||
other important information about this release."
|
- equal: [ << parameters.workflow >>, nightly ]
|
||||||
|
- equal: [ << parameters.workflow >>, snapshot ]
|
||||||
|
steps:
|
||||||
|
- run: changelogger --product OSS
|
||||||
|
- when:
|
||||||
|
condition:
|
||||||
|
equal: [ << parameters.workflow >>, release ]
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
export DESCRIPTION="In addition to the list of changes below, please also see the [official release \
|
||||||
|
notes](https://docs.influxdata.com/influxdb/${CIRCLE_BRANCH}/reference/release-notes/influxdb/) for \
|
||||||
|
other important information about this release."
|
||||||
|
|
||||||
case << parameters.workflow >> in
|
changelogger --product OSS --release "<< pipeline.git.tag >>" --description "${DESCRIPTION}"
|
||||||
release)
|
|
||||||
changelogger --product OSS --release "${CIRCLE_TAG}" --description "${DESCRIPTION}"
|
|
||||||
;;
|
|
||||||
nightly|snapshot)
|
|
||||||
changelogger --product OSS
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: changelog_artifacts/
|
path: changelog_artifacts/
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
|
@ -927,27 +930,32 @@ jobs:
|
||||||
changelog-upload:
|
changelog-upload:
|
||||||
parameters:
|
parameters:
|
||||||
workflow:
|
workflow:
|
||||||
type: string
|
type: string
|
||||||
default: release
|
|
||||||
docker:
|
docker:
|
||||||
- image: ubuntu:latest
|
- image: cimg/python:3.6
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: /tmp/workspace
|
at: /tmp/workspace
|
||||||
- checkout
|
- when:
|
||||||
- run: |
|
condition:
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
equal: [ << parameters.workflow >>, release ]
|
||||||
apt-get update
|
steps:
|
||||||
apt-get install --yes --no-install-recommends awscli
|
- aws-s3/copy:
|
||||||
|
aws-region: AWS_S3_REGION
|
||||||
case << parameters.workflow >> in
|
aws-access-key-id: AWS_ACCESS_KEY_ID
|
||||||
release)
|
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
|
||||||
aws s3 cp /tmp/workspace/CHANGELOG.md "s3://dl.influxdata.com/influxdb/releases/CHANGELOG.${CIRCLE_SHA1}.md"
|
to: "s3://dl.influxdata.com/influxdb/releases/CHANGELOG.<< pipeline.git.tag >>.md"
|
||||||
;;
|
from: /tmp/workspace/CHANGELOG.md
|
||||||
nightly)
|
- when:
|
||||||
aws s3 cp /tmp/workspace/CHANGELOG.md "s3://dl.influxdata.com/platform/nightlies/${CIRCLE_TAG}/CHANGELOG.md"
|
condition:
|
||||||
;;
|
equal: [ << parameters.workflow >>, nightly ]
|
||||||
esac
|
steps:
|
||||||
|
- aws-s3/copy:
|
||||||
|
aws-region: AWS_S3_REGION
|
||||||
|
aws-access-key-id: AWS_ACCESS_KEY_ID
|
||||||
|
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
|
||||||
|
to: "s3://dl.influxdata.com/platform/nightlies/<< pipeline.git.branch >>/CHANGELOG.md"
|
||||||
|
from: /tmp/workspace/CHANGELOG.md
|
||||||
|
|
||||||
check_package_deb_amd64:
|
check_package_deb_amd64:
|
||||||
machine:
|
machine:
|
||||||
|
|
Loading…
Reference in New Issue