2019-05-10 15:33:54 +00:00
|
|
|
nix = load 'ci/nix.groovy'
|
|
|
|
utils = load 'ci/utils.groovy'
|
2018-08-14 18:09:52 +00:00
|
|
|
|
|
|
|
packageFolder = './StatusImPackage'
|
2018-08-21 15:17:25 +00:00
|
|
|
|
2018-08-14 18:09:52 +00:00
|
|
|
def buildClojureScript() {
|
2019-05-10 15:33:54 +00:00
|
|
|
nix.shell(
|
|
|
|
'''
|
|
|
|
make prod-build-desktop && \
|
|
|
|
./scripts/build-desktop.sh buildClojureScript
|
|
|
|
''',
|
|
|
|
keep: ['VERBOSE_LEVEL']
|
|
|
|
)
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
def uploadArtifact(filename) {
|
|
|
|
def domain = 'ams3.digitaloceanspaces.com'
|
|
|
|
def bucket = 'status-im-desktop'
|
|
|
|
withCredentials([usernamePassword(
|
|
|
|
credentialsId: 'digital-ocean-access-keys',
|
|
|
|
usernameVariable: 'DO_ACCESS_KEY',
|
|
|
|
passwordVariable: 'DO_SECRET_KEY'
|
|
|
|
)]) {
|
|
|
|
sh """
|
|
|
|
s3cmd \\
|
|
|
|
--acl-public \\
|
|
|
|
--host='${domain}' \\
|
|
|
|
--host-bucket='%(bucket)s.${domain}' \\
|
|
|
|
--access_key=${DO_ACCESS_KEY} \\
|
|
|
|
--secret_key=${DO_SECRET_KEY} \\
|
|
|
|
put ${filename} s3://${bucket}/
|
|
|
|
"""
|
|
|
|
|
|
|
|
}
|
|
|
|
def url = "https://${bucket}.${domain}/${filename}"
|
|
|
|
return url
|
|
|
|
}
|
|
|
|
|
|
|
|
/* MAIN --------------------------------------------------*/
|
|
|
|
|
2018-09-13 09:44:33 +00:00
|
|
|
def compile() {
|
2018-12-13 09:16:54 +00:00
|
|
|
/* disable logs for desktop builds when releasing */
|
|
|
|
if (params.BUILD_TYPE == 'release') {
|
|
|
|
env.STATUS_NO_LOGGING = 1
|
|
|
|
}
|
2018-12-06 19:51:41 +00:00
|
|
|
/* since QT is in a custom path we need to add it to PATH */
|
|
|
|
if (env.QT_PATH) {
|
|
|
|
env.PATH = "${env.QT_PATH}:${env.PATH}"
|
|
|
|
}
|
2019-05-10 15:33:54 +00:00
|
|
|
nix.shell(
|
|
|
|
'./scripts/build-desktop.sh compile',
|
|
|
|
keep: ['VERBOSE_LEVEL']
|
|
|
|
)
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
2018-08-28 14:09:22 +00:00
|
|
|
|
2018-11-06 21:29:16 +00:00
|
|
|
def bundleWindows(type = 'nightly') {
|
|
|
|
def pkg
|
|
|
|
|
2019-05-10 15:33:54 +00:00
|
|
|
nix.shell(
|
|
|
|
'./scripts/build-desktop.sh bundle',
|
|
|
|
keep: ['VERBOSE_LEVEL']
|
|
|
|
)
|
2018-11-06 21:29:16 +00:00
|
|
|
dir(packageFolder) {
|
2019-02-05 09:35:14 +00:00
|
|
|
pkg = utils.pkgFilename(type, 'exe')
|
2018-11-05 09:40:11 +00:00
|
|
|
sh "mv ../Status-x86_64-setup.exe ${pkg}"
|
2018-11-06 21:29:16 +00:00
|
|
|
}
|
|
|
|
return "${packageFolder}/${pkg}".drop(2)
|
|
|
|
}
|
|
|
|
|
2018-08-23 12:56:19 +00:00
|
|
|
def bundleLinux(type = 'nightly') {
|
|
|
|
def pkg
|
2019-05-10 15:33:54 +00:00
|
|
|
nix.shell(
|
|
|
|
'./scripts/build-desktop.sh bundle',
|
|
|
|
keep: ['VERBOSE_LEVEL']
|
|
|
|
)
|
2018-08-14 18:09:52 +00:00
|
|
|
dir(packageFolder) {
|
2019-02-05 09:35:14 +00:00
|
|
|
pkg = utils.pkgFilename(type, 'AppImage')
|
2018-10-19 15:50:35 +00:00
|
|
|
sh "mv ../Status-x86_64.AppImage ${pkg}"
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
2018-08-23 12:56:19 +00:00
|
|
|
return "${packageFolder}/${pkg}".drop(2)
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
|
2018-08-23 12:56:19 +00:00
|
|
|
def bundleMacOS(type = 'nightly') {
|
2019-02-05 09:35:14 +00:00
|
|
|
def pkg = utils.pkgFilename(type, 'dmg')
|
2019-05-10 15:33:54 +00:00
|
|
|
nix.shell(
|
|
|
|
'./scripts/build-desktop.sh bundle',
|
|
|
|
keep: ['VERBOSE_LEVEL']
|
|
|
|
)
|
2018-08-14 18:09:52 +00:00
|
|
|
dir(packageFolder) {
|
2018-09-08 16:08:24 +00:00
|
|
|
withCredentials([
|
|
|
|
string(credentialsId: 'desktop-gpg-outer-pass', variable: 'GPG_PASS_OUTER'),
|
|
|
|
string(credentialsId: 'desktop-gpg-inner-pass', variable: 'GPG_PASS_INNER'),
|
|
|
|
string(credentialsId: 'desktop-keychain-pass', variable: 'KEYCHAIN_PASS')
|
|
|
|
]) {
|
2019-05-10 15:33:54 +00:00
|
|
|
nix.shell(
|
|
|
|
"""
|
2019-02-28 10:56:58 +00:00
|
|
|
../scripts/sign-macos-pkg.sh Status.app ../deployment/macos/macos-developer-id.keychain-db.gpg && \
|
|
|
|
../node_modules/appdmg/bin/appdmg.js ../deployment/macos/status-dmg.json ${pkg} && \
|
|
|
|
../scripts/sign-macos-pkg.sh ${pkg} ../deployment/macos/macos-developer-id.keychain-db.gpg
|
2019-05-10 15:33:54 +00:00
|
|
|
""",
|
|
|
|
pure: false,
|
|
|
|
keep: ['GPG_PASS_OUTER', 'GPG_PASS_INNER', 'KEYCHAIN_PASS']
|
|
|
|
)
|
2018-09-08 16:08:24 +00:00
|
|
|
}
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
2018-08-23 12:56:19 +00:00
|
|
|
return "${packageFolder}/${pkg}".drop(2)
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return this
|