This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit d176e4cd authored by Daniel Crazzolara's avatar Daniel Crazzolara
Browse files

fixed auto-deployment

parent 9a249e1a
Branches
1 merge request!222Bringing the december release into production
......@@ -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
......
......@@ -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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment