Skip to content

Commit

Permalink
Merge pull request wtsi-npg#169 from kjsanger/bugfix/avoid-dirty-ci-b…
Browse files Browse the repository at this point in the history
…uild

Avoid creating a dirty build environment in CI
  • Loading branch information
marcomoscasgr authored Jul 14, 2023
2 parents 4d22f3c + beba132 commit 8b6427e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 2 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
.DS_Store
.dockerignore
.github
.gitignore
.pytest_cache
Dockerfile
build
dist
docker-compose.yml
pytest.ini
*.egg-info
*.report.json
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ profile_default/
ipython_config.py

# pyenv
.pyenv
.python-version

# pipenv
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ WORKDIR /app

COPY --from=builder /app /app

# Mount the .git directory to allow setuptools_scm to get the version
# Mount the .git directory to allow the build to get the version from git
RUN --mount=source=.git,target=.git,type=bind \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir .
pip install --no-cache-dir . && \
git status && \
ls -al

RUN useradd -l -m -s /bin/false appuser && mkdir /home/appuser/.irods

Expand Down
3 changes: 3 additions & 0 deletions docker/install_pyenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ export PYENV_GIT_TAG="v${PYENV_RELEASE_VERSION}"
PYENV_ROOT=${PYENV_ROOT:-"$HOME/.pyenv"}
export PATH="$PYENV_ROOT/bin:$PATH"

PYENV_SHA256="a1ad63c22842dce498b441551e2f83ede3e3b6ebb33f62013607bba424683191"
curl -sSL -O https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer
sha256sum ./pyenv-installer | grep "$PYENV_SHA256"
/bin/bash ./pyenv-installer
rm ./pyenv-installer

0 comments on commit 8b6427e

Please sign in to comment.