fix java cache key for CI; fix circle docker api version (#79)

This commit is contained in:
Alex Goodman 2020-07-13 12:11:11 -04:00 committed by GitHub
parent 502e2afd06
commit 3f090f9647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View File

@ -9,6 +9,9 @@ jobs:
- image: circleci/golang:<< parameters.version >> - image: circleci/golang:<< parameters.version >>
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
# work around for recent circle CI breaking change
# Error: "Error response from daemon: client version 1.39 is too new. Maximum supported API version is 1.38"
DOCKER_API_VERSION: "1.38"
# 1CPU / 2GB RAM # 1CPU / 2GB RAM
resource_class: small resource_class: small
steps: steps:
@ -39,6 +42,9 @@ jobs:
- image: circleci/golang:<< parameters.version >> - image: circleci/golang:<< parameters.version >>
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
# work around for recent circle CI breaking change
# Error: "Error response from daemon: client version 1.39 is too new. Maximum supported API version is 1.38"
DOCKER_API_VERSION: "1.38"
# 1CPU / 2GB RAM # 1CPU / 2GB RAM
resource_class: small resource_class: small
steps: steps:
@ -75,9 +81,7 @@ jobs:
- run: - run:
name: build cache key for java test-fixture blobs name: build cache key for java test-fixture blobs
command: | command: make java-packages-fingerprint
cd imgbom/cataloger/java/test-fixtures/java-builds &&\
make packages.fingerprint
- restore_cache: - restore_cache:
keys: keys:

View File

@ -74,6 +74,10 @@ integration: ## Run integration tests
integration/test-fixtures/tar-cache.key, integration-fingerprint: integration/test-fixtures/tar-cache.key, integration-fingerprint:
find integration/test-fixtures/image-* -type f -exec md5sum {} + | awk '{print $1}' | sort | md5sum | tee integration/test-fixtures/tar-cache.fingerprint find integration/test-fixtures/image-* -type f -exec md5sum {} + | awk '{print $1}' | sort | md5sum | tee integration/test-fixtures/tar-cache.fingerprint
java-packages-fingerprint:
@cd imgbom/cataloger/java/test-fixtures/java-builds && \
make packages.fingerprint
clear-test-cache: ## Delete all test cache (built docker image tars) clear-test-cache: ## Delete all test cache (built docker image tars)
find . -type f -wholename "**/test-fixtures/tar-cache/*.tar" -delete find . -type f -wholename "**/test-fixtures/tar-cache/*.tar" -delete

View File

@ -18,7 +18,8 @@ $(PKGSDIR)/example-java-app-maven-0.1.0.jar:
./build-example-java-app-maven.sh $(PKGSDIR) ./build-example-java-app-maven.sh $(PKGSDIR)
clean-maven: clean-maven:
rm -rf example-java-app/target \ rm -rf example-java-app/\? \
example-java-app/target \
example-java-app/dependency-reduced-pom.xml example-java-app/dependency-reduced-pom.xml
# Gradle... # Gradle...
@ -41,5 +42,5 @@ clean-jenkins:
# we need a way to determine if CI should bust the test cache based on the source material # we need a way to determine if CI should bust the test cache based on the source material
$(PKGSDIR).fingerprint: clean-examples $(PKGSDIR).fingerprint: clean-examples
mkdir -p $(PKGSDIR) mkdir -p $(PKGSDIR)
find example-* -type f -exec sha256sum {} \; > $(PKGSDIR).fingerprint find example-* -type f -exec sha256sum {} \; | sort | tee $(PKGSDIR).fingerprint
sha256sum $(PKGSDIR).fingerprint sha256sum $(PKGSDIR).fingerprint