Skip to content
Snippets Groups Projects
Commit cd349cac authored by Guilherme Becker Agge's avatar Guilherme Becker Agge
Browse files

SCRUM#463: Add more testing stages on CI

parent 70029fe7
Branches
No related tags found
2 merge requests!38Develop to master,!32SCRUM#463: Add more testing stages on CI
Pipeline #
#!/bin/bash #!/bin/bash
# shellcheck disable=SC2029
# This script uploads an includes a .deb package in our debian repository. # This script uploads an includes a .deb package in our debian repository.
# The distribution is chosen based on the gitlab-ci stage we are on. # The distribution is chosen based on the gitlab-ci stage we are on.
apt-get update && apt-get install -y dput ssh apt-get update && apt-get install -y dput ssh
eval $(ssh-agent -s) eval "$(ssh-agent -s)"
ssh-add <(echo "$PRIV_KEY") ssh-add <(echo "$PRIV_KEY")
echo "Deploy job name: $CI_JOB_NAME" echo "Deploy job name: $CI_JOB_NAME"
...@@ -15,16 +16,16 @@ if [ "$CI_JOB_NAME" = "deploy_for_unstable" ]; then ...@@ -15,16 +16,16 @@ if [ "$CI_JOB_NAME" = "deploy_for_unstable" ]; then
elif [ "$CI_JOB_NAME" = "deploy_for_testing" ]; then elif [ "$CI_JOB_NAME" = "deploy_for_testing" ]; then
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 testing unstable $PACKAGE $VERSION" 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" ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa repository@repo.c3sl.ufpr.br "$REPREPRO_CMD"
elif [ "$CI_JOB_NAME" = "deploy_for_stable" ]; then elif [ "$CI_JOB_NAME" = "deploy_for_stable" ]; then
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 stable testing $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 -i ~/.ssh/id_rsa repository@repo.c3sl.ufpr.br "$REPREPRO_CMD"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment