Skip to content

Commit

Permalink
Merge pull request #10127 from filecoin-project/gstuart/backport-dock…
Browse files Browse the repository at this point in the history
…er-fix

backport: fix: ci: Fix dirty git state when building docker images
  • Loading branch information
magik6k authored Jan 26, 2023
2 parents 3e6e02d + a0994ac commit 10acef2
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 172 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ jobs:
steps:
- setup_remote_docker
- checkout
- git_fetch_all_tags
- run: git submodule sync
- run: git submodule update --init

- docker/check:
docker-username: DOCKERHUB_USERNAME
docker-password: DOCKERHUB_PASSWORD
Expand Down
4 changes: 4 additions & 0 deletions .circleci/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ jobs:
steps:
- setup_remote_docker
- checkout
- git_fetch_all_tags
- run: git submodule sync
- run: git submodule update --init

- docker/check:
docker-username: DOCKERHUB_USERNAME
docker-password: DOCKERHUB_PASSWORD
Expand Down
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/AppDir
/appimage-builder-cache
*.AppImage
/lotus
/lotus-miner
/lotus-worker
Expand Down Expand Up @@ -50,3 +47,8 @@ build/builtin-actors/v*
build/builtin-actors/*.car

dist/


# The following files are checked into git and result
# in dirty git state if removed from the docker context
!extern/filecoin-ffi/rust/filecoin.pc
1 change: 0 additions & 1 deletion AppDir/usr/share/icons/icon.svg

This file was deleted.

71 changes: 0 additions & 71 deletions AppImageBuilder.yml

This file was deleted.

2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ RUN set -eux; \
COPY ./ /opt/filecoin
WORKDIR /opt/filecoin

RUN scripts/docker-git-state-check.sh

### make configurable filecoin-ffi build
ARG FFI_BUILD_FROM_SOURCE=0
ENV FFI_BUILD_FROM_SOURCE=${FFI_BUILD_FROM_SOURCE}
Expand Down
12 changes: 12 additions & 0 deletions scripts/docker-git-state-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
set -e

if [ -z "$(git status --porcelain)" ]; then
echo "PASSED: Working directory clean"
else
echo "FAILED: Working directory not clean."
echo "This is likely because the .dockerignore file has removed something checked into git."
echo "Add the missing files listed below to the .dockerignore to fix this issue:"
echo "$(git status)"
exit 1
fi

1 change: 0 additions & 1 deletion snap/local/icon.svg

This file was deleted.

96 changes: 0 additions & 96 deletions snap/snapcraft.yaml

This file was deleted.

0 comments on commit 10acef2

Please sign in to comment.