Commit e03606cd authored by Felipe Pina's avatar Felipe Pina
Browse files

Merge branch 'fix/SOMA-4525-docker-build-version' into 'master'

[SOMA-4525] Corrigir geração das imagens Docker

See merge request !48
parents 3b7c5da3 ab99db86
Pipeline #35599 passed with stages
in 3 minutes and 2 seconds
...@@ -2,7 +2,7 @@ FROM repo.tecgraf.puc-rio.br:18089/soma/ubuntu:16.04-sga-posix ...@@ -2,7 +2,7 @@ FROM repo.tecgraf.puc-rio.br:18089/soma/ubuntu:16.04-sga-posix
ENV LUA_VERSION 5.3.3 ENV LUA_VERSION 5.3.3
ENV LUAROCKS_VERSION 2.4.2 ENV LUAROCKS_VERSION 2.4.2
ARG TAG=master
# RUN curl -L http://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz | tar xzf - && \ # RUN curl -L http://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz | tar xzf - && \
# cd /lua-$LUA_VERSION && \ # cd /lua-$LUA_VERSION && \
# make linux test && \ # make linux test && \
...@@ -17,11 +17,11 @@ RUN curl -L http://luarocks.github.io/luarocks/releases/luarocks-${LUAROCKS_VERS ...@@ -17,11 +17,11 @@ RUN curl -L http://luarocks.github.io/luarocks/releases/luarocks-${LUAROCKS_VERS
cd .. && rm -rf /lua-$LUAROCKS_VERSION cd .. && rm -rf /lua-$LUAROCKS_VERSION
RUN mkdir sgarest-daemon && \ RUN mkdir sgarest-daemon && \
curl -L https://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon/-/archive/master/sgarest-daemon-master.tar.gz | tar xzf - -C sgarest-daemon --strip-components 1 && \ curl -L https://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon/-/archive/${TAG}/sgarest-daemon-${TAG}.tar.gz | tar xzf - -C sgarest-daemon --strip-components 1 && \
cd sgarest-daemon && \ cd sgarest-daemon && \
luarocks install lua-schema-scm-1.rockspec && \ luarocks install lua-schema-*.rockspec && \
luarocks make sga-daemon-scm-1.rockspec && \ luarocks make sga-daemon-*.rockspec && \
luarocks make sga-driver-posix-scm-1.rockspec luarocks make sga-driver-posix-*.rockspec
WORKDIR /sgad WORKDIR /sgad
......
...@@ -17,7 +17,7 @@ variables: ...@@ -17,7 +17,7 @@ variables:
- docker pull $DOCKER_REGISTRY$DOCKER_REGISTRY_IMAGE_DIND:$LAST || true - docker pull $DOCKER_REGISTRY$DOCKER_REGISTRY_IMAGE_DIND:$LAST || true
- cd Docker/posix/ - cd Docker/posix/
- | - |
docker build --cache-from $DOCKER_REGISTRY$CI_REGISTRY_IMAGE:$LAST \ docker build $BUILD_ARGS --cache-from $DOCKER_REGISTRY$CI_REGISTRY_IMAGE:$LAST \
--tag $DOCKER_REGISTRY$CI_REGISTRY_IMAGE:$VERSION \ --tag $DOCKER_REGISTRY$CI_REGISTRY_IMAGE:$VERSION \
--tag $DOCKER_REGISTRY$CI_REGISTRY_IMAGE:$LAST \ --tag $DOCKER_REGISTRY$CI_REGISTRY_IMAGE:$LAST \
--tag $DOCKER_REGISTRY$CI_REGISTRY_IMAGE:latest . --tag $DOCKER_REGISTRY$CI_REGISTRY_IMAGE:latest .
...@@ -46,6 +46,7 @@ docker_release: ...@@ -46,6 +46,7 @@ docker_release:
extends: .docker_deploy extends: .docker_deploy
before_script: before_script:
- export LAST="stable" - export LAST="stable"
- export BUILD_ARGS="--build-arg TAG=${CI_COMMIT_TAG}"
when: manual when: manual
only: only:
- tags - tags
...@@ -7,14 +7,13 @@ set -e ...@@ -7,14 +7,13 @@ set -e
# Uso: ./release-prepare-npm.sh VERSION_TO_RELEASE NEXT_SNAPSHOT_VERSION # Uso: ./release-prepare-npm.sh VERSION_TO_RELEASE NEXT_SNAPSHOT_VERSION
############################################################################### ###############################################################################
if [ "$#" != 2 ] if [ "$#" != 1 ]
then then
echo "Uso: $0 <VERSION_TO_RELEASE> <NEXT_SNAPSHOT_VERSION>" echo "Uso: $0 <VERSION_TO_RELEASE>"
exit exit
fi fi
RELEASE=$1 RELEASE=$1
SNAPSHOT=$2
ROCKSPEC_REVISION=1 ROCKSPEC_REVISION=1
checkIsMaster() checkIsMaster()
...@@ -79,11 +78,12 @@ releaseVersion() ...@@ -79,11 +78,12 @@ releaseVersion()
nextSnapshotVersion() nextSnapshotVersion()
{ {
echo "[..] prepare for next development $SNAPSHOT..." developmentVersion="scm-1"
changeRockSpecs $SNAPSHOT echo "[..] prepare for next development $developmentVersion..."
renameRockSpecs $SNAPSHOT changeRockSpecs $developmentVersion
renameRockSpecs $developmentVersion
stageRockSpecs stageRockSpecs
git commit -m "[sgarest-daemon release] prepare for next development $SNAPSHOT" && \ git commit -m "[sgarest-daemon release] prepare for next development $developmentVersion" && \
git push && \ git push && \
echo "[ok]" echo "[ok]"
} }
......
package = "sga-daemon" package = "sga-daemon"
version = "1.7.2-SNAPSHOT" version = "scm-1"
source = { source = {
-- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git", -- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git",
......
package = "sga-driver-pbs" package = "sga-driver-pbs"
version = "1.7.2-SNAPSHOT" version = "scm-1"
source = { source = {
-- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git", -- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git",
......
package = "sga-driver-posix" package = "sga-driver-posix"
version = "1.7.2-SNAPSHOT" version = "scm-1"
source = { source = {
-- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git", -- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git",
......
package = "sga-driver-slurm" package = "sga-driver-slurm"
version = "1.7.2-SNAPSHOT" version = "scm-1"
source = { source = {
-- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git", -- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git",
......
package = "sga-exec" package = "sga-exec"
version = "1.7.2-SNAPSHOT" version = "scm-1"
source = { source = {
-- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git", -- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git",
......
Supports Markdown
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