This is the codeAbility Sharing Platform! Learn more about the
codeAbility Sharing Platform
.
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
codeAbility Sharing Platform
Manage
Activity
Members
Labels
Plan
Issues
41
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
development
sharing
codeAbility Sharing Platform
Commits
d176e4cd
Commit
d176e4cd
authored
1 year ago
by
Daniel Crazzolara
Browse files
Options
Downloads
Patches
Plain Diff
fixed auto-deployment
parent
9a249e1a
Branches
Branches containing commit
1 merge request
!222
Bringing the december release into production
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
manual_deploy.sh
+5
-5
5 additions, 5 deletions
manual_deploy.sh
with
6 additions
and
6 deletions
.gitlab-ci.yml
+
1
−
1
View file @
d176e4cd
...
...
@@ -162,7 +162,7 @@ deployProd:
-
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
variables
:
REGISTRY_URL
:
sharing-codeability.uibk.ac.at:5051
IMAGE_TAG
:
sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform/gitsearch/$CI_COMMIT_REF_NAME
IMAGE_TAG
:
sharing-codeability.uibk.ac.at:5051/
development/
sharing/codeability-sharing-platform/gitsearch/$CI_COMMIT_REF_NAME
script
:
-
ssh contDeploy@sharing-codeability -p 1022 "export REGISTRY_URL=$REGISTRY_URL export CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME && export COMMIT_DATE=$(git show -s --format=%ct $CI_COMMIT_SHA) && cd gitsearch/ && git fetch && git stash && git checkout $CI_COMMIT_REF_NAME && git pull && ./manual_deploy.sh && exit"
when
:
manual
...
...
This diff is collapsed.
Click to expand it.
manual_deploy.sh
+
5
−
5
View file @
d176e4cd
...
...
@@ -6,7 +6,7 @@ if [[ -z "${CI_COMMIT_REF_NAME}" ]]; then
source
src/main/docker/.env
&&
echo
"CI_COMMIT_REF_NAME is not set defaulting to development"
else
export
GITBRANCH
=
"
${
CI_COMMIT_REF_NAME
,,
}
"
# Decide the path based on the value of GITBRANCH
if
[[
"
$GITBRANCH
"
==
"master"
]]
;
then
# Set the path specific for master branch
...
...
@@ -18,9 +18,9 @@ else
# Handle other branches or provide a default
echo
"Using default or other branch settings"
fi
echo
"Deploying via pipeline"
docker login
-u
gitlab-ci-token
-p
$CI_BUILD_TOKEN
sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform/gitsearch/
$GITBRANCH
docker login
-u
gitlab-ci-token
-p
$CI_BUILD_TOKEN
sharing-codeability.uibk.ac.at:5051/
development/
sharing/codeability-sharing-platform/gitsearch/
$GITBRANCH
fi
...
...
@@ -34,8 +34,8 @@ else
git fetch
&&
git stash
&&
git checkout
$CHECKOUT
&&
git pull
fi
export
COMMIT_ID
=
"
$(
git rev-parse HEAD
)
"
export
MAVEN_USER_HOME
=
`
pwd
`
/.maven
&&
./mvnw package
-DskipTests
-Pprod
jib:build
-Djib
.to.image
=
sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform/gitsearch/
$GITBRANCH
-Djib
.to.auth.username
=
gitlab-ci-token
-Djib
.to.auth.password
=
$CI_BUILD_TOKEN
-Dmaven
.repo.local
=
$MAVEN_USER_HOME
export
MAVEN_USER_HOME
=
`
pwd
`
/.maven
&&
./mvnw package
-DskipTests
-Pprod
jib:build
-Djib
.to.image
=
sharing-codeability.uibk.ac.at:5051/
development/
sharing/codeability-sharing-platform/gitsearch/
$GITBRANCH
-Djib
.to.auth.username
=
gitlab-ci-token
-Djib
.to.auth.password
=
$CI_BUILD_TOKEN
-Dmaven
.repo.local
=
$MAVEN_USER_HOME
cd
$GITSEARCH_PATH
/src/main/docker/
docker pull sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform/gitsearch/
$GITBRANCH
docker pull sharing-codeability.uibk.ac.at:5051/
development/
sharing/codeability-sharing-platform/gitsearch/
$GITBRANCH
docker-compose
-f
gitsearch.yml up
-d
--build
--force-recreate
gitsearch-app
This diff is collapsed.
Click to expand it.
Preview
0%
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