Commit 7bb27666 authored by Guilherme Becker Agge's avatar Guilherme Becker Agge
Browse files

SCRUM#580: Refactor the deploy code

parent 83180056
Pipeline #16456 passed with stages
in 8 minutes and 18 seconds
......@@ -12,20 +12,21 @@ echo "Deploy job name: $CI_JOB_NAME"
if [ "$CI_JOB_NAME" = "deploy_for_unstable" ]; then
dput -u -f --config=dput.cf repo build/*.changes
elif [ "$CI_JOB_NAME" = "deploy_for_testing" ]; then
CHANGELOG="package/debian/changelog"
LINE=$(head -n 1 $CHANGELOG)
PACKAGE=$(echo $LINE | cut -d' ' -f1)
VERSION=$(echo $LINE | cut -d' ' -f2 | grep -o -E '[0-9]*\.[0-9]*\.[0-9]*')
REPREPRO_CMD="reprepro -Vb /home/repository/www/le6 copysrc testing unstable $PACKAGE $VERSION"
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa repository@repo.c3sl.ufpr.br "$REPREPRO_CMD"
elif [ "$CI_JOB_NAME" = "deploy_for_stable" ]; then
else
if [ "$CI_JOB_NAME" = "deploy_for_testing" ]; then
REPO_SRC="unstable"
REPO_TGT="testing"
elif [ "$CI_JOB_NAME" = "deploy_for_stable" ]; then
REPO_SRC="testing"
REPO_TGT="stable"
if
CHANGELOG="package/debian/changelog"
LINE=$(head -n 1 $CHANGELOG)
PACKAGE=$(echo $LINE | cut -d' ' -f1)
VERSION=$(echo $LINE | cut -d' ' -f2 | grep -o -E '[0-9]*\.[0-9]*\.[0-9]*')
PACKAGE=$(echo "$LINE" | cut -d' ' -f1)
VERSION=$(echo "$LINE" | cut -d' ' -f2 | grep -o -E '[0-9]*\.[0-9]*\.[0-9]*')
REPREPRO_CMD="reprepro -Vb /home/repository/www/le6 copysrc $REPO_SRC $REPO_TGT $PACKAGE $VERSION"
REPREPRO_CMD="reprepro -Vb /home/repository/www/le6 copysrc stable testing $PACKAGE $VERSION"
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa repository@repo.c3sl.ufpr.br "$REPREPRO_CMD"
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null repository@repo.c3sl.ufpr.br "$REPREPRO_CMD"
fi
......@@ -77,4 +77,3 @@ deploy_for_stable:
- ./.deploy.sh
dependencies:
- build
le-epoptes (1.0.0) unstable; urgency=medium
* Refactor the CI deploy code (Closes: #580)
-- Guilherme Becker Agge <lesuporte@c3sl.ufpr.br> Thu, 05 Jul 2018 11:49:57 -0300
le-epoptes (1.0.0) unstable; urgency=medium
* Update lelab's methods calls to the new syntax (Closes: #556)
......
Markdown is supported
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