-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build & publish cdoc2-shares-server docker image to ghcr.io (#1)
* fix GH workflow deploy (deploy Maven and Docker images on release) * fix cdoc2-shares-server-liquibase Docker building * remove test dependency for cdoc2-client when building without tests (-Dmaven.test.skip=true) --------- Co-authored-by: Mir Jalal Hashimli <mir.jalal.hashimli@cyber.ee>
- Loading branch information
Showing
18 changed files
with
117 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# build Docker images locally | ||
PROJECT_DIR=$(pwd) | ||
|
||
cd $PROJECT_DIR/shares-server | ||
bash build-image.sh | ||
|
||
cd $PROJECT_DIR/server-db | ||
bash build-image.sh | ||
|
||
cd $PROJECT_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
#set -x | ||
|
||
SHARES_SERVER_VERSION=$(cd ../shares-server && mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
DOCKER_REGISTRY=ghcr.io | ||
DOCKER_REPOSITORY=open-eid | ||
|
||
LIQUIBASE_IMAGE_NAME=cdoc2-shares-server-liquibase | ||
|
||
# version shows what version of shares-server is used in pair with liquibase image | ||
# Docker version should be same as shares-server-version although server-db pom version might be different | ||
docker build -t ${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}/${LIQUIBASE_IMAGE_NAME}:${SHARES_SERVER_VERSION} ../server-db/src/main/resources/db |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
classpath: /liquibase/cdoc2 | ||
changelog-file: db.changelog-master.yaml | ||
classpath: /liquibase/changelog | ||
changelog-file: db.changelog-master.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
# load env | ||
cd .. | ||
source load-env.sh | ||
#!/usr/bin/env bash | ||
# build Docker image locally | ||
#set -x | ||
|
||
cd shares-server | ||
SHARES_SERVER_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
DOCKER_REGISTRY=ghcr.io | ||
DOCKER_REPOSITORY=open-eid | ||
IMAGE_NAME=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout) | ||
|
||
# TODO: should spring-boot.build-image.publish=true only if env variable DOCKER_REGISTRY is set | ||
mvn spring-boot:build-image -Dspring-boot.build-image.publish=false -Dspring-boot.build-image.imageName=${DOCKER_REGISTRY}cdoc2-shares-server/shares-server:${SHARES_SERVER_VERSION} -Dspring-boot.build-image.createdDate=now | ||
LIQUIBASE_IMAGE_NAME=cdoc2-shares-server-liquibase | ||
|
||
mvn spring-boot:build-image \ | ||
-Dmaven.test.skip=true \ | ||
-Dspring-boot.build-image.publish=false \ | ||
-Dspring-boot.build-image.imageName=${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}/${IMAGE_NAME}:${SHARES_SERVER_VERSION} \ | ||
-Dspring-boot.build-image.tags=${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}/${IMAGE_NAME}:latest \ | ||
-Dspring-boot.build-image.createdDate=now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.