diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 030fd94..ec5af5b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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