2 # Macros for the AutoRelease project
4 name: autorelease-release-tag
8 default: '{release-tag}'
9 description: "The Release train tag to use eg. Beryllium-SR1"
12 name: autorelease-release-branch
16 default: '{release-branch}'
17 description: "The Release train branch to base build off eg. stable/beryllium"
20 name: autorelease-build-timeout
28 name: autorelease-checkout-gerrit-patch
34 # If the project is autorelease then we do not need to cd
35 if [ "$GERRIT_PROJECT" != "releng/autorelease" ]; then
36 cd "$WORKSPACE/$GERRIT_PROJECT"
39 echo "Checking out ${GERRIT_PROJECT} patch ${GERRIT_REFSPEC}..."
40 git fetch origin ${GERRIT_REFSPEC} && git checkout FETCH_HEAD
42 # If the project is autorelease then we need to init and update submodules
43 if [ "$GERRIT_PROJECT" != "releng/autorelease" ]; then
44 git submodule update --init
50 - config-file-provider:
52 - file-id: 'autorelease-settings'
53 variable: 'SETTINGS_FILE'
54 - file-id: 'global-settings'
55 variable: 'GLOBAL_SETTINGS_FILE'
58 name: autorelease-determine-merge-order
61 virtualenv --system-site-packages $WORKSPACE/venv
62 source $WORKSPACE/venv/bin/activate
63 PYTHON="$WORKSPACE/venv/bin/python"
64 $PYTHON -m pip install --upgrade pip
65 $PYTHON -m pip install --upgrade networkx
67 ./scripts/determine-merge-order.py
69 rm -rf $WORKSPACE/venv
72 name: autorelease-maven-deploy
74 - shell: !include-raw: include-raw-autorelease-maven-deploy.sh
77 name: autorelease-maven-sources
80 maven-version: '{maven-version}'
85 -DoutputFile=$WORKSPACE/sources.log
87 {opendaylight-infra-mvn-opts}
89 - '-Xmx4096m -XX:MaxPermSize=1024m'
90 settings: '{settings}'
92 global-settings: '{global-settings}'
93 global-settings-type: cfp
96 name: autorelease-maven-sources-post-process
99 awk '/The following files have NOT been resolved:/,/^$/' sources.log > missing-sources.log
102 name: autorelease-generate-taglist
105 echo autorelease `git rev-parse --verify HEAD` ${RELEASE_TAG} \
106 | tee -a $WORKSPACE/taglist.log
107 git submodule foreach 'echo $path `git rev-parse --verify HEAD` ${RELEASE_TAG} \
108 | tee -a $WORKSPACE/taglist.log'
111 name: autorelease-distribute-taglist
113 - integration-set-variables
116 set +e # DO NOT fail build if copying fails.
118 if [ -d "integration/distribution/distributions" ]; then
119 cp -vf "$WORKSPACE/taglist.log" "integration/distribution/distributions/karaf/src/main/assembly/"
121 cp -vf "$WORKSPACE/taglist.log" "integration/distribution/$KARAF_ARTIFACT/src/main/assembly/"
124 # DO NOT fail the build if copying failed.
128 name: autorelease-generate-release-patches
130 - shell: !include-raw:
131 - ../global-jjb/shell/lftools-install.sh
132 - include-raw-autorelease-release-versions.sh
135 name: autorelease-get-integration-test-variables
137 - integration-set-variables
138 - shell: !include-raw: include-raw-autorelease-get-integration-test-variables.sh
140 properties-file: variables.prop
143 name: autorelease-fix-relative-paths
146 ./scripts/fix-relativepaths.sh
149 name: autorelease-generate-release-notes
152 cd $WORKSPACE/scripts/release_notes_management
153 java -jar target/autonotes.jar
154 if [ -f "$WORKSPACE/scripts/release_notes_management/projects/release-notes.rst" ]; then
155 mkdir -p $WORKSPACE/archives
156 cp -vf "$WORKSPACE/scripts/release_notes_management/projects/release-notes.rst" "$WORKSPACE/archives"
160 # include-raw-autorelease-notify-build-failure.sh searches console log for
161 # failures and emails the status to the release mailing list.
162 name: opendaylight-infra-notify-status
166 - shell: !include-raw: include-raw-autorelease-notify-build-failure.sh
167 script-only-if-succeeded: 'False'
168 script-only-if-failed: 'True'