Skip to content

Commit 6567bc3

Browse files
committed
Merge branch hotfix/v8.1.3 into master
2 parents da15607 + 4f3a652 commit 6567bc3

File tree

3 files changed

+111
-80
lines changed

3 files changed

+111
-80
lines changed

Jenkinsfile

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pipeline {
7070
)
7171
booleanParam (
7272
name: 'clean',
73-
description: 'Rebuild binaries from the \'core\' repo',
73+
description: 'Rebuild binaries from the "core" repo',
7474
defaultValue: defaults.clean
7575
)
7676
// Windows
@@ -192,7 +192,6 @@ pipeline {
192192
stage('Prepare') {
193193
steps {
194194
script {
195-
if (params.sign) env.ENABLE_SIGNING=1
196195
branchDir = env.BRANCH_NAME.replaceAll(/\//,'_')
197196
deployData = []
198197
stageStats = [:]
@@ -382,6 +381,7 @@ pipeline {
382381
// TAR_RELEASE_SUFFIX = '-gcc5'
383382
// DEB_RELEASE_SUFFIX = '~stretch'
384383
RPM_RELEASE_SUFFIX = '.el7'
384+
RPM_SUSE_RELEASE_SUFFIX = '.suse12'
385385
SUSE_RPM_RELEASE_SUFFIX = '.suse12'
386386
}
387387
steps {
@@ -404,6 +404,7 @@ pipeline {
404404
// TAR_RELEASE_SUFFIX = '-gcc5'
405405
// DEB_RELEASE_SUFFIX = '~stretch'
406406
RPM_RELEASE_SUFFIX = '.el7'
407+
RPM_SUSE_RELEASE_SUFFIX = '.suse12'
407408
SUSE_RPM_RELEASE_SUFFIX = '.suse12'
408409
}
409410
steps {
@@ -569,16 +570,26 @@ void buildPackages(String platform, String license = 'opensource') {
569570
String label = "packages ${license}".toUpperCase()
570571

571572
try {
572-
if (!platform.startsWith('windows'))
573+
if (!platform.startsWith('windows')) {
573574
sh label: label, script: """
574575
cd build_tools
575576
./make_package.py ${args.join(' ')}
576577
"""
577-
else
578-
bat label: label, script: """
579-
cd build_tools
580-
python make_package.py ${args.join(' ')}
581-
"""
578+
} else {
579+
if (params.sign) env.ENABLE_SIGNING=1
580+
withCredentials([
581+
certificate(
582+
credentialsId: 'windows-codesign-cert',
583+
keystoreVariable: 'WINDOWS_CERTIFICATE',
584+
passwordVariable: 'WINDOWS_CERTIFICATE_PASSWORD'
585+
)
586+
]) {
587+
bat label: label, script: """
588+
cd build_tools
589+
python make_package.py ${args.join(' ')}
590+
"""
591+
}
592+
}
582593
} catch (err) {
583594
throw err
584595
} finally {

branchManager.jenkinsfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defaults = [
22
action_type: ['print_branches'],
33
action_help: '',
44
version: '0.0.0',
5-
protect_branch: true
5+
protect_branch: false
66
]
77

88
if (env.BRANCH_NAME == 'master') {
@@ -25,7 +25,7 @@ if (env.BRANCH_NAME ==~ /^(release)\/.+/) {
2525
pipeline {
2626
agent { label 'branch_manager' }
2727
environment {
28-
// GITHUB_TOKEN = credentials('github-token')
28+
GITHUB_TOKEN = credentials('github-token')
2929
TELEGRAM_TOKEN = credentials('telegram-bot-token')
3030
}
3131
options {
@@ -149,7 +149,7 @@ pipeline {
149149
} else {
150150
dir ('repos/' + repo) {
151151
checkoutRepo(repo)
152-
unprotectBranch(repo, branch)
152+
// unprotectBranch(repo, branch)
153153
pAction = mergeBranch(repo, branch, baseBranches)
154154
status.primary = (pAction) ? 'success' : 'failure'
155155
if (pAction && !repo.contains('documents-pipeline')) {
@@ -402,12 +402,11 @@ def protectBranch(String repo, String branch) {
402402
}
403403

404404
def unprotectBranch(String repo, String branch) {
405-
return true
406-
// return sh (
407-
// label: "${repo}: unprotect ${branch}",
408-
// script: "gh api -X DELETE repos/${repo}/branches/${branch}/protection",
409-
// returnStatus: true
410-
// ) == 0
405+
return sh (
406+
label: "${repo}: unprotect ${branch}",
407+
script: "gh api -X DELETE repos/${repo}/branches/${branch}/protection",
408+
returnStatus: true
409+
) == 0
411410
}
412411

413412
def sendNotification() {

reports.sh

Lines changed: 84 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,25 @@ cd "${0%/*}"
55

66
setup_colors() {
77
if [[ -z "${NO_COLOR-}" ]]; then
8-
NOFORMAT='\033[0m' BOLD='\033[1m'
9-
RED='\033[0;31m' GREEN='\033[0;32m' ORANGE='\033[0;33m' BLUE='\033[0;34m'
10-
PURPLE='\033[0;35m' CYAN='\033[0;36m' YELLOW='\033[1;33m'
8+
NOFORMAT='\033[0m'
9+
BOLD='\033[1m'
10+
RED='\033[0;31m'
11+
GREEN='\033[0;32m'
12+
ORANGE='\033[0;33m'
13+
BLUE='\033[0;34m'
14+
PURPLE='\033[0;35m'
15+
CYAN='\033[0;36m'
16+
YELLOW='\033[1;33m'
1117
else
12-
NOFORMAT='' BOLD='' RED='' GREEN='' ORANGE='' BLUE='' PURPLE='' CYAN='' YELLOW=''
18+
NOFORMAT=''
19+
BOLD=''
20+
RED=''
21+
GREEN=''
22+
ORANGE=''
23+
BLUE=''
24+
PURPLE=''
25+
CYAN=''
26+
YELLOW=''
1327
fi
1428
}
1529

@@ -41,22 +55,19 @@ declare -A TYPE_TITLES=(
4155
[archive]="Archive"
4256
[closuremaps_sdkjs_opensource]="SDKJS Closure Maps Opensource"
4357
[closuremaps_sdkjs_commercial]="SDKJS Closure Maps Commercial"
44-
[closuremaps_webapps_opensource]="WEB-APPS Closure Maps Opensource"
45-
[closuremaps_webapps_commercial]="WEB-APPS Closure Maps Commercial"
58+
[closuremaps_webapps_opensource]="WEB-APPS Closure Maps"
59+
# [closuremaps_webapps_commercial]="WEB-APPS Closure Maps Commercial"
4660
[generic]="Portable"
4761
[update]="Update"
4862
[inno]="Inno Setup"
4963
[advinst]="Advanced Installer"
5064
[x86_64]="x86_64"
5165
[v8]="x86_64 V8"
5266
[arm]="arm64"
53-
[altlinux]="ALT Linux"
5467
[appimage]="AppImage"
55-
[astra]="Astra Linux Special Edition"
5668
[debian]="Debian / Ubuntu"
5769
[flatpak]="Flatpak"
5870
[rhel]="RHEL / CentOS"
59-
[rosa]="ROSA"
6071
[snap]="Snapcraft"
6172
[suse]="SUSE Linux / OpenSUSE"
6273
)
@@ -66,9 +77,6 @@ keys_t=${1:-keys.txt}
6677
data_j=reports/data.json
6778
desc_h=build.html
6879

69-
rm -rfv reports $desc_h
70-
mkdir -p reports
71-
7280
msg "${BOLD}${GREEN}PREPARE${NOFORMAT}"
7381

7482
echo COMPANY_NAME=$COMPANY_NAME
@@ -77,6 +85,10 @@ echo BUILD_VERSION=$BUILD_VERSION
7785
echo BUILD_NUMBER=$BUILD_NUMBER
7886
echo S3_BASE_URL=$S3_BASE_URL
7987
echo S3_BUCKET=$S3_BUCKET
88+
89+
rm -rfv reports $desc_h
90+
mkdir -p reports
91+
8092
[[ ! -f $keys_t ]] && exit 1
8193
jq -n {} > $data_j
8294

@@ -86,43 +98,52 @@ json_add() {
8698
&& mv -f $data_j.tmp $data_j
8799
}
88100

89-
for product in core desktop builder server mobile; do
90-
if [[ $product == core ]] && grep -q -E "^((windows|mac|linux)/core|closure-maps)/" $keys_t; then
91-
(grep "^windows/core/" $keys_t || :) | while read key; do
92-
json_add $product win archive $key
93-
done
94-
(grep "^mac/core/" $keys_t || :) | while read key; do
95-
json_add $product mac archive $key
96-
done
97-
(grep "^linux/core/" $keys_t || :) | while read key; do
98-
json_add $product linux archive $key
99-
done
100-
(grep "^closure-maps/sdkjs/opensource/" $keys_t || :) | while read key; do
101-
json_add $product linux closuremaps_sdkjs_opensource $key
102-
done
103-
(grep "^closure-maps/sdkjs/commercial/" $keys_t || :) | while read key; do
104-
json_add $product linux closuremaps_sdkjs_commercial $key
105-
done
106-
(grep "^closure-maps/web-apps/opensource/" $keys_t || :) | while read key; do
107-
json_add $product linux closuremaps_webapps_opensource $key
108-
done
109-
(grep "^closure-maps/web-apps/commercial/" $keys_t || :) | while read key; do
110-
json_add $product linux closuremaps_webapps_commercial $key
111-
done
112-
elif [[ $product == mobile ]]; then
113-
(grep "^$product/android/" $keys_t || :) | while read key; do
114-
json_add $product android archive $key
115-
done
116-
else
117-
for platform in win mac linux; do
118-
for type in archive generic update inno advinst x86_64 v8 arm \
119-
altlinux appimage astra debian flatpak rhel rosa snap suse; do
120-
(grep "^$product/$platform/$type/" $keys_t || :) | while read key; do
121-
json_add $product $platform $type $key
122-
done
101+
(grep "^archive/.*/core-win" $keys_t || :) | while read key; do
102+
json_add core win archive $key
103+
done
104+
(grep "^archive/.*/core-mac" $keys_t || :) | while read key; do
105+
json_add core mac archive $key
106+
done
107+
(grep "^archive/.*/core-linux" $keys_t || :) | while read key; do
108+
json_add core linux archive $key
109+
done
110+
111+
(grep "^archive/.*/builder-win" $keys_t || :) | while read key; do
112+
json_add builder win archive $key
113+
done
114+
(grep "^archive/.*/builder-mac" $keys_t || :) | while read key; do
115+
json_add builder mac archive $key
116+
done
117+
(grep "^archive/.*/builder-linux" $keys_t || :) | while read key; do
118+
json_add builder linux archive $key
119+
done
120+
121+
(grep "^closure-maps/sdkjs/opensource/" $keys_t || :) | while read key; do
122+
json_add core linux closuremaps_sdkjs_opensource $key
123+
done
124+
(grep "^closure-maps/sdkjs/commercial/" $keys_t || :) | while read key; do
125+
json_add core linux closuremaps_sdkjs_commercial $key
126+
done
127+
(grep "^closure-maps/web-apps/opensource/" $keys_t || :) | while read key; do
128+
json_add core linux closuremaps_webapps_opensource $key
129+
done
130+
# (grep "^closure-maps/web-apps/commercial/" $keys_t || :) | while read key; do
131+
# json_add core linux closuremaps_webapps_commercial $key
132+
# done
133+
134+
(grep "^mobile/android/" $keys_t || :) | while read key; do
135+
json_add mobile android archive $key
136+
done
137+
138+
for product in desktop builder server; do
139+
for platform in win mac linux; do
140+
for type in archive generic update inno advinst x86_64 v8 arm \
141+
appimage debian flatpak rhel snap suse; do
142+
(grep "^$product/$platform/$type/" $keys_t || :) | while read key; do
143+
json_add $product $platform $type $key
123144
done
124145
done
125-
fi
146+
done
126147
done
127148

128149

@@ -136,7 +157,7 @@ jq -r "keys_unsorted[]" $data_j | while read product; do
136157
<html lang="en-US">
137158
<head>
138159
<title>$COMPANY_NAME ${PRODUCT_TITLES[$product]} - $BRANCH_NAME - $BUILD_NUMBER</title>
139-
<link rel="shortcut icon" sizes="16x16" href="$S3_BASE_URL/favicon.png" type="image/png">
160+
<link rel="shortcut icon" href="$S3_BASE_URL/favicon.ico" type="image/x-icon">
140161
<link rel="stylesheet" href="https://unpkg.com/@primer/css@21.0.7/dist/primer.css">
141162
</head>
142163
<body>
@@ -159,19 +180,21 @@ EOF
159180
sha1=$(<<<$object jq -er '.Metadata.sha1 // empty' || :)
160181
md5=$(<<<$object jq -er '.Metadata.md5 // empty' || :)
161182

162-
echo " <div class=\"d-inline-flex width-full\" style=\"gap:8px\">" >> $html
163-
echo " <span class=\"flex-1\"><a href=\"$S3_BASE_URL/$key\">${key##*/}</a></span>" >> $html
164-
echo " <span class=\"color-fg-muted\">$(LANG=C numfmt --to=iec-i $size)B</span>" >> $html
165-
if [[ -n $sha256 ]]; then
166-
echo " <span class=\"tooltipped tooltipped-nw tooltipped-no-delay\" aria-label=\"$sha256\">SHA256</span>" >> $html
167-
fi
168-
if [[ -n $sha1 ]]; then
169-
echo " <span class=\"tooltipped tooltipped-nw tooltipped-no-delay\" aria-label=\"$sha1\">SHA1</span>" >> $html
170-
fi
171-
if [[ -n $md5 ]]; then
172-
echo " <span class=\"tooltipped tooltipped-nw tooltipped-no-delay\" aria-label=\"$md5\">MD5</span>" >> $html
183+
if [[ -z $sha256 && -z $sha1 && -z $md5 ]]; then
184+
echo " <p class=\"m-0\">" >> $html
185+
echo " <a href=\"$S3_BASE_URL/$key\">${key##*/}</a>" >> $html
186+
echo " $(LANG=C numfmt --to=iec-i $size)B" >> $html
187+
echo " </p>" >> $html
188+
else
189+
echo " <details class=\"m-0\">" >> $html
190+
echo " <summary class=\"list-style-none\">" >> $html
191+
echo " <a href=\"$S3_BASE_URL/$key\">${key##*/}</a>" >> $html
192+
echo " $(LANG=C numfmt --to=iec-i $size)B" >> $html
193+
echo " <div class=\"dropdown-caret\"></div>" >> $html
194+
echo " </summary>" >> $html
195+
echo " <pre class=\"m-0\">SHA256: $sha256<br>SHA1: $sha1<br>MD5: $md5</pre>" >> $html
196+
echo " </details>" >> $html
173197
fi
174-
echo " </div>" >> $html
175198
done
176199
done
177200
done
@@ -206,9 +229,7 @@ if ls reports/*.html 2> /dev/null; then
206229

207230
for product in core desktop builder server mobile; do
208231
[[ -f reports/$product.html ]] || continue
209-
if [[ -f $desc_h ]]; then
210-
echo -n ' &centerdot; ' >> $desc_h
211-
fi
232+
[[ -f $desc_h ]] && echo -n ' &centerdot; ' >> $desc_h
212233
echo -n "<a href=\"$S3_BASE_URL/reports/$BRANCH_NAME/$BUILD_NUMBER/$product.html\" target=\"_blank\">${product^}</a>" >> $desc_h
213234
done
214235
fi

0 commit comments

Comments
 (0)