Update .gitlab-ci.yml

This commit is contained in:
Administrator 2021-02-11 20:14:15 +00:00
parent 98d07399d8
commit 0294aaf57a
1 changed files with 3 additions and 2 deletions

View File

@ -32,11 +32,12 @@ package-backend:
needs: ['test-backend']
variables:
PACKAGE_CONTAINER_NAME: "cre_backend_gradle_package"
ARTIFACT_NAME: "ColorRecipesExplorer-$CI_PIPELINE_IID"
script:
- docker run --name $PACKAGE_CONTAINER_NAME $CI_REGISTRY_IMAGE_GRADLE gradle buildBackend
- docker cp $PACKAGE_CONTAINER_NAME:/usr/src/cre/dist/backend/ColorRecipesExplorer.jar ColorRecipesExplorer-$CI_PIPELINE_IID.jar
- docker cp $PACKAGE_CONTAINER_NAME:/usr/src/cre/dist/backend/ColorRecipesExplorer.jar $ARTIFACT_NAME.jar
- docker rm $PACKAGE_CONTAINER_NAME
- docker build -t $CI_REGISTRY_IMAGE_BACKEND -f backend.Dockerfile --build-arg PORT=$BACKEND_PORT .
- docker build -t $CI_REGISTRY_IMAGE_BACKEND -f backend.Dockerfile --build-arg PORT=$BACKEND_PORT --build_arg ARTIFACT_NAME=$ARTIFACT_NAME .
- docker push $CI_REGISTRY_IMAGE_BACKEND
artifacts:
paths: