Skip to content
Snippets Groups Projects
Commit 76b60de5 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

chore: Use deploy, and not deploy-file

Did not work because url has to be provided
parent 855c7797
No related branches found
No related tags found
1 merge request!35build: New dummy version for testing the pipeline
...@@ -221,12 +221,8 @@ upload-and-tag-release: ...@@ -221,12 +221,8 @@ upload-and-tag-release:
- export RELEASE_VERSION=$(./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS --batch-mode --no-transfer-progress --non-recursive help:evaluate -Dexpression=project.version | grep -v "\[.*") - export RELEASE_VERSION=$(./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS --batch-mode --no-transfer-progress --non-recursive help:evaluate -Dexpression=project.version | grep -v "\[.*")
- export RELEASE_TAG="v${RELEASE_VERSION}" - export RELEASE_TAG="v${RELEASE_VERSION}"
- echo "Version to deploy '$RELEASE_VERSION', will be tagged '$RELEASE_TAG'" - echo "Version to deploy '$RELEASE_VERSION', will be tagged '$RELEASE_TAG'"
- "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS deploy -DskipTests"
# Find name of war file in target folder (built previously in build stage), exit if none exists # NB! Wanted to use deploy:deploy-file with already built war file above, but this requires url to be specifically set
- WAR_FILE=$(find target -maxdepth 1 -type f -name "*.war" | sort -n | tail -1 | xargs basename)
- if [ -z "$WAR_FILE" ]; then echo "No war file found in target directory"; exit 1; fi
- echo "Deploy war file built in build job '$WAR_FILE'"
- "./mvnw $MAVEN_CLI_OPTS $MAVEN_OPTS deploy:deploy-file -DpomFile=pom.xml -Dfile=target/$WAR_FILE"
- git tag -a $RELEASE_TAG -m "Tag release ${RELEASE_TAG}" - git tag -a $RELEASE_TAG -m "Tag release ${RELEASE_TAG}"
- git push origin $RELEASE_TAG - git push origin $RELEASE_TAG
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment