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
ENV LUA_VERSION 5.3.3
ENV LUAROCKS_VERSION 2.4.2
ARG TAG=master
# RUN curl -L http://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz | tar xzf - && \
# cd /lua-$LUA_VERSION && \
# make linux test && \
......@@ -17,11 +17,11 @@ RUN curl -L http://luarocks.github.io/luarocks/releases/luarocks-${LUAROCKS_VERS
cd .. && rm -rf /lua-$LUAROCKS_VERSION
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 && \
luarocks install lua-schema-scm-1.rockspec && \
luarocks make sga-daemon-scm-1.rockspec && \
luarocks make sga-driver-posix-scm-1.rockspec
luarocks install lua-schema-*.rockspec && \
luarocks make sga-daemon-*.rockspec && \
luarocks make sga-driver-posix-*.rockspec
WORKDIR /sgad
......
......@@ -17,7 +17,7 @@ variables:
- docker pull $DOCKER_REGISTRY$DOCKER_REGISTRY_IMAGE_DIND:$LAST || true
- 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:$LAST \
--tag $DOCKER_REGISTRY$CI_REGISTRY_IMAGE:latest .
......@@ -46,6 +46,7 @@ docker_release:
extends: .docker_deploy
before_script:
- export LAST="stable"
- export BUILD_ARGS="--build-arg TAG=${CI_COMMIT_TAG}"
when: manual
only:
- tags
......@@ -7,14 +7,13 @@ set -e
# Uso: ./release-prepare-npm.sh VERSION_TO_RELEASE NEXT_SNAPSHOT_VERSION
###############################################################################
if [ "$#" != 2 ]
if [ "$#" != 1 ]
then
echo "Uso: $0 <VERSION_TO_RELEASE> <NEXT_SNAPSHOT_VERSION>"
echo "Uso: $0 <VERSION_TO_RELEASE>"
exit
fi
RELEASE=$1
SNAPSHOT=$2
ROCKSPEC_REVISION=1
checkIsMaster()
......@@ -79,11 +78,12 @@ releaseVersion()
nextSnapshotVersion()
{
echo "[..] prepare for next development $SNAPSHOT..."
changeRockSpecs $SNAPSHOT
renameRockSpecs $SNAPSHOT
developmentVersion="scm-1"
echo "[..] prepare for next development $developmentVersion..."
changeRockSpecs $developmentVersion
renameRockSpecs $developmentVersion
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 && \
echo "[ok]"
}
......
package = "sga-daemon"
version = "1.7.2-SNAPSHOT"
version = "scm-1"
source = {
-- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git",
......
package = "sga-driver-pbs"
version = "1.7.2-SNAPSHOT"
version = "scm-1"
source = {
-- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git",
......
package = "sga-driver-posix"
version = "1.7.2-SNAPSHOT"
version = "scm-1"
source = {
-- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git",
......
package = "sga-driver-slurm"
version = "1.7.2-SNAPSHOT"
version = "scm-1"
source = {
-- url = "git://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon.git",
......
package = "sga-exec"
version = "1.7.2-SNAPSHOT"
version = "scm-1"
source = {
-- 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