@@ -7,7 +7,7 @@ properties([
77 string(defaultValue: 'ayufan-pine64', description: 'GitHub username or organization', name: 'GITHUB_USER'),
88 string(defaultValue: 'build-pine64-image', description: 'GitHub repository', name: 'GITHUB_REPO'),
99 booleanParam(defaultValue: true, description: 'Whether to upload to Github for release or not', name: 'GITHUB_UPLOAD'),
10- string(devaultValue : 'all', description: 'What makefile build type to target', name: 'MAKE_TARGET'),
10+ choice(choices : 'all\nkernel-tarball\nlinux-package\nxenial-minimal-pinebook\nxenial-mate-pinebook\nstretch-i3-pinebook\nxenial-pinebook\nlinux-pinebook\nxenial-minimal-pine64\nlinux-pine64\nxenial-minimal-sopine\nlinux-sopine ', description: 'What makefile build type to target', name: 'MAKE_TARGET')
1111 ])
1212])
1313*/
@@ -50,43 +50,41 @@ node('docker && linux-build') {
5050 " GITHUB_REPO=$GITHUB_REPO "
5151 ]) {
5252 stage ' Release'
53- if (GITHUB_UPLOAD == true ) {
54- sh ''' #!/bin/bash
55- set -xe
56- shopt -s nullglob
57-
58- github-release release \
59- --tag "${VERSION}" \
60- --name "$VERSION: $BUILD_TAG" \
61- --description "${CHANGES}\n\n ${BUILD_URL}" \
62- --draft
53+ if (params. GITHUB_UPLOAD ) {
54+ sh ''' #!/bin/bash
55+ set -xe
56+ shopt -s nullglob
6357
64- for file in *.xz *.deb; do
65- github-release upload \
58+ github-release release \
6659 --tag "${VERSION}" \
67- --name "$(basename "$file") " \
68- --file "$file" &
69- done
60+ --name "$VERSION: $BUILD_TAG " \
61+ --description "${CHANGES} \n\n ${BUILD_URL}" \
62+ --draft
7063
71- wait
64+ for file in *.xz *.deb; do
65+ github-release upload \
66+ --tag "${VERSION}" \
67+ --name "$(basename "$file")" \
68+ --file "$file" &
69+ done
7270
73- if [[ "$PRERELEASE" == "true" ]]; then
74- github-release edit \
75- --tag "${VERSION}" \
76- --name "$VERSION: $BUILD_TAG" \
77- --description "${CHANGES} \n\n ${BUILD_URL }" \
78- --pre-release
79- else
80- github-release edit \
81- --tag "${VERSION}" \
82- --name "$VERSION: $BUILD_TAG" \
83- --description "${CHANGES} \n\n ${BUILD_URL}"
84- fi
85- '''
86- }
87- else
88- {
89- echo ' Flagged as no upload release job'
71+ wait
72+
73+ if [[ "$PRERELEASE" == "true" ]]; then
74+ github-release edit \
75+ --tag "${VERSION }" \
76+ --name "$VERSION: $BUILD_TAG" \
77+ --description "${CHANGES} \n\n ${BUILD_URL}" \
78+ --pre-release
79+ else
80+ github-release edit \
81+ --tag "${VERSION}" \
82+ --name "$VERSION: $BUILD_TAG" \
83+ --description "${CHANGES} \n\n ${BUILD_URL}"
84+ fi
85+ '''
86+ } else {
87+ echo ' Flagged as an no upload release job'
9088 }
9189 }
9290 }
0 commit comments