Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSCore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPSCore
Commits
bc3bb558
Commit
bc3bb558
authored
1 year ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Retry CURRENTLY DEPLOYED when deployment exists
parent
37fb933a
No related branches found
No related tags found
1 merge request
!35
build: New dummy version for testing the pipeline
Pipeline
#3218
failed
1 year ago
Stage: build
Stage: test
Stage: deploy
Stage: upload
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+4
-3
4 additions, 3 deletions
.gitlab-ci.yml
with
4 additions
and
3 deletions
.gitlab-ci.yml
+
4
−
3
View file @
bc3bb558
...
...
@@ -132,8 +132,9 @@ deploy-to-production:
-
scp deploy.cli $SERVER_USER@$SERVER_IP:$TMP_PATH
# Find name of currently deployed application. Undeploy.
#- echo $SERVER_USER@$SERVER_IP $CLI_PATH/jboss-cli.sh --user=$WILDFLY_ADMIN_USERNAME --password=$WILDFLY_ADMIN_PASSWORD --connect --commands=ls\ deployment
#- CURRENTLY_DEPLOYED=$(ssh $SERVER_USER@$SERVER_IP "$CLI_PATH/jboss-cli.sh --user=$WILDFLY_ADMIN_USERNAME --password=$WILDFLY_ADMIN_PASSWORD --connect --commands=ls\ deployment | tr ' ' '\n' | grep VIPSCore-.*war")
#- echo $CURRENTLY_DEPLOYED
### Kommandoen nedenfor tryner - uten at det kommer noen feilmelding. Kan det være fordi det ikke var deployet noe fra før?
-
CURRENTLY_DEPLOYED=$(ssh $SERVER_USER@$SERVER_IP "$CLI_PATH/jboss-cli.sh --user=$WILDFLY_ADMIN_USERNAME --password=$WILDFLY_ADMIN_PASSWORD --connect --commands=ls\ deployment | tr ' ' '\n' | grep VIPSCore-.*war")
-
echo $CURRENTLY_DEPLOYED
#- ssh $SERVER_USER@$SERVER_IP "$CLI_PATH/jboss-cli.sh --user=$WILDFLY_ADMIN_USERNAME --password=$WILDFLY_ADMIN_PASSWORD --connect --command='undeploy $CURRENTLY_DEPLOYED'"
# Deploy war file using JBoss CLI and credentials given in CI/CD variables
-
echo "Deploy $WAR_FILE using JBoss CLI"
...
...
@@ -202,7 +203,7 @@ upload-and-tag-release:
-
git merge -m "[ci skip] Merge branch '${RELEASE_BRANCH}' into ${MAIN_BRANCH}" --no-ff $RELEASE_BRANCH
# Change version in pom.xml - build new pom_with_models.xml
-
"
./mvnw
$MAVEN_CLI_OPTS
$MAVEN_OPTS
validate
-DbumpPatch"
-
"
python
build_pom_with_models.py"
-
"
python
3
build_pom_with_models.py"
-
export SNAPSHOT_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 "\[.*")
-
echo "New version in main '$SNAPSHOT_VERSION'"
-
git add pom.xml
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment