2019-02-05 09:35:14 +00:00
|
|
|
utils = load 'ci/utils.groovy'
|
2018-12-11 14:27:21 +00:00
|
|
|
cmn = load 'ci/common.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 cleanupAndDeps() {
|
2019-02-05 09:35:14 +00:00
|
|
|
sh 'make clean'
|
2018-08-14 18:09:52 +00:00
|
|
|
sh 'cp .env.jenkins .env'
|
|
|
|
sh 'lein deps'
|
2019-02-05 09:35:14 +00:00
|
|
|
utils.installJSDeps('desktop')
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
def buildClojureScript() {
|
2018-09-13 09:44:33 +00:00
|
|
|
sh 'make prod-build-desktop'
|
|
|
|
sh './scripts/build-desktop.sh buildClojureScript'
|
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 --------------------------------------------------*/
|
|
|
|
|
|
|
|
def prepDeps() {
|
2019-02-05 09:35:14 +00:00
|
|
|
utils.doGitRebase()
|
2018-08-14 18:09:52 +00:00
|
|
|
cleanupAndDeps()
|
|
|
|
}
|
2018-08-28 14:09:22 +00:00
|
|
|
|
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}"
|
|
|
|
}
|
2018-09-13 09:44:33 +00:00
|
|
|
sh './scripts/build-desktop.sh compile'
|
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
|
|
|
|
|
|
|
|
sh './scripts/build-desktop.sh bundle'
|
|
|
|
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
|
2018-09-13 09:44:33 +00:00
|
|
|
sh './scripts/build-desktop.sh bundle'
|
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')
|
2018-09-13 09:44:33 +00:00
|
|
|
sh './scripts/build-desktop.sh bundle'
|
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')
|
|
|
|
]) {
|
|
|
|
sh '../scripts/sign-macos-pkg.sh Status.app ../deployment/macos/macos-developer-id.keychain-db.gpg'
|
|
|
|
sh "../node_modules/appdmg/bin/appdmg.js ../deployment/macos/status-dmg.json ${pkg}"
|
|
|
|
sh "../scripts/sign-macos-pkg.sh ${pkg} ../deployment/macos/macos-developer-id.keychain-db.gpg"
|
|
|
|
}
|
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
|