-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnarayana-release-process.sh
executable file
·110 lines (102 loc) · 3.51 KB
/
narayana-release-process.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/bash
# You need to run this script with 2 arguments.
# Arguments are then tranformed to env varibales CURRENT and NEXT
# Release process releases version ${CURRENT} and prepares github with commits to ${NEXT}-SNAPSHOT
#
# 2 arguments: `./narayana-release-process.sh CURRENT NEXT`
if [ $# -ne 2 ]; then
echo 1>&2 "$0: usage: CURRENT NEXT"
exit 2
else
CURRENT=$1
NEXT=$2
fi
echo "You will need: VPN, credentials for jbosstm host, jira admin, github permissions on all jbosstm/ repo and nexus permissions."
echo "Please check the configuration in ~/.m2/settings.xml with repository 'jboss-releases-repository' and correct username/password."
read -p "Have you done these steps? y/n " STEPSOK
if [[ $STEPSOK == n* ]]
then
exit
fi
# we want to check if this repo has already been tagged with the same version before
git fetch upstream --tags
if [[ $? != 0 ]]; then
echo "fetch upstream failed, exiting"
exit
fi
set +e
git tag | grep -x $CURRENT
if [[ $? != 0 ]]
then
read -p "Should the release be aborted if there are local commits (y/n): " ok
if [[ $ok == y* ]]; then
git status | grep "nothing to commit"
if [[ $? != 0 ]]
then
git status
exit
fi
git status | grep "ahead"
if [[ $? != 1 ]]
then
git status
exit
fi
fi
git log -n 5
read -p "Did the log before look OK?" ok
if [[ $ok == n* ]]
then
exit
fi
set -e
read -p "Until JBTM-3891 is resolved, please review with project team to ensure that it is safe to release. Please check for failed CI jobs before continuing. Continue? y/n " NOBLOCKERS
if [[ $NOBLOCKERS == n* ]]
then
exit
fi
echo "Executing pre-release script, this may be interactive so please stand by"
(cd ./scripts/ ; ./pre-release.sh $CURRENT $NEXT)
echo "This script is only interactive at the very end now, press enter to continue"
read
set +e
git fetch upstream --tags
else
echo "This script is only interactive at the very end now, press enter to continue"
read
fi
rm -rf $PWD/localm2repo
cd -
cd ~/tmp/lra/$CURRENT/sources/lra/
git checkout $CURRENT
if [[ $? != 0 ]]
then
echo 1>&2 lra: Tag '$CURRENT' did not exist
exit
fi
MAVEN_OPTS="-XX:MaxPermSize=512m"
if [[ $(uname) == CYGWIN* ]]
then
ORSON_PATH=`cygpath -w $PWD/ext/`
else
ORSON_PATH=$PWD/ext/
fi
rm -rf $PWD/localm2repo
# uploaded artifacts go straight live without the ability to close the repo at the end, so the install is done to verify that the build will work
./build.sh clean install -Dmaven.repo.local=${PWD}/localm2repo -DskipTests -Dorson.jar.location=$ORSON_PATH -Pcommunity
if [[ $? != 0 ]]
then
echo 1>&2 Could not install narayana
exit
fi
# It is important in the deploy step that if you are deploying to nexus you provide a reference to your settings file as the ./build.sh overrides the default settings file discovery of Maven. Please see https://github.com/jbosstm/narayana/wiki/Narayana-Release-Process for details of the settings.xml requirements
./build.sh clean deploy -Dmaven.repo.local=${PWD}/localm2repo -DskipTests -gs ~/.m2/settings.xml -Dorson.jar.location=$ORSON_PATH -Prelease,community -DskipNexusStagingDeployMojo=false
if [[ $? != 0 ]]
then
echo 1>&2 Could not deploy lra to nexus
exit
fi
# Post-release steps
echo "Please visit Narayana CI and check the quickstarts are working with the release and obtain performance numbers for the blog post"
echo "Please open a PR to lra-coordinator-quarkus when the artifact is available on nexus."
echo "Please raise a Jira and pull request to update WildFly to the released version of lra"