diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d534b1ea..38d7c1e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ build: - export DOCKER_PATH=docker/dockerfile-builder - export REPO_NAME=$CI_REGISTRY_IMAGE/tmt-builder - export IMAGE_NAME=$REPO_NAME:$CI_COMMIT_REF_NAME - - docker build --tag tmt-builder --tag $IMAGE_NAME . -f $DOCKER_PATH + - docker build --env TRANSIFEX_CFG=$TRANSIFEX_CFG --tag tmt-builder --tag $IMAGE_NAME . -f $DOCKER_PATH - docker push $IMAGE_NAME build-languagetool: diff --git a/docker/dockerfile-builder b/docker/dockerfile-builder index b729516f..a3022cd9 100644 --- a/docker/dockerfile-builder +++ b/docker/dockerfile-builder @@ -7,7 +7,6 @@ RUN apt-get update && apt-get install python3-dev libhunspell-dev libyaml-dev ge RUN curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash && mv ./tx /usr/bin/ RUN mkdir -p $DIR -RUN if [[ -n "${TRANSIFEX_CFG}" ]]; then cp ${TRANSIFEX_CFG} ~/.transifexrc ; fi #Pology RUN apt-get install cmake -y @@ -34,5 +33,11 @@ COPY source-pos/ $DIR_TMT_GIT/source-pos/ COPY cfg/ $DIR_TMT_GIT/cfg/ COPY docker/ $DIR_TMT_GIT/docker/ COPY integration-tests/ $DIR_TMT_GIT/integration-tests/ + +# Gitlab configuration +RUN echo "var: ${TRANSIFEX_CFG}" +RUN if [[ -n "${TRANSIFEX_CFG}" ]]; then cp ${TRANSIFEX_CFG} ~/.transifexrc ; fi + + # What get's executed on Run ENTRYPOINT bash $DIR_TMT_GIT/docker/entry-point-builder.sh $DIR $DIR_TMT_GIT diff --git a/docker/entry-point-builder.sh b/docker/entry-point-builder.sh index 26d0189f..877e3f45 100755 --- a/docker/entry-point-builder.sh +++ b/docker/entry-point-builder.sh @@ -3,7 +3,7 @@ DIR="$1" # root /srv/dev DIR_TMT_GIT="$2" # /srv/dev/tm-git - working directory PUBLISH_WEBDOCKER=/srv/web-docker PRESERVE_CROSSEXECS=/srv/tmt-files - +bash # Run unit tests cd $DIR_TMT_GIT nose2