Skip to content
Snippets Groups Projects
Commit e74d6a69 authored by Walter Lozano's avatar Walter Lozano Committed by Dylan Aïssi
Browse files

gitlab.sh: Use personal token to tigger pipelines


Since personal tokens are used across the script there is no much gain
in using trigger tokens. The problem with trigger tokens is that they
are per project, and when they expired or are revoked extra work is needed.

Also the current code was buggy since it does not properly handle the
creation of a new trigger token.

Signed-off-by: default avatarWalter Lozano <walter.lozano@collabora.com>
parent 75615689
No related branches found
No related tags found
1 merge request!230Improve gitlab.sh
......@@ -131,13 +131,5 @@ trigger-pipeline(){
repoid=$(get-id $pkg_path)
ref=$2
TRIGGER_TOKEN="$($get_repo_triggers $repoid)"
if [ -z "$TRIGGER_TOKEN" ]; then
echo "I don't have a trigger token"
$create_repo_trigger $repoid
TRIGGER_TOKEN=$(get-repo-triggers $repoid)
fi
request=POST api /projects/$repoid/trigger/pipeline -d ref=$ref -d token=$TRIGGER_TOKEN
request=POST api /projects/$repoid/pipeline?ref=$ref
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment