From 8dc43ad9268798ce697c352fd2136d79b808dffd Mon Sep 17 00:00:00 2001 From: Jordi Mas Date: Sun, 30 Jul 2023 19:38:02 +0200 Subject: [PATCH] Fix --- .gitlab-ci.yml | 2 +- docker/dockerfile-builder | 6 ++---- docker/entry-point-builder.sh | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4a0ff91..3a13f21d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ build: - echo "build cfg 1 - ${TRANSIFEX_CFG}" # Copy GitLab cfg - cp ${TRANSIFEX_CFG} transifex.cfg - - docker build --build-arg TRANSIFEX_CFG=transifex.cfg --tag tmt-builder --tag $IMAGE_NAME . -f $DOCKER_PATH + - docker build --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 5eeedeaa..7287eb9e 100644 --- a/docker/dockerfile-builder +++ b/docker/dockerfile-builder @@ -2,7 +2,6 @@ FROM python:3.9.10-slim-bullseye ENV DIR /srv/dev ENV DIR_TMT_GIT /srv/dev/tm-git -ARG TRANSIFEX_CFG= RUN apt-get update && apt-get install python3-dev libhunspell-dev libyaml-dev gettext zip mercurial bzr ruby git curl wget g++ subversion bzip2 -y RUN curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash && mv ./tx /usr/bin/ @@ -34,9 +33,8 @@ COPY cfg/ $DIR_TMT_GIT/cfg/ COPY docker/ $DIR_TMT_GIT/docker/ COPY integration-tests/ $DIR_TMT_GIT/integration-tests/ -RUN echo val:"$TRANSIFEX_CFG" -COPY $TRANSIFEX_CFG ~./transifexrc -RUN ls ~./transifexrc +# GitLab CI/CD +COPY *transifex.cfg /root/.transifexrc # 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 82096c39..2bcfe6af 100755 --- a/docker/entry-point-builder.sh +++ b/docker/entry-point-builder.sh @@ -23,6 +23,7 @@ if [[ -e $PRESERVE_CROSSEXECS/translation-memories/ ]]; then fi ls -l ~/.transifexrc +bash if [ ! -f ~/.transifexrc ]; then echo "Removing Transifex projects" grep -l "type.*transifex" cfg/projects/*.json | xargs rm -f