Skip to content

Commit

Permalink
let's try to write version in a copied directory instead so that dock…
Browse files Browse the repository at this point in the history
…er build won't crash if the file is missing (#486)
  • Loading branch information
boogheta committed Sep 8, 2023
1 parent 37f1f19 commit 300fa6e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ variables:
before_script:
- VERSION=$(echo $CI_COMMIT_TAG | sed -nre 's/^v([0-9.]+)$/\1/p')
- if [ -n "${VERSION}" ]; then IMAGE_TAG=${VERSION}; else IMAGE_TAG=${CI_COMMIT_REF_SLUG}; fi
- echo "$IMAGE_TAG" > VERSION
- echo "$IMAGE_TAG" > hyphe_frontend/VERSION
- echo "$IMAGE_TAG" > config/VERSION
- echo "$IMAGE_TAG" > hyphe_frontend/app/conf/VERSION
- export KUBECONFIG=$kubeconfig_file

build_backend_image:
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ RUN buildDeps='gcc libffi-dev libxml2-dev libxslt-dev' \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /var/lib/apt/lists/*

COPY ./VERSION /app/VERSION

COPY ./bin /app/bin

COPY ./config /app/config.sample
Expand Down
2 changes: 0 additions & 2 deletions hyphe_frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ COPY --from=builder --chown=nginx:nginx /hyphe-frontend/app /frontend/app

WORKDIR /frontend/app

COPY ./VERSION /app/VERSION

COPY ./docker-nginx-vhost.conf /etc/nginx/conf.d/docker-nginx-vhost.template

COPY docker-entrypoint.sh /
Expand Down

0 comments on commit 300fa6e

Please sign in to comment.