-
Notifications
You must be signed in to change notification settings - Fork 646
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Headless release: wire everything up
Signed-off-by: Tom Sellman <[email protected]>
- Loading branch information
1 parent
03f70a2
commit 8c67025
Showing
8 changed files
with
233 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# change to the project root | ||
cd "$(dirname "$0")/../.." | ||
|
||
# read the nextflow version | ||
read -r NF_VERSION<VERSION | ||
|
||
echo "Publishing nextflow release to github" | ||
|
||
# create a github (pre)release and attach launcher and dist files | ||
# use --verify-tag to fail if tag doesn't exist | ||
gh release create \ | ||
--prerelease \ | ||
--title "Version $NF_VERSION" \ | ||
--verify-tag \ | ||
"v$NF_VERSION" \ | ||
nextflow \ | ||
"build/releases/nextflow-$NF_VERSION-dist" | ||
|
||
echo "Done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# change to the project root | ||
cd "$(dirname "$0")/../.." | ||
|
||
# read the nextflow version | ||
read -r NF_VERSION<VERSION | ||
|
||
# determine publish location | ||
S3_RELEASE_BUCKET=${S3_RELEASE_BUCKET:-'www2.nextflow.io'} | ||
if [[ "$NF_VERSION" =~ /^.+(-edge|-EDGE)$/ ]]; then | ||
S3_RELEASE_DIR="releases/edge" | ||
else | ||
S3_RELEASE_DIR="releases/latest" | ||
fi | ||
|
||
|
||
#publish nextflow script as latest | ||
files+=( | ||
'nextflow' | ||
'nextflow.sha1' | ||
'nextflow.sha256' | ||
'nextflow.md5' | ||
'VERSION' | ||
) | ||
|
||
for file in "${files[@]}"; do | ||
filename=$(echo "$file" | tr '[:upper:]' '[:lower:]') | ||
aws s3 cp "$file" "s3://$S3_RELEASE_BUCKET/$S3_RELEASE_DIR/$filename" \ | ||
--no-progress \ | ||
--storage-class STANDARD \ | ||
--region eu-west-1 \ | ||
--acl public-read | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# change to the project root | ||
cd "$(dirname "$0")/../.." | ||
|
||
# read the nextflow version | ||
read -r NF_VERSION<VERSION | ||
|
||
# create & push an annotated git tag | ||
git tag "v$NF_VERSION" | ||
git push origin "v$NF_VERSION" | ||
|
||
echo "Done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
cd "$(dirname "$0")" | ||
|
||
# read the nextflow version | ||
read -r NF_VERSION<VERSION | ||
|
||
# prompt user to check version is correct | ||
# TODO:tom display plugin versions too | ||
echo " | ||
------------------------ | ||
This will release: | ||
nextflow: $NF_VERSION | ||
------------------------ | ||
If these are not the versions you want to release, type 'no' and update the below | ||
files (without committing), then run this script again: | ||
- VERSION | ||
- nextflow | ||
- changelog.txt | ||
" | ||
|
||
echo -n "Type 'yes' to proceed: " | ||
read -r proceed | ||
if [[ "$proceed" != "yes" ]]; then | ||
echo "Aborting" | ||
exit | ||
fi | ||
|
||
# update the digest files before committing anything | ||
./gradlew makeDigest | ||
|
||
# create the release commit, including text '[release]' to trigger the github action | ||
# the github action workflow will perform the following tasks | ||
# - tag the release | ||
# - build the release artifacts | ||
# - deploy the release artifacts to maven/docker/S3/etc | ||
# - create a (pre-release) github release | ||
# - deploy the plugins, and update the plugin index | ||
git commit -s -am "Release $NF_VERSION [release]" | ||
# push the current branch is to the remote origin | ||
git push origin HEAD | ||
|
||
echo " | ||
------------------------------------------------------------ | ||
Release commit pushed. | ||
This should trigger a github release workflow. | ||
Once the workflow is complete, you should add the changelog | ||
to the github release. | ||
------------------------------------------------------------ | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters