Fix commit-hash.txt placement: copy into env before creating tarball

This commit is contained in:
russell@unturf.com 2026-02-01 17:17:00 -05:00
parent 4f60f6fbed
commit 0ea91d6859

View file

@ -31,14 +31,14 @@ build:
- rm -rf /opt/remarkbox/env
# Clone the virtualenv with virtualenv-clone into the desired location.
- virtualenv-clone -vvv $PWD/env /opt/remarkbox/env
# Create commit-hash.txt to track this build's git commit hash.
- echo $CI_COMMIT_SHA >> commit-hash.txt
# Place it inside the virtualenv before creating the tarball.
- cp commit-hash.txt /opt/remarkbox/env/commit-hash.txt
# Create a tarball of the virtualenv.
- tar -zcf env.tar.gz -C /opt/remarkbox .
# Create a SHA512 hash of env.tar.gz.
- sha512sum env.tar.gz >> env.tar.gz.hash
# Create commit-hash.txt to track this build's git commit hash.
- echo $CI_COMMIT_SHA >> commit-hash.txt
# Also place it inside the virtualenv so the deployed app can read it.
- cp commit-hash.txt /opt/remarkbox/env/commit-hash.txt
artifacts:
paths:
- env.tar.gz