Commit 0d45c539 authored by Guilherme Becker Agge's avatar Guilherme Becker Agge
Browse files

SCRUM#580: Refactor the deploy code

parent aa2c66fa
Pipeline #16513 passed with stages
in 25 minutes and 46 seconds
......@@ -5,20 +5,28 @@
apt-get update && apt-get install -y dput ssh
eval $(ssh-agent -s)
eval "$(ssh-agent -s)"
ssh-add <(echo "$PRIV_KEY")
echo "Deploy job name: $CI_JOB_NAME"
if [ ${CI_JOB_NAME} = "deploy_for_testing" ]; then
dput -u -f --config=dput.cf repo build_amd64/*.changes
dput -u -f --config=dput-i386.cf repo build_i386/*.changes
elif [ ${CI_JOB_NAME} = "deploy_for_stable" ]; then
if [ "$CI_JOB_NAME" = "deploy_for_unstable" ]; then
dput -u -f --config=dput.cf repo build/*.changes
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"
fi
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]*\.[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_TGT $REPO_SRC $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
......@@ -58,8 +58,21 @@ test_i386:
dependencies:
- build_i386
deploy_for_unstable:
stage: deploy
only:
- develop
tags:
- debian-packaging
script:
- ./.deploy.sh
dependencies:
- build_amd64
- build_i386
deploy_for_testing:
stage: deploy
when: manual
only:
- master
tags:
......
ubiquity (2.21.65.3) unstable; urgency=medium
* Refactor the CI deploy code (Closes: #580)
-- Guilherme Becker Agge <lesuporte@c3sl.ufpr.br> Fri, 06 Jul 2018 11:27:25 -0300
ubiquity (2.21.65.3) testing; urgency=medium
 
* Add heading multiseat label.
......
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