This commit is contained in:
FyloZ 2021-03-13 11:13:08 -05:00
parent 099534c9b2
commit bf2eb0b02c
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,7 @@ test:
variables:
TEST_CONTAINER_NAME: "cre_backend_gradle_tests-$CI_COMMIT_REF_NAME"
script:
- docker rm $TEST_CONTAINER_NAME || true
- docker run --name $TEST_CONTAINER_NAME $CI_REGISTRY_IMAGE_GRADLE gradle test
after_script:
- mkdir test-results && docker cp $TEST_CONTAINER_NAME:/usr/src/cre/build/test-results/test/ test-results
@ -46,6 +47,7 @@ package:
PACKAGE_CONTAINER_NAME: "cre_backend_package-$CI_COMMIT_REF_NAME"
ARTIFACT_NAME: "ColorRecipesExplorer-backend-$CI_PIPELINE_IID"
script:
- docker rm $PACKAGE_CONTAINER_NAME || true
- docker run --name $PACKAGE_CONTAINER_NAME $CI_REGISTRY_IMAGE_GRADLE gradle bootJar
- docker cp $PACKAGE_CONTAINER_NAME:/usr/src/cre/build/libs/ColorRecipesExplorer.jar $ARTIFACT_NAME.jar
- docker build -t $CI_REGISTRY_IMAGE_BACKEND --build-arg JDK_VERSION=$JDK_VERSION --build-arg PORT=$PORT --build-arg ARTIFACT_NAME=$ARTIFACT_NAME .