Update Jenkinsfile
All checks were successful
gitea-sync/antos/pipeline/head This commit looks good

This commit is contained in:
Dany LE 2022-09-29 19:17:19 +02:00 committed by GitHub
parent 31d928c977
commit d1fdb47ca2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

15
Jenkinsfile vendored
View File

@ -1,14 +1,5 @@
def remote = [:]
remote.name = 'workstation'
remote.host = 'workstation'
remote.user = 'dany'
remote.identityFile = '/var/jenkins_home/.ssh/id_rsa'
remote.allowAnyHosts = true
remote.agent = false
remote.logLevel = 'INFO'
pipeline{ pipeline{
agent { node{ label'master' }} agent { node{ label'workstation' }}
options { options {
// Limit build history with buildDiscarder option: // Limit build history with buildDiscarder option:
// daysToKeepStr: history is only kept up to this many days. // daysToKeepStr: history is only kept up to this many days.
@ -30,8 +21,6 @@ pipeline{
stage('Build release') { stage('Build release') {
steps { steps {
sh''' sh'''
export -p | tee build.source
cat <<"EOF" >>build.source
cd $WORKSPACE cd $WORKSPACE
npm install terser npm install terser
npm install uglifycss npm install uglifycss
@ -42,9 +31,7 @@ cat <<"EOF" >>build.source
[ -d "$buildir" ] && rm -rf "$buildir" [ -d "$buildir" ] && rm -rf "$buildir"
export BUILDDIR="$WORKSPACE/$buildir/opt/www/htdocs/os" export BUILDDIR="$WORKSPACE/$buildir/opt/www/htdocs/os"
make release make release
EOF
''' '''
sshScript remote: remote, script: "build.source"
script { script {
// only useful for any master branch // only useful for any master branch
//if (env.BRANCH_NAME =~ /^master/) { //if (env.BRANCH_NAME =~ /^master/) {