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
ba0f42b6
Commit
ba0f42b6
authored
1 year ago
by
Lene Wasskog
Browse files
Options
Downloads
Patches
Plain Diff
chore: Unsure undeployment is only done when deployed application exists
parent
8532d890
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!35
build: New dummy version for testing the pipeline
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+3
-3
3 additions, 3 deletions
.gitlab-ci.yml
with
3 additions
and
3 deletions
.gitlab-ci.yml
+
3
−
3
View file @
ba0f42b6
...
...
@@ -131,9 +131,9 @@ deploy-to-production:
-
echo "deploy $TMP_PATH/$WAR_FILE --force" > deploy.cli
-
scp deploy.cli $SERVER_USER@$SERVER_IP:$TMP_PATH
# Find name of currently deployed application. Undeploy.
#
- 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'"
-
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
-
if [ -n "$CURRENTLY_DEPLOYED" ]; then
ssh $SERVER_USER@$SERVER_IP "$CLI_PATH/jboss-cli.sh --user=$WILDFLY_ADMIN_USERNAME --password=$WILDFLY_ADMIN_PASSWORD --connect --command='undeploy $CURRENTLY_DEPLOYED'"
; fi
# Deploy war file using JBoss CLI and credentials given in CI/CD variables
-
echo "Deploy $WAR_FILE using JBoss CLI"
-
ssh $SERVER_USER@$SERVER_IP "$CLI_PATH/jboss-cli.sh --user=$WILDFLY_ADMIN_USERNAME --password=$WILDFLY_ADMIN_PASSWORD --connect --file=$TMP_PATH/deploy.cli" > deployment.log 2>&1
...
...
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