Skip to content
Snippets Groups Projects
Commit e36bcc59 authored by Daniel Bissani Furlin's avatar Daniel Bissani Furlin
Browse files

Merge branch 'issue/580' into 'develop'

SCRUM#580: Refactor the deploy code

See merge request !35
parents 1d094053 fc1344a8
Branches
Tags
2 merge requests!38Develop to master,!35SCRUM#580: Refactor the deploy code
Pipeline #16481 failed
...@@ -13,20 +13,21 @@ echo "Deploy job name: $CI_JOB_NAME" ...@@ -13,20 +13,21 @@ echo "Deploy job name: $CI_JOB_NAME"
if [ "$CI_JOB_NAME" = "deploy_for_unstable" ]; then if [ "$CI_JOB_NAME" = "deploy_for_unstable" ]; then
dput -u -f --config=dput.cf repo build/*.changes 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" else
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa repository@repo.c3sl.ufpr.br "$REPREPRO_CMD" if [ "$CI_JOB_NAME" = "deploy_for_testing" ]; then
REPO_SRC="unstable"
REPO_TGT="testing"
elif [ "$CI_JOB_NAME" = "deploy_for_stable" ]; then elif [ "$CI_JOB_NAME" = "deploy_for_stable" ]; then
REPO_SRC="testing"
REPO_TGT="stable"
fi
CHANGELOG="package/debian/changelog" CHANGELOG="package/debian/changelog"
LINE=$(head -n 1 $CHANGELOG) LINE=$(head -n 1 $CHANGELOG)
PACKAGE=$(echo "$LINE" | cut -d' ' -f1) PACKAGE=$(echo "$LINE" | cut -d' ' -f1)
VERSION=$(echo "$LINE" | cut -d' ' -f2 | grep -o -E '[0-9]*\.[0-9]*\.[0-9]*') 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_TGT $REPO_SRC $PACKAGE $VERSION"
REPREPRO_CMD="reprepro -Vb /home/repository/www/le6 copysrc stable testing $PACKAGE $VERSION" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null repository@repo.c3sl.ufpr.br "$REPREPRO_CMD"
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa repository@repo.c3sl.ufpr.br "$REPREPRO_CMD"
fi fi
le-edubar (0.1.8) unstable; urgency=medium
* Refactor the CI deploy code (Closes: #580)
-- Guilherme Becker Agge <lesuporte@c3sl.ufpr.br> Thu, 05 Jul 2018 11:55:53 -0300
le-edubar (0.1.8) testing; urgency=medium le-edubar (0.1.8) testing; urgency=medium
* Fix query string * Fix query string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment