CI/CD
This commit is contained in:
parent
099534c9b2
commit
bf2eb0b02c
|
@ -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 .
|
||||
|
|
Loading…
Reference in New Issue