Skip to content

Commit

Permalink
attempt to store version number in docker builds (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
boogheta committed Sep 8, 2023
1 parent d19e881 commit 37f1f19
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +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
- export KUBECONFIG=$kubeconfig_file

build_backend_image:
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ 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

Expand Down
2 changes: 2 additions & 0 deletions hyphe_frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ 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 37f1f19

Please sign in to comment.