Skip to content

Commit

Permalink
First iteration of #43
Browse files Browse the repository at this point in the history
  • Loading branch information
commjoen committed Nov 30, 2021
1 parent 5c9cc1f commit a742357
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/scripts/docker-create-and-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ echo "tag message: $2"
echo "buildarg supplied: $3"

echo "tagging version"
git tag -a $1 -m "$2"
git push --tags
#git tag -a $1 -m "$2"
#git push --tags
docker buildx create --name mybuilder
docker buildx use mybuilder
echo "generating challenge 12-data"
openssl rand -base64 32 >yourkey.txt
echo "creating containers"
docker buildx build --platform linux/amd64,linux/arm64 -t jeroenwillemsen/addo-example:$1-no-vault --build-arg "$3" --build-arg "PORT=8081" --build-arg "argBasedVersion=$1" --build-arg "spring_profile=without-vault" --push ./../../.
docker buildx build --platform linux/amd64,linux/arm64 -t jeroenwillemsen/addo-example:$1-local-vault --build-arg "$3" --build-arg "PORT=8081" --build-arg "argBasedVersion=$1" --build-arg "spring_profile=local-vault" --push ./../../.
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ aws/.terraform.tfstate.lock.info
# Templated
gcp/k8s/secret-volume.yml
gcp/k8s/secret-challenge-vault-deployment.yml

# Challenge 12 ;-)
.github/scripts/yourkey.txt
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ RUN echo "$ARG_BASED_PASSWORD"
RUN echo "$argBasedPassword"

ADD target/wrongsecrets-0.0.2-SNAPSHOT.jar /application.jar
ADD .github/scripts/yourkey.txt /yourkey.txt
CMD java -jar -Dspring.profiles.active=$(echo ${SPRING_PROFILES_ACTIVE}) application.jar

0 comments on commit a742357

Please sign in to comment.