Commit c55b41a0 by Remi Perenon

Merge branch 'hotfix-debian_package_name' into 'master'

Debugging the package name on debian and moving artifacts for convenient user download See merge request !15
parents 31bb0c3a 6688dbc1
Pipeline #3937 passed with stages
in 17 minutes 27 seconds
......@@ -19,7 +19,7 @@ docker_login:
ci:ubuntu_trusty:
stage: ci
script:
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_build .
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t ci_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_build .
allow_failure: false
tags:
- docker
......@@ -29,7 +29,7 @@ ci:ubuntu_trusty:
deploy:ubuntu_trusty:
stage: deploy
script:
- docker build --force-rm -t deploy_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_deploy .
- docker build --force-rm --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t deploy_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh trusty
dependencies:
......@@ -40,6 +40,7 @@ deploy:ubuntu_trusty:
- develop
- /^release-.*$/
- /^hotfix-.*$/
- tags
- web
when: on_success
artifacts:
......@@ -56,7 +57,7 @@ deploy:ubuntu_trusty:
ci:ubuntu_xenial:
stage: ci
script:
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_build .
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t ci_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_build .
allow_failure: false
tags:
- docker
......@@ -66,7 +67,7 @@ ci:ubuntu_xenial:
deploy:ubuntu_xenial:
stage: deploy
script:
- docker build --force-rm -t deploy_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_deploy .
- docker build --force-rm --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t deploy_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh xenial
dependencies:
......@@ -77,6 +78,7 @@ deploy:ubuntu_xenial:
- develop
- /^release-.*$/
- /^hotfix-.*$/
- tags
- web
when: on_success
artifacts:
......@@ -93,7 +95,7 @@ deploy:ubuntu_xenial:
ci:ubuntu_bionic:
stage: ci
script:
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_build .
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t ci_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_build .
allow_failure: false
tags:
- docker
......@@ -103,7 +105,7 @@ ci:ubuntu_bionic:
deploy:ubuntu_bionic:
stage: deploy
script:
- docker build --force-rm -t deploy_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_deploy .
- docker build --force-rm --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t deploy_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh bionic
dependencies:
......@@ -114,6 +116,7 @@ deploy:ubuntu_bionic:
- develop
- /^release-.*$/
- /^hotfix-.*$/
- tags
- web
when: on_success
artifacts:
......@@ -157,11 +160,12 @@ deploy:osx:
- develop
- /^release-.*$/
- /^hotfix-.*$/
- tags
- web
when: on_success
artifacts:
paths:
- ${CI_PROJECT_DIR}/BuildServer/*.dmg
- ${CI_PROJECT_DIR}/*.dmg
tags:
- sci
- osx-10.13
......@@ -200,11 +204,12 @@ deploy:windows:
- develop
- /^release-.*$/
- /^hotfix-.*$/
- tags
- web
when: on_success
artifacts:
paths:
- "%CI_PROJECT_DIR%\\BuildServer\\*.exe"
- "%CI_PROJECT_DIR%\\*.exe"
tags:
- sci
- windows-10
......
......@@ -4,13 +4,15 @@ SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_COMMIT
ARG MDANSE_GIT_BRANCH_NAME
RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git
WORKDIR mdanse
RUN git checkout ${MDANSE_GIT_COMMIT}
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
......@@ -2,8 +2,10 @@ FROM ci_mdanse_bionic
SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_BRANCH_NAME
VOLUME builds
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
......@@ -4,13 +4,15 @@ SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_COMMIT
ARG MDANSE_GIT_BRANCH_NAME
RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git
WORKDIR mdanse
RUN git checkout ${MDANSE_GIT_COMMIT}
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
......@@ -2,8 +2,10 @@ FROM ci_mdanse_trusty
SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_BRANCH_NAME
VOLUME builds
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
......@@ -4,13 +4,15 @@ SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_COMMIT
ARG MDANSE_GIT_BRANCH_NAME
RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git
WORKDIR mdanse
RUN git checkout ${MDANSE_GIT_COMMIT}
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
......@@ -2,8 +2,10 @@ FROM ci_mdanse_xenial
SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_BRANCH_NAME
VOLUME builds
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
docker run --rm -iv${PWD}:/artifacts/ deploy_mdanse_$1 << COMMANDS
chmod 755 /mdanse/BuildServer/*.deb
cp -a /mdanse/BuildServer/*.deb /artifacts/.
chmod 755 /mdanse/*.deb
cp -a /mdanse/*.deb /artifacts/.
COMMANDS
......@@ -16,4 +16,6 @@ rm -rf build
rm -rf BuildServer/Build_Debian
rm -rf BuildServer/Build_macOS
rm -rf BuildServer/Unix/Build_Debian
rm -rf BuildServer/Unix/Build_macOS
\ No newline at end of file
rm -rf BuildServer/Unix/Build_macOS
rm -rf *.deb
rm -rf *.dmg
\ No newline at end of file
export ARCH=amd64
export DISTRO=Xenial
export DISTRO=$(lsb_release -c | cut -f2)
export PYTHONEXE=/usr/bin/python
# The sed -i"" is compulsory other crashes on macos
export SED_I_COMMAND='sed -i'
export MDANSE_SOURCE_DIR=`pwd`
export MDANSE_SOURCE_DIR=$(pwd)
export MDANSE_TEMPORARY_INSTALLATION_DIR=${MDANSE_SOURCE_DIR}/BuildServer/Unix/Build_Debian
export PYTHONPATH=${MDANSE_TEMPORARY_INSTALLATION_DIR}/lib/python2.7/site-packages/:${PYTHONPATH}
export RED="\\033[1;31m"
export BLUE="\\033[1;34m"
export NORMAL="\\033[0m"
# Get revision number from Git
export MDANSE_GIT_CURRENT_COMMIT=$(git rev-parse --short HEAD)
# Get commit branch from Gitlab
export MDANSE_GIT_BRANCH_NAME="$1"
\ No newline at end of file
export ARCH=amd64
export DISTRO=macOS
export PYTHONEXE=/Library/Frameworks/Python.framework/Versions/2.7/bin/python
# The sed -i"" is compulsory other crashes on macos
export SED_I_COMMAND='sed -i ""'
export MDANSE_SOURCE_DIR=`pwd`
export MDANSE_SOURCE_DIR=$(pwd)
export MDANSE_TEMPORARY_INSTALLATION_DIR=${MDANSE_SOURCE_DIR}/BuildServer/Unix/Build_macOS
export PYTHONPATH=${MDANSE_TEMPORARY_INSTALLATION_DIR}/lib/python2.7/site-packages/:${PYTHONPATH}
export RED="\\033[1;31m"
export BLUE="\\033[1;34m"
export NORMAL="\\033[0m"
\ No newline at end of file
export NORMAL="\\033[0m"
# Get revision number from Git
export MDANSE_GIT_CURRENT_COMMIT=$(git rev-parse --short HEAD)
# Get commit branch from Gitlab
export MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME}
\ No newline at end of file
......@@ -56,7 +56,7 @@ instSize=$(du ${DEBIAN_ROOT_DIR} -b -s | cut -f1)
sed -i "s/Installed-Size:.*/Installed-Size: $((1+(instSize/1024)))/g" ${DEBIAN_ROOT_DIR}/DEBIAN/control
export TMPDIR=.
fakeroot dpkg-deb -b ${DEBIAN_ROOT_DIR} ${MDANSE_SOURCE_DIR}/BuildServer/MDANSE-${VERSION_NAME}-${DISTRO}-${ARCH}.deb
fakeroot dpkg-deb -b ${DEBIAN_ROOT_DIR} ${MDANSE_SOURCE_DIR}/MDANSE-${VERSION_NAME}-${DISTRO}-${ARCH}.deb
status=$?
if [ $status -ne 0 ]; then
echo -e "${RED}" "Cannot build app.""${NORMAL}"
......
......@@ -64,6 +64,6 @@ chmod 777 ${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources//change_dylib_pa
${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources//change_dylib_path.sh
${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources/dmg/create-dmg --background "${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources/dmg/dmg_background.jpg" --volname "MDANSE" --window-pos 200 120 --window-size 800 400 --icon MDANSE.app 200 190 --hide-extension MDANSE.app --app-drop-link 600 185 "${MDANSE_DMG}" ${MDANSE_TEMPORARY_INSTALLATION_DIR}/dist
mv ${MDANSE_SOURCE_DIR}/BuildServer/Unix/${MDANSE_DMG} ${MDANSE_SOURCE_DIR}/BuildServer
mv ${MDANSE_SOURCE_DIR}/BuildServer/Unix/${MDANSE_DMG} ${MDANSE_SOURCE_DIR}
rm -rf ${MDANSE_TEMPORARY_INSTALLATION_DIR}
\ No newline at end of file
......@@ -2,22 +2,22 @@
cd $MDANSE_SOURCE_DIR
# Get revision number from GIT and update the __pkginfo__ file with the current commit
MDANSE_GIT_CURRENT_COMMIT=$(git rev-parse --short HEAD)
# Update the __pkginfo__ file with the current commit
echo -e "${BLUE}""Commit id = ${MDANSE_GIT_CURRENT_COMMIT}<--""${NORMAL}"
echo -e "${BLUE}""Branch name = ${MDANSE_GIT_BRANCH_NAME}<--""${NORMAL}"
$SED_I_COMMAND "s/.*__commit__.*/__commit__ = \"${MDANSE_GIT_CURRENT_COMMIT}\"/" MDANSE/__pkginfo__.py
# Get MDANSE version
MDANSE_VERSION=`sed -n 's/__version__.*=.*\"\(.*\)\"/\1/p' MDANSE/__pkginfo__.py`
# Check if branch is master
if [[ ${CI_COMMIT_REF_NAME} == "master" ]]
if [[ ${MDANSE_GIT_BRANCH_NAME} == "master" ]]
then
VERSION_NAME=${MDANSE_VERSION}
$SED_I_COMMAND "s/.*__beta__.*/__beta__ = None/" MDANSE/__pkginfo__.py
else
# Check if branch is release*
if [[ ${CI_COMMIT_REF_NAME::7} == "release" ]]
if [[ ${MDANSE_GIT_BRANCH_NAME::7} == "release" ]]
then
VERSION_NAME=${MDANSE_VERSION}-rc-${MDANSE_GIT_CURRENT_COMMIT}
$SED_I_COMMAND "s/.*__beta__.*/__beta__ = \"rc\"/" MDANSE/__pkginfo__.py
......
......@@ -6,6 +6,7 @@ rem MDANSE_DEPENDENCIES_DIR
rem MDANSE_TEMPORARY_INSTALLATION_DIR
cd %MDANSE_SOURCE_DIR%
del MDANSE*.exe
rmdir /S /Q build
rmdir /S /Q BuildServer\\Windows\\Build
......
......@@ -16,4 +16,12 @@ rem Set th directory where the MDANSE dependencies are stored
set MDANSE_DEPENDENCIES_DIR=C:\\Projects\\mdanse\\resources\\dependencies\\%BUILD_TARGET%
rem Set the location where the temporary Python will be installed
set MDANSE_TEMPORARY_INSTALLATION_DIR=%MDANSE_SOURCE_DIR%\\BuildServer\\Windows\\Build
\ No newline at end of file
set MDANSE_TEMPORARY_INSTALLATION_DIR=%MDANSE_SOURCE_DIR%\\BuildServer\\Windows\\Build
rem Get revision number from Git
rem To understand this syntax "set cmd=...... for /F %%ii ......", see https://stackoverflow.com/questions/2323292/assign-output-of-a-program-to-a-variable
set cmd="git rev-parse --short HEAD"
for /F %%i in (' %cmd% ') do set MDANSE_GIT_CURRENT_COMMIT=%%i
rem Get commit branch from Gitlab
set MDANSE_GIT_BRANCH_NAME=%CI_COMMIT_REF_NAME%
\ No newline at end of file
......@@ -30,7 +30,7 @@ if %STATUS% neq 0 (
exit %STATUS%
)
move %MDANSE_TEMPORARY_INSTALLATION_DIR%\\MDANSE*.exe %MDANSE_SOURCE_DIR%\\BuildServer\\
move %MDANSE_TEMPORARY_INSTALLATION_DIR%\\MDANSE*.exe %MDANSE_SOURCE_DIR%\\
rem Remove NSIS log file
del NSISlog.txt
cd %MDANSE_SOURCE_DIR%
......@@ -4,10 +4,9 @@ cd "%MDANSE_SOURCE_DIR%"
rem To understand this syntax "set cmd=...... for /F %%ii ......", see https://stackoverflow.com/questions/2323292/assign-output-of-a-program-to-a-variable
rem Get revision number from GIT and update the __pkginfo__ file with the current commit
set cmd="git rev-parse --short HEAD"
for /F %%i in (' %cmd% ') do set MDANSE_GIT_CURRENT_COMMIT=%%i
rem Update the __pkginfo__ file with the current commit
echo "Commit id %MDANSE_GIT_CURRENT_COMMIT%"
echo "Branch name %MDANSE_GIT_BRANCH_NAME%"
sed -i "s/.*__commit__.*/__commit__ = \"%MDANSE_GIT_CURRENT_COMMIT%\"/" MDANSE/__pkginfo__.py
rem Get MDANSE version
......@@ -15,12 +14,12 @@ set cmd="sed -n "s/__version__.*=.*\"\(.*\)\"/\1/p" MDANSE/__pkginfo__.py"
for /F %%i in (' %cmd% ') do set MDANSE_VERSION=%%i
rem Check if branch is master, tag as draft otherwise
if "%CI_COMMIT_REF_NAME%" == "master" (
if "%MDANSE_GIT_BRANCH_NAME%" == "master" (
set VERSION_NAME=%MDANSE_VERSION%
sed -i "s/.*__beta__.*/__beta__ = None/" MDANSE/__pkginfo__.py
) else (
rem Check if branch is release*
if "%CI_COMMIT_REF_NAME:~0,7%" == "release" (
if "%MDANSE_GIT_BRANCH_NAME:~0,7%" == "release" (
set VERSION_NAME=%MDANSE_VERSION%-rc-%MDANSE_GIT_CURRENT_COMMIT%
sed -i "s/.*__beta__.*/__beta__ = \"rc\"/" MDANSE/__pkginfo__.py
) else (
......
version 1.1.1
--------------
* FIXED issue #14 Package name was not valid for debian package in 1.1.0 version
* CHANGED Moving artifacts for more convenient user downloading
version 1.1.0
--------------
* ADDED issue #11 MDANSE is now compliant with 16.04 and 18.04 Ubuntu systems
......
......@@ -25,9 +25,9 @@ __repo__ = "https://code.ill.fr/scientific-software/mdanse/"
__license__ = "GPL 3"
__version__ = "1.1.0"
__version__ = "1.1.1"
__date__ = "06-06-2018"
__date__ = "14-06-2018"
__commit__ = "undefined"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment