93 lines
2.4 KiB
Groovy
93 lines
2.4 KiB
Groovy
#!groovy
|
|
|
|
pipeline {
|
|
agent none
|
|
|
|
environment {
|
|
git_commit_message = ''
|
|
git_commit_diff = ''
|
|
git_commit_author = ''
|
|
git_commit_author_name = ''
|
|
git_commit_author_email = ''
|
|
ANDROID_HOME = '/opt/android-sdk/'
|
|
}
|
|
|
|
stages {
|
|
|
|
// --- BUILD ---
|
|
stage('Build') {
|
|
agent {
|
|
label 'vncportal'
|
|
}
|
|
steps {
|
|
parallel(
|
|
'frontend': {
|
|
node('vncportal') {
|
|
deleteDir()
|
|
checkout scm
|
|
sh 'yarn cache clean'
|
|
sh 'yarn install'
|
|
sh "tar cfz frontend.tgz node_modules"
|
|
stash includes: 'frontend.tgz', name: 'frontend'
|
|
deleteDir()
|
|
}
|
|
},
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
stage('Packaging') {
|
|
agent {
|
|
label 'master'
|
|
}
|
|
steps {
|
|
sh "echo 'Packaging'"
|
|
deleteDir()
|
|
checkout scm
|
|
sh "git fetch --tags"
|
|
sh "makechangelog.uxf > debian/changelog"
|
|
sh "cat debian/changelog"
|
|
sh "mkdir src"
|
|
sh "sed -n 1p debian/changelog | grep -oP '\\((.*?)\\)' > src/version.txt"
|
|
sh "echo '####################################################'"
|
|
sh "cat src/version.txt"
|
|
sh "echo '####################################################'"
|
|
|
|
sh 'rm config/prosody-muc-rest.js'
|
|
sh 'cp -P conf.template/prosody-muc-rest.js config/prosody-muc-rest.js'
|
|
// yarn fails on node4 with kurento stuff
|
|
unstash 'frontend'
|
|
sh 'tar xfz frontend.tgz'
|
|
lock('debianbuild') {
|
|
sh "cd debian; debuild --check-dirname-level 0 --no-tgz-check --no-lintian -kjenkins@vnc.biz -p'gpg --no-tty --passphrase q3tx65wurstbrot'; cd .."
|
|
}
|
|
sh "mkdir -p ../pkgarchive/"
|
|
sh "scp ../*.deb repo@factorypackages.rz.vnc.biz:/srv/repo/apt/incoming/"
|
|
sh "ssh repo@factorypackages.rz.vnc.biz /srv/repo/bin/import-new-packages.sh"
|
|
|
|
// Import to GCP deb repository
|
|
sh "scp ../*.deb repo@34.89.202.54:/srv/repo/apt/incoming/"
|
|
sh "ssh repo@34.89.202.54 /srv/repo/bin/import-new-packages.sh"
|
|
|
|
sh "mv ../*.deb ../pkgarchive/"
|
|
sh "rm ../*.dsc"
|
|
sh "rm ../*amd64.build"
|
|
sh "rm ../*amd64.changes"
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
emailext (
|
|
to: 'stefan.saenger@vnc.biz',
|
|
subject: "${env.JOB_NAME} #${env.BUILD_NUMBER}",
|
|
body: "Build URL: ${env.BUILD_URL}.",
|
|
attachLog: false,
|
|
)
|
|
}
|
|
}
|
|
|
|
}
|