Skip to content

Instantly share code, notes, and snippets.

@failover88
Last active June 29, 2018 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save failover88/77a0068570c5b94a33480509041567ad to your computer and use it in GitHub Desktop.
Save failover88/77a0068570c5b94a33480509041567ad to your computer and use it in GitHub Desktop.
jenkinsfile declarative script with qmake, generating wrong makefile with 4 more lines
pipeline {
agent any
environment {
MACOS_SOFTWARETEST = 'mactester@192.168.1.7'
QMAKE = '/Users/mactester/Qt/5.8/clang_64/bin//qmake'
MACDEPLOYQT = '/Users/mactester/Qt/5.8/clang_64/bin//macdeployqt'
MAKE = '/usr/bin/make'
SED = '/usr/bin/sed'
RM = '/bin/rm'
LS = '/bin/ls'
}
stages {
stage ('Starter Stage') {
steps {
slackSend(
message: "STARTED: <$RUN_DISPLAY_URL|$JOB_NAME [#$BUILD_NUMBER]>"
)
}
}
stage ('MacOS Starter Stage') {
steps {
sh 'echo "MacOS Starter Stage"'
sh 'ssh $GFETEC_SERVER "$VBOXMANAGE snapshot $VM_NAME restore \\"$VM_SNAPSHOT\\""'
sh 'ssh $GFETEC_SERVER "$VBOXMANAGE startvm $VM_NAME --type headless"'
// This reboot is needed to avoid bad makefile generation through QMAKE command
sh 'ssh $GFETEC_SERVER "$VBOXMANAGE controlvm $VM_NAME reset"'
// Give some time to launch VM to be able to ssh
sh 'sleep 5s'
}
}
stage ('Repository Stage') {
steps {
sh 'echo "Repository Stage"'
sh 'rsync -ah --human-readable --stats ./ $MACOS_SOFTWARETEST:Desktop/job_${JOB_NAME}_build_$BUILD_NUMBER/'
}
}
stage ('Make Stage') {
steps {
sh 'echo "Make Stage"'
sh 'ssh $MACOS_SOFTWARETEST "mkdir Desktop/job_${JOB_NAME}_build_${BUILD_NUMBER}/firmware/helpers/connector/release"'
sh 'ssh $MACOS_SOFTWARETEST "cd Desktop/job_${JOB_NAME}_build_${BUILD_NUMBER}/firmware/helpers/connector/release; ${QMAKE} -config release ../Connector"'
sh 'ssh $MACOS_SOFTWARETEST "cd Desktop/job_${JOB_NAME}_build_${BUILD_NUMBER}/firmware/helpers/connector/release; ${MAKE}"'
}
}
stage ('Compiled Output Files Stage') {
steps {
sh 'echo "Compiled Files Stage"'
}
}
stage ('MacOS Shutdown Stage') {
steps {
sh 'echo "MacOS Shutdown Stage"'
}
}
}
post {
success {
echo "The $JOB_NAME build #$BUILD_NUMBER was completed successfully. "
slackSend(
color: 'good',
message: "SUCCESS: <$RUN_DISPLAY_URL|$JOB_NAME [#$BUILD_NUMBER]>"
)
}
failure {
echo "The $JOB_NAME build #$BUILD_NUMBER failed."
slackSend(
color: 'danger',
message: "FAILURE: <$RUN_DISPLAY_URL|$JOB_NAME [#$BUILD_NUMBER]>"
)
}
unstable {
echo "The $JOB_NAME build #$BUILD_NUMBER is unstable."
slackSend(
color: 'warning',
message: "UNSTABLE: <$RUN_DISPLAY_URL|$JOB_NAME [#$BUILD_NUMBER]>"
)
}
}
}
Started
Obtained JenkinsfileMacos from git
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Running on Jenkins in /var/lib/jenkins/workspace/jenkins_example_chameleon_macos
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository
> git init /var/lib/jenkins/workspace/jenkins_example_chameleon_macos # timeout=10
Fetching upstream changes
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --tags --progress +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url # timeout=10
Fetching upstream changes
using GIT_ASKPASS to set credentials
> git fetch --tags --progress git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 0208ad2b7a20a548ef0606b2da3b1f6d0e1ae55b (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 0208ad2b7a20a548ef0606b2da3b1f6d0e1ae55b
Commit message: "JenkinsfileMacos updated"
> git rev-list --no-walk 6a75c3589d121798025905788a101de1ee8c5aa8 # timeout=10
> git remote # timeout=10
> git submodule init # timeout=10
> git submodule sync # timeout=10
> git config --get remote.origin.url # timeout=10
> git submodule init # timeout=10
> git config -f .gitmodules --get-regexp ^submodule\.(.+)\.url # timeout=10
> git config --get submodule.firmware/helpers/intelhex.git.url # timeout=10
> git config -f .gitmodules --get submodule.firmware/helpers/intelhex.git.path # timeout=10
> git submodule update --init --recursive firmware/helpers/intelhex.git
> git config --get submodule.firmware/helpers/connector/libGIS.url # timeout=10
> git config -f .gitmodules --get submodule.firmware/helpers/connector/libGIS.path # timeout=10
> git submodule update --init --recursive firmware/helpers/connector/lib/libGIS
> git config --get submodule.firmware/helpers/connector/hidapi.url # timeout=10
> git config -f .gitmodules --get submodule.firmware/helpers/connector/hidapi.path # timeout=10
> git submodule update --init --recursive firmware/helpers/connector/lib/hidapi
> git config --get submodule.firmware/helpers/connector/lib/serial.url # timeout=10
> git config -f .gitmodules --get submodule.firmware/helpers/connector/lib/serial.path # timeout=10
> git submodule update --init --recursive firmware/helpers/connector/lib/serial
> git config --get submodule.firmware/helpers/connector/tests/Catch2.url # timeout=10
> git config -f .gitmodules --get submodule.firmware/helpers/connector/tests/Catch2.path # timeout=10
> git submodule update --init --recursive firmware/helpers/connector/tests/Catch2
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] withEnv
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Starter Stage)
[Pipeline] slackSend
run slackstepsend, step null:false, desc :false
Slack Send Pipeline step configured values from global config - baseUrl: true, teamDomain: true, token: true, channel: true, color: true
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (MacOS Starter Stage)
[Pipeline] sh
[jenkins_example_chameleon_macos] Running shell script
+ echo 'MacOS Starter Stage'
MacOS Starter Stage
[Pipeline] sh
[jenkins_example_chameleon_macos] Running shell script
+ ssh gfe-tecserver@192.168.1.1 '/usr/local/bin/vboxmanage snapshot macos_softwaretest restore "Snapshot 1 qmake reboot"'
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Restoring snapshot 89860318-f783-4c47-8a40-f847d4eeff42
[Pipeline] sh
[jenkins_example_chameleon_macos] Running shell script
+ ssh gfe-tecserver@192.168.1.1 '/usr/local/bin/vboxmanage startvm macos_softwaretest --type headless'
Waiting for VM "macos_softwaretest" to power on...
VM "macos_softwaretest" has been successfully started.
[Pipeline] sh
[jenkins_example_chameleon_macos] Running shell script
+ ssh gfe-tecserver@192.168.1.1 '/usr/local/bin/vboxmanage controlvm macos_softwaretest reset'
[Pipeline] sh
[jenkins_example_chameleon_macos] Running shell script
+ sleep 5s
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Repository Stage)
[Pipeline] sh
[jenkins_example_chameleon_macos] Running shell script
+ echo 'Repository Stage'
Repository Stage
[Pipeline] sh
[jenkins_example_chameleon_macos] Running shell script
+ rsync -ah --human-readable --stats ./ mactester@192.168.1.7:Desktop/job_jenkins_example_chameleon_macos_build_405/
Number of files: 1433
Number of files transferred: 1205
Total file size: 54.88M bytes
Total transferred file size: 54.88M bytes
Literal data: 54.88M bytes
Matched data: 0 bytes
File list size: 25.68K
File list generation time: 0.014 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 54.96M
Total bytes received: 27.24K
sent 54.96M bytes received 27.24K bytes 12.22M bytes/sec
total size is 54.88M speedup is 1.00
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Make Stage)
[Pipeline] sh
[jenkins_example_chameleon_macos] Running shell script
+ echo 'Make Stage'
Make Stage
[Pipeline] sh
[jenkins_example_chameleon_macos] Running shell script
+ ssh mactester@192.168.1.7 'mkdir Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/release'
[Pipeline] sh
[jenkins_example_chameleon_macos] Running shell script
+ ssh mactester@192.168.1.7 'cd Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/release; /Users/mactester/Qt/5.8/clang_64/bin//qmake -config release ../Connector'
Info: creating stash file /Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/release/.qmake.stash
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-pt.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-pt.qm'...
Generated 176 translation(s) (173 finished and 3 unfinished)
Ignored 12 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-es.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-es.qm'...
Generated 149 translation(s) (145 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-br.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-br.qm'...
Generated 152 translation(s) (148 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-de.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-de.qm'...
Generated 138 translation(s) (134 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-dk.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-dk.qm'...
Generated 130 translation(s) (127 finished and 3 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-fi.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-fi.qm'...
Generated 153 translation(s) (149 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-fr.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-fr.qm'...
Generated 145 translation(s) (141 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-it.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-it.qm'...
Generated 152 translation(s) (148 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-lt.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-lt.qm'...
Generated 146 translation(s) (142 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-no.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-no.qm'...
Generated 157 translation(s) (153 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-ro.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-ro.qm'...
Generated 145 translation(s) (141 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-tr.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-tr.qm'...
Generated 149 translation(s) (146 finished and 3 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-hu.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-hu.qm'...
Generated 156 translation(s) (152 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
WARNING: Failure to find: gen_panel_8x6_charset.hh
RCC: Error in '../Connector/qml.qrc': Cannot find file 'gen_dataloop_events.js'
RCC: Error in '../Connector/qml.qrc': Cannot find file 'gen_globals.js'
RCC: Error in '../Connector/qml.qrc': Cannot find file 'gen_flash_map.json'
[Pipeline] sh
[jenkins_example_chameleon_macos] Running shell script
+ ssh mactester@192.168.1.7 'cd Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/release; /usr/bin/make'
/Users/mactester/Qt/5.8/clang_64/bin/qmake -o Makefile ../Connector/Connector.pro -config release
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-pt.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-pt.qm'...
Generated 176 translation(s) (173 finished and 3 unfinished)
Ignored 12 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-es.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-es.qm'...
Generated 149 translation(s) (145 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-br.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-br.qm'...
Generated 152 translation(s) (148 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-de.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-de.qm'...
Generated 138 translation(s) (134 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-dk.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-dk.qm'...
Generated 130 translation(s) (127 finished and 3 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-fi.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-fi.qm'...
Generated 153 translation(s) (149 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-fr.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-fr.qm'...
Generated 145 translation(s) (141 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-it.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-it.qm'...
Generated 152 translation(s) (148 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-lt.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-lt.qm'...
Generated 146 translation(s) (142 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-no.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-no.qm'...
Generated 157 translation(s) (153 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-ro.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-ro.qm'...
Generated 145 translation(s) (141 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-tr.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-tr.qm'...
Generated 149 translation(s) (146 finished and 3 unfinished)
Ignored 35 untranslated source text(s)
Updating '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-hu.qm'...
Removing translations equal to source text in '/Users/mactester/Desktop/job_jenkins_example_chameleon_macos_build_405/firmware/helpers/connector/Connector/translations/Lang-hu.qm'...
Generated 156 translation(s) (152 finished and 4 unfinished)
Ignored 35 untranslated source text(s)
WARNING: Failure to find: gen_panel_8x6_charset.hh
RCC: Error in '../Connector/qml.qrc': Cannot find file 'gen_dataloop_events.js'
RCC: Error in '../Connector/qml.qrc': Cannot find file 'gen_globals.js'
RCC: Error in '../Connector/qml.qrc': Cannot find file 'gen_flash_map.json'
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Compiled Output Files Stage)
Stage "Compiled Output Files Stage" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (MacOS Shutdown Stage)
Stage "MacOS Shutdown Stage" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 143
Finished: ABORTED
Página gerada em: 28/jun/2018 16:50:56 WESTREST APIJenkins ver. 2.107.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment