Skip to content

Commit 2b73148

Browse files
authored
Merge pull request #14052 from keymanapp/maint/web/13399_tc-config_dev
This matches the existing TC configuration as closely as possible. Part-of: #13399
2 parents 962eb76 + 1904470 commit 2b73148

10 files changed

+583
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Keyman is copyright (C) SIL Global. MIT License.
2+
#
3+
# This script should be the identical for nightly/beta/stable for a given platform
4+
#
5+
6+
$ErrorActionPreference = "Stop"
7+
8+
$RSYNC_HOME = $env:RSYNC_HOME
9+
$USERPROFILE = $env:USERPROFILE
10+
11+
New-Item -Force -ItemType Directory symbols\000admin
12+
cd symbols\000admin
13+
14+
#
15+
# Download the symbol server index files with rsync from downloads.keyman.com
16+
# (rsync requires that we are in the symbols folder to get folders in
17+
# sync correctly; it is possible to resolve this but easier to just cd.)
18+
#
19+
20+
$rsync_args = @(
21+
'-vrzltp', # verbose, recurse, zip, copy symlinks, preserve times, permissions
22+
'--chmod=Dug=rwx,Do=rx,Fug=rw,Fo=r', # map Windows security to host security
23+
'--stats', # show statistics for log
24+
'--rsync-path="sudo -u vu2009 rsync"', # path on remote server
25+
"--rsh=$RSYNC_HOME\ssh -i $USERPROFILE\.ssh\id_rsa -o UserKnownHostsFile=$USERPROFILE\.ssh\known_hosts", # use ssh
26+
"[email protected]:/var/www/virtual/downloads.keyman.com/htdocs/windows/symbols/000admin/lastid.txt", # target server + path
27+
"." # download the whole symbols 000Admin folder
28+
)
29+
30+
& $RSYNC_HOME\rsync.exe $rsync_args
31+
if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
32+
33+
$rsync_args = @(
34+
'-vrzltp', # verbose, recurse, zip, copy symlinks, preserve times, permissions
35+
'--chmod=Dug=rwx,Do=rx,Fug=rw,Fo=r', # map Windows security to host security
36+
'--stats', # show statistics for log
37+
'--rsync-path="sudo -u vu2009 rsync"', # path on remote server
38+
"--rsh=$RSYNC_HOME\ssh -i $USERPROFILE\.ssh\id_rsa -o UserKnownHostsFile=$USERPROFILE\.ssh\known_hosts", # use ssh
39+
"[email protected]:/var/www/virtual/downloads.keyman.com/htdocs/windows/symbols/000admin/history.txt", # target server + path
40+
"." # download the whole symbols 000Admin folder
41+
)
42+
43+
& $RSYNC_HOME\rsync.exe $rsync_args
44+
if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
45+
46+
$rsync_args = @(
47+
'-vrzltp', # verbose, recurse, zip, copy symlinks, preserve times, permissions
48+
'--chmod=Dug=rwx,Do=rx,Fug=rw,Fo=r', # map Windows security to host security
49+
'--stats', # show statistics for log
50+
'--rsync-path="sudo -u vu2009 rsync"', # path on remote server
51+
"--rsh=$RSYNC_HOME\ssh -i $USERPROFILE\.ssh\id_rsa -o UserKnownHostsFile=$USERPROFILE\.ssh\known_hosts", # use ssh
52+
"[email protected]:/var/www/virtual/downloads.keyman.com/htdocs/windows/symbols/000admin/server.txt", # target server + path
53+
"." # download the whole symbols 000Admin folder
54+
)
55+
56+
& $RSYNC_HOME\rsync.exe $rsync_args
57+
if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
58+
59+
# EOF
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#!/usr/bin/env bash
2+
# Keyman is copyright (C) SIL Global. MIT License.
3+
#
4+
# TC build script to build release of Keyman Developer
5+
6+
# shellcheck disable=SC2164
7+
# shellcheck disable=SC1091
8+
9+
## START STANDARD BUILD SCRIPT INCLUDE
10+
# adjust relative paths as necessary
11+
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
12+
. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh"
13+
## END STANDARD BUILD SCRIPT INCLUDE
14+
15+
# shellcheck disable=SC2154
16+
. "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh"
17+
18+
################################ Main script ################################
19+
20+
builder_describe \
21+
"Build Keyman Developer on Windows" \
22+
"all run all actions" \
23+
"build build Keyman Developer and test keyboards" \
24+
"publish publish release of Keyman Developer"
25+
26+
builder_parse "$@"
27+
28+
# shellcheck disable=SC2154
29+
cd "${KEYMAN_ROOT}/developer/src"
30+
31+
function _build_developer() {
32+
builder_echo start "build developer" "Building Keyman Developer"
33+
34+
./build.sh configure build test api publish --npm-publish
35+
36+
builder_echo end "build developer" success "Finished building Keyman Developer"
37+
}
38+
39+
function _build_testkeyboards() {
40+
builder_echo start "build testkeyboards" "Building test keyboards"
41+
42+
"${KEYMAN_ROOT}/common/test/keyboards/build.sh"
43+
44+
builder_echo end "build testkeyboards" success "Finished building test keyboards"
45+
}
46+
47+
function _publish_sentry() {
48+
builder_echo start "publish sentry" "Publishing debug information files to Sentry"
49+
50+
"${KEYMAN_ROOT}/developer/src/tools/sentry-upload-difs.sh"
51+
52+
builder_echo end "publish sentry" success "Finished publishing debug information files to Sentry"
53+
}
54+
55+
function _download_symbol_server_index() {
56+
# Download symbol server index from symbol server
57+
if ! is_windows; then
58+
# requires Powershell
59+
return 0
60+
fi
61+
62+
builder_echo start "download symbol server index" "Downloading symbol server index"
63+
64+
# shellcheck disable=SC2154
65+
powershell -NonInteractive -ExecutionPolicy Bypass -File "${THIS_SCRIPT_PATH}/download-symbol-server-index.ps1"
66+
67+
builder_echo end "download symbol server index" success "Finished downloading symbol server index"
68+
}
69+
70+
function _publish_new_symbols() {
71+
# Publish new symbols to symbol server
72+
if ! is_windows; then
73+
# requires Powershell
74+
return 0
75+
fi
76+
77+
builder_echo start "publish new symbols" "Publishing new symbols to symbol server"
78+
79+
# shellcheck disable=SC2154
80+
powershell -NonInteractive -ExecutionPolicy Bypass -File "${THIS_SCRIPT_PATH}/publish-new-symbols.ps1"
81+
82+
builder_echo end "publish new symbols" success "Finished publishing new symbols to symbol server"
83+
}
84+
85+
function _publish_to_downloads_keyman_com() {
86+
# Publish to downloads.keyman.com
87+
if ! is_windows; then
88+
# requires Powershell
89+
return 0
90+
fi
91+
92+
builder_echo start "publish to downloads.keyman.com" "Publishing release to downloads.keyman.com"
93+
94+
# shellcheck disable=SC2154
95+
powershell -NonInteractive -ExecutionPolicy Bypass -File "${THIS_SCRIPT_PATH}/publish-to-downloads-keyman-com.ps1"
96+
97+
builder_echo end "publish to downloads.keyman.com" success "Finished publishing release to downloads.keyman.com"
98+
}
99+
100+
function _publish_api_documentation() {
101+
# Upload new Keyman Developer API documentation to help.keyman.com
102+
builder_echo start "publish api documentation" "Uploading new Keyman Developer API documentation to help.keyman.com"
103+
104+
"${KEYMAN_ROOT}/resources/build/help-keyman-com.sh" developer
105+
106+
builder_echo end "publish api documentation" success "Finished uploading new Keyman Developer API documentation to help.keyman.com"
107+
}
108+
109+
function build_developer_action() {
110+
_build_developer
111+
_build_testkeyboards
112+
}
113+
114+
function publish_action() {
115+
_publish_sentry
116+
_download_symbol_server_index
117+
_publish_new_symbols
118+
_publish_to_downloads_keyman_com
119+
_publish_api_documentation
120+
}
121+
122+
if builder_has_action all; then
123+
build_developer_action
124+
publish_action
125+
else
126+
builder_run_action build build_developer_action
127+
builder_run_action publish publish_action
128+
fi
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
# Keyman is copyright (C) SIL Global. MIT License.
3+
#
4+
# TC build script for Keyman Developer on Linux
5+
6+
# shellcheck disable=SC2164
7+
# shellcheck disable=SC1091
8+
9+
## START STANDARD BUILD SCRIPT INCLUDE
10+
# adjust relative paths as necessary
11+
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
12+
. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh"
13+
## END STANDARD BUILD SCRIPT INCLUDE
14+
15+
################################ Main script ################################
16+
17+
builder_describe \
18+
"Build Keyman Developer on Linux" \
19+
"all run all actions" \
20+
"build build"
21+
22+
builder_parse "$@"
23+
24+
cd "${KEYMAN_ROOT}/developer/src"
25+
26+
function build_developer_action() {
27+
builder_echo start "build developer" "Building Keyman Developer"
28+
29+
./build.sh configure build test
30+
31+
builder_echo end "build developer" success "Finished building Keyman Developer"
32+
}
33+
34+
if builder_has_action all; then
35+
build_developer_action
36+
else
37+
builder_run_action build build_developer_action
38+
fi
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
# Keyman is copyright (C) SIL Global. MIT License.
3+
#
4+
# TC build script for Keyman Developer on macOS
5+
6+
# shellcheck disable=SC2164
7+
# shellcheck disable=SC1091
8+
9+
## START STANDARD BUILD SCRIPT INCLUDE
10+
# adjust relative paths as necessary
11+
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
12+
. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh"
13+
## END STANDARD BUILD SCRIPT INCLUDE
14+
15+
################################ Main script ################################
16+
17+
builder_describe \
18+
"Build Keyman Developer on macOS" \
19+
"all run all actions" \
20+
"build build"
21+
22+
builder_parse "$@"
23+
24+
cd "${KEYMAN_ROOT}/developer/src"
25+
26+
function build_developer_action() {
27+
builder_echo start "build developer" "Building Keyman Developer"
28+
29+
./build.sh configure build test
30+
31+
builder_echo end "build developer" success "Finished building Keyman Developer"
32+
}
33+
34+
if builder_has_action all; then
35+
build_developer_action
36+
else
37+
builder_run_action build build_developer_action
38+
fi
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/usr/bin/env bash
2+
# Keyman is copyright (C) SIL Global. MIT License.
3+
#
4+
# TC build script for Keyman Developer on Windows
5+
6+
# shellcheck disable=SC2164
7+
# shellcheck disable=SC1091
8+
9+
## START STANDARD BUILD SCRIPT INCLUDE
10+
# adjust relative paths as necessary
11+
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
12+
. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh"
13+
## END STANDARD BUILD SCRIPT INCLUDE
14+
15+
################################ Main script ################################
16+
17+
builder_describe \
18+
"Build Keyman Developer on Windows" \
19+
"all run all actions" \
20+
"build build Keyman Developer and test keyboards" \
21+
"publish publish debug information files to sentry"
22+
23+
builder_parse "$@"
24+
25+
# shellcheck disable=SC2154
26+
cd "${KEYMAN_ROOT}/developer/src"
27+
28+
function build_developer_action() {
29+
_build_developer
30+
_build_testkeyboards
31+
}
32+
33+
function _build_developer() {
34+
builder_echo start "build developer" "Building Keyman Developer"
35+
36+
./build.sh configure build test api publish --dry-run
37+
38+
builder_echo end "build developer" success "Finished building Keyman Developer"
39+
}
40+
41+
function _build_testkeyboards() {
42+
builder_echo start "build testkeyboards" "Building test keyboards"
43+
44+
"${KEYMAN_ROOT}/common/test/keyboards/build.sh" --zip-source --index
45+
46+
builder_echo end "build testkeyboards" success "Finished building test keyboards"
47+
}
48+
49+
function publish_sentry_action() {
50+
builder_echo start "publish sentry" "Publishing debug information files to Sentry"
51+
52+
"${KEYMAN_ROOT}/developer/src/tools/sentry-upload-difs.sh"
53+
54+
builder_echo end "publish sentry" success "Finished publishing debug information files to Sentry"
55+
}
56+
57+
if builder_has_action all; then
58+
build_developer_action
59+
publish_sentry_action
60+
else
61+
builder_run_action build build_developer_action
62+
builder_run_action publish publish_sentry_action
63+
fi
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Keyman is copyright (C) SIL Global. MIT License.
2+
#
3+
# This script should be the identical for nightly/beta/stable for a given platform
4+
#
5+
6+
$ErrorActionPreference = "Stop"
7+
8+
$RSYNC_HOME = $env:RSYNC_HOME
9+
$USERPROFILE = $env:USERPROFILE
10+
11+
# Rename 000Admin to 000admin
12+
13+
ren 000Admin 000admin_
14+
ren 000admin_ 000admin
15+
16+
#
17+
# Upload with rsync to downloads.keyman.com
18+
# (rsync requires that we are in the symbols folder to get folders in
19+
# sync correctly; it is possible to resolve this but easier to just cd.)
20+
#
21+
22+
$rsync_args = @(
23+
'-vrzltp', # verbose, recurse, zip, copy symlinks, preserve times, permissions
24+
'--chmod=Dug=rwx,Do=rx,Fug=rw,Fo=r', # map Windows security to host security
25+
'--stats', # show statistics for log
26+
'--rsync-path="sudo -u vu2009 rsync"', # path on remote server
27+
"--rsh=$RSYNC_HOME\ssh -i $USERPROFILE\.ssh\id_rsa -o UserKnownHostsFile=$USERPROFILE\.ssh\known_hosts", # use ssh
28+
".", # upload the whole symbols folder
29+
"%downloads_rsync_user%@%downloads_rsync_host%:%downloads_rsync_root%/windows/symbols/" # target server + path
30+
)
31+
32+
& $RSYNC_HOME\rsync.exe $rsync_args
33+
if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
34+
35+
# EOF

0 commit comments

Comments
 (0)