Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(shipit): Remove the need for a release_note.md #720

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 5 additions & 56 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ groups:
- unit-tests-pr
- acceptance-tests
- acceptance-tests-pr
- pre
- rc
- shipit
- patch
Expand Down Expand Up @@ -226,63 +225,12 @@ jobs:
status: failure
context: acceptance-tests

- name: pre
public: true
serial: true
plan:
- do:
- get: git
passed:
- acceptance-tests
trigger: true
- get: version
trigger: true
- task: release-notes
config:
platform: linux
image_resource:
type: docker-image
source:
repository: cf-routing.common.repositories.cloud.sap/haproxy-boshrelease-testflight
tag: latest
username: ((docker.username))
password: ((docker.password))
run:
path: sh
args:
- -ce
- |
cd git
if [ -f ci/release_notes.md ]; then
echo "###### RELEASE NOTES ###############"
echo
cat ci/release_notes.md
echo
echo "########################################"
echo
else
echo "NO RELEASE NOTES HAVE BEEN WRITTEN"
echo "You *might* want to do that before"
echo "hitting (+) on that shipit job..."
echo
fi
inputs:
- name: git
on_failure:
put: notify
params:
channel: "#haproxy-boshrelease"
username: ci-bot
icon_url: "((slack.icon))"
text: release candidate job 'pre' failed (which is unusual).
ok: false

- name: rc
public: true
plan:
- do:
- in_parallel:
- { get: git, trigger: true, passed: [pre] }
- { get: git, trigger: true, passed: [acceptance-tests] }
- { get: version, trigger: false, params: {pre: rc} }
- put: version
params: {file: version/number}
Expand Down Expand Up @@ -383,12 +331,13 @@ jobs:
- put: blobstore
params:
file: "gh/artifacts/haproxy-*.tgz"
- put: github
- put: github-release
params:
name: gh/name
tag: gh/tag
body: gh/notes.md
globs: [gh/artifacts/*, gh/artifacts-patched/*]
globs: [gh/artifacts/*, gh/artifacts-patched/*]
drafts: true
- put: notify
params:
channel: "#haproxy-boshrelease"
Expand Down Expand Up @@ -506,7 +455,7 @@ resources:
source:
url: ((slack.webhook))

- name: github
- name: github-release
type: github-release
source:
user: cloudfoundry
Expand Down
11 changes: 0 additions & 11 deletions ci/release_notes_template.md

This file was deleted.

27 changes: 20 additions & 7 deletions ci/scripts/shipit
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ if [[ -z "${VERSION_TO_CREATE}" ]]; then
exit 2
fi

if [[ ! -f "${REPO_ROOT}/ci/release_notes.md" ]]; then
echo >&2 "ci/release_notes.md not found. Did you forget to write them?"
exit 1
fi

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

###############################################################
Expand Down Expand Up @@ -106,9 +101,27 @@ mkdir -p "${RELEASE_ROOT}/artifacts"
echo "v${VERSION}" > "${RELEASE_ROOT}/tag"
echo "v${VERSION}" > "${RELEASE_ROOT}/name"
mv "${REPO_ROOT}"/releases/*/*-"${VERSION}".tgz "${RELEASE_ROOT}/artifacts"
mv "${REPO_ROOT}/ci/release_notes.md" "${RELEASE_ROOT}/notes.md"

cat >> "${RELEASE_ROOT}/notes.md" <<EOF
# haproxy-boshrelease ${VERSION}

## Fixes
<!--
- fix a (@personA)
- fix b (@personB)
//-->

## New Features
<!--
- feature a (@personA)
- feature b (@personB)
//-->

## Upgrades
<!--
- `component` has been upgraded from v1.0.0 to v1.2.3
//-->

### Versions

The following versions of upstream components are included in this haproxy-boshrelease:
Expand Down Expand Up @@ -199,5 +212,5 @@ EOF
cp -a "${REPO_ROOT}" "${REPO_OUT}"

cat > "${NOTIFICATION_OUT:-notifications}/message" <<EOS
New ${RELEASE_NAME} v${VERSION} released. <https://github.com/${GITHUB_OWNER}/${RELEASE_NAME}-boshrelease/releases/tag/v${VERSION}|Release notes>.
New ${RELEASE_NAME} v${VERSION} release draft created. Please complete the <https://github.com/${GITHUB_OWNER}/${RELEASE_NAME}-boshrelease/releases/tag/v${VERSION}|Release notes> in GitHub and finalize the release.
EOS