Skip to content

Commit

Permalink
Fix Jenkinsfile to build on MacMini host. For #11
Browse files Browse the repository at this point in the history
  • Loading branch information
JEnoch committed Jun 18, 2020
1 parent 8b24179 commit 8b5f0b3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ pipeline {
stage('Simple build') {
steps {
sh '''
. ~/.zshrc
env
echo $PATH
which cmake
cmake --version
git log --graph --date=short --pretty=tformat:'%ad - %h - %cn -%d %s' -n 20 || true
make all
'''
Expand All @@ -31,6 +37,7 @@ pipeline {
stage('Cross-platforms build') {
steps {
sh '''
. ~/.zshrc
docker images || true
make all all-cross
'''
Expand All @@ -40,6 +47,7 @@ pipeline {
steps {
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
. ~/.zshrc
HOST="[email protected]"
DOWNLOAD_DIR="/home/data/httpd/download.eclipse.org/zenoh/zenoh-c/${TAG}"
ssh ${HOST} rm -fr ${DOWNLOAD_DIR}
Expand All @@ -48,16 +56,16 @@ pipeline {
for PLATFORM in `ls build/crossbuilds/`; do
echo "Deploy for platform: ${PLATFORM}"
ssh ${HOST} mkdir -p ${DOWNLOAD_DIR}/${PLATFORM}
scp build/crossbuilds/${PLATFORM}/libzenohc*.* build/crossbuilds/${PLATFORM}/z_* build/crossbuilds/${PLATFORM}/zn_* ${DOWNLOAD_DIR}/${PLATFORM}/
scp build/crossbuilds/${PLATFORM}/libzenohc*.* build/crossbuilds/${PLATFORM}/z_* build/crossbuilds/${PLATFORM}/zn_* ${HOST}:${DOWNLOAD_DIR}/${PLATFORM}/
done
echo "Deploy for platform: OSX"
ssh ${HOST} mkdir -p ${DOWNLOAD_DIR}/OSX
scp build/crossbuilds/${PLATFORM}/libzenohc*.* build/crossbuilds/${PLATFORM}/z_* build/crossbuilds/${PLATFORM}/zn_* ${DOWNLOAD_DIR}/OSX/
scp build/libzenohc*.* build/z_* build/zn_* ${HOST}:${DOWNLOAD_DIR}/OSX/
echo "Deploy include files"
tar czvf zenoh-c-includes.tgz include/
scp zenoh-c-includes.tgz ${DOWNLOAD_DIR}/
scp zenoh-c-includes.tgz ${HOST}:${DOWNLOAD_DIR}/
'''
}
}
Expand All @@ -66,7 +74,7 @@ pipeline {

post {
success {
archiveArtifacts artifacts: 'build/crossbuilds/*/*zenohc.*', fingerprint: true
archiveArtifacts artifacts: 'build/libzenohc*.*, build/crossbuilds/*/libzenohc*.so, build/crossbuilds/*/libzenohc*.rpm, build/crossbuilds/*/libzenohc*.deb', fingerprint: true
}
}
}

0 comments on commit 8b5f0b3

Please sign in to comment.