Skip to content

Commit

Permalink
Merge branch 'migration_gitlab' into 'master'
Browse files Browse the repository at this point in the history
Migration gitlab (CI)

See merge request GATB/gatb-minia!1
  • Loading branch information
cdeltel committed Dec 21, 2021
2 parents 594d6e3 + 0bddecf commit b55a246
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 11 deletions.
27 changes: 22 additions & 5 deletions scripts/jenkins/tool-minia-build-debian7-64bits-gcc-4.7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ DO_NOT_STOP_AT_ERROR : ${DO_NOT_STOP_AT_ERROR}
Jenkins build parameters (built in)
-----------------------------------------
BUILD_NUMBER : ${BUILD_NUMBER}
JENKINS_HOME : ${JENKINS_HOME}
WORKSPACE : ${WORKSPACE}
"

error_code () { [ "$DO_NOT_STOP_AT_ERROR" = "true" ] && { return 0 ; } }
Expand All @@ -54,12 +56,15 @@ g++ --version

[ `gcc -dumpversion` = 4.7 ] && { echo "GCC 4.7"; } || { echo "GCC version is not 4.7, we exit"; exit 1; }

JENKINS_TASK=tool-${TOOL_NAME}-build-debian7-64bits-gcc-4.7
JENKINS_TASK=tool-${TOOL_NAME}-build-debian7-64bits-gcc-4.7-gitlab
JENKINS_WORKSPACE=$WORKSPACE/$JENKINS_TASK/

GIT_DIR=/scratchdir/builds/workspace/gatb-${TOOL_NAME}
BUILD_DIR=/scratchdir/$JENKINS_TASK/gatb-${TOOL_NAME}/build

rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR
mkdir -p $JENKINS_WORKSPACE

#-----------------------------------------------
# we need gatb-core submodule to be initialized
Expand Down Expand Up @@ -101,13 +106,25 @@ cd build
# PACKAGING #
################################################################

# Upload bin bundle to the forge
#-- Upload bin bundle as a build artifact
# -> bin bundle *-bin-Linux.tar.gz will be archived as a build artifact
# -> source package is handled by the osx task

if [ $? -eq 0 ] && [ "$INRIA_FORGE_LOGIN" != none ] && [ "$DO_NOT_STOP_AT_ERROR" != true ]; then
make package
scp ${TOOL_NAME}-${BRANCH_TO_BUILD}-bin-Linux.tar.gz ${INRIA_FORGE_LOGIN}@scm.gforge.inria.fr:/home/groups/gatb-tools/htdocs/ci-inria
echo "Creating a binary archive... "
echo "N.B. this is NOT an official binary release"
make package

# source package is handled by the osx task
# ... not anymore since I disabled osx
make package_source
scp ${TOOL_NAME}-${BRANCH_TO_BUILD}-Source.tar.gz ${INRIA_FORGE_LOGIN}@scm.gforge.inria.fr:/home/groups/gatb-tools/htdocs/ci-inria

pwd
ls -atlhrsF

#-- Move the generated bin bundle to the workspace (so that it can be uploaded as a Jenkins job artifact)
mv *-${BRANCH_TO_BUILD}-bin-Linux.tar.gz $JENKINS_WORKSPACE/
mv *-${BRANCH_TO_BUILD}-Source.tar.gz $JENKINS_WORKSPACE/
fi


11 changes: 9 additions & 2 deletions scripts/jenkins/tool-minia-build-macos-10.9.5-gcc-4.2.1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ DO_NOT_STOP_AT_ERROR : ${DO_NOT_STOP_AT_ERROR}
Jenkins build parameters (built in)
-----------------------------------------
BUILD_NUMBER : ${BUILD_NUMBER}
JENKINS_HOME : ${JENKINS_HOME}
WORKSPACE : ${WORKSPACE}
"

error_code () { [ "$DO_NOT_STOP_AT_ERROR" = "true" ] && { return 0 ; } }
Expand Down Expand Up @@ -102,9 +104,14 @@ fi

# Prepare and upload bin and source bundle to the forge
if [ $? -eq 0 ] && [ "$INRIA_FORGE_LOGIN" != none ] && [ "$DO_NOT_STOP_AT_ERROR" != true ]; then
make package
make package

# make both tar.gz available as Jenkins build artifacts
cp ${TOOL_NAME}-${BRANCH_TO_BUILD}-bin-Darwin.tar.gz ${WORKSPACE}/
#cp ${TOOL_NAME}-${BRANCH_TO_BUILD}-Source.tar.gz ${WORKSPACE}/

#make package_source # putting this in debian instead
scp ${TOOL_NAME}-${BRANCH_TO_BUILD}-bin-Darwin.tar.gz ${INRIA_FORGE_LOGIN}@scm.gforge.inria.fr:/home/groups/gatb-tools/htdocs/ci-inria
#scp ${TOOL_NAME}-${BRANCH_TO_BUILD}-bin-Darwin.tar.gz ${INRIA_FORGE_LOGIN}@scm.gforge.inria.fr:/home/groups/gatb-tools/htdocs/ci-inria
#scp ${TOOL_NAME}-${BRANCH_TO_BUILD}-Source.tar.gz ${INRIA_FORGE_LOGIN}@scm.gforge.inria.fr:/home/groups/gatb-tools/htdocs/ci-inria
fi

16 changes: 12 additions & 4 deletions scripts/jenkins/tool-minia-release-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ DO_NOT_STOP_AT_ERROR : ${DO_NOT_STOP_AT_ERROR}
Jenkins build parameters (built in)
-----------------------------------------
BUILD_NUMBER : ${BUILD_NUMBER}
JENKINS_HOME : ${JENKINS_HOME}
WORKSPACE : ${WORKSPACE}
"
set -xv

Expand Down Expand Up @@ -85,18 +87,24 @@ if [ "$INRIA_FORGE_LOGIN" == none ]; then
fi

cd $BUILD_DIR
git clone https://github.com/pgdurand/github-release-api.git
git clone https://github.com/GATB/github-release-api.git

################################################################
# RETRIEVE ARCHIVES FROM INRIA FORGE #
################################################################

CI_URL=https://ci.inria.fr/gatb-core/view/Minia-gitlab/job
JENKINS_TASK_DEB=tool-minia-build-debian7-64bits-gcc-4.7-gitlab
JENKINS_TASK_MAC=tool-minia-build-macos-10.9.5-gcc-4.2.1-gitlab

#retrieve last build from ci-inria (see tool-lean-build-XXX tasks)
scp ${INRIA_FORGE_LOGIN}@scm.gforge.inria.fr:/home/groups/gatb-tools/htdocs/ci-inria/${TOOL_NAME}-${BRANCH_TO_BUILD}-bin-Linux.tar.gz .
wget $CI_URL/$JENKINS_TASK_DEB/lastSuccessfulBuild/artifact/$JENKINS_TASK_DEB/${TOOL_NAME}-${BRANCH_TO_BUILD}-bin-Linux.tar.gz
[ $? != 0 ] && exit 1
scp ${INRIA_FORGE_LOGIN}@scm.gforge.inria.fr:/home/groups/gatb-tools/htdocs/ci-inria/${TOOL_NAME}-${BRANCH_TO_BUILD}-bin-Darwin.tar.gz .

#wget $CI_URL/$JENKINS_TASK_MAC/lastSuccessfulBuild/artifact/${TOOL_NAME}-${BRANCH_TO_BUILD}-bin-Darwin.tar.gz
#[ $? != 0 ] && exit 1 # disabled because mavericks machine is down in 2021
scp ${INRIA_FORGE_LOGIN}@scm.gforge.inria.fr:/home/groups/gatb-tools/htdocs/ci-inria/${TOOL_NAME}-${BRANCH_TO_BUILD}-Source.tar.gz .

wget $CI_URL/$JENKINS_TASK_DEB/lastSuccessfulBuild/artifact/$JENKINS_TASK_DEB/${TOOL_NAME}-${BRANCH_TO_BUILD}-Source.tar.gz
[ $? != 0 ] && exit 1

################################################################
Expand Down

0 comments on commit b55a246

Please sign in to comment.