aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci
AgeCommit message (Collapse)AuthorFilesLines
2020-10-13scripts/ci/gitlab-pipeline-status: wait for pipeline creationCleber Rosa1-4/+13
When called in wait mode, this script will also wait for the pipeline to be get to a "running" state. Because many more status may be seen until a pipeline gets to "running", and those need to be handle too. Reference: https://docs.gitlab.com/ee/api/pipelines.html#list-project-pipelines Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-8-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: use more descriptive exceptionsCleber Rosa1-2/+10
For two very different error conditions. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-7-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: handle keyboard interruptsCleber Rosa1-2/+4
So that exits based on user requests are handled more gracefully. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-6-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: refactor parser creationCleber Rosa1-4/+7
Out of the main function. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-5-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: give early feedback on running pipelinesCleber Rosa1-1/+1
When waiting for a pipeline to run and finish, it's better to give early feedback, and then sleep and wait, than the other wait around. Specially for the first iteration, it's frustrating to see nothing while the script is sleeping. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-4-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: improve message regarding timeoutCleber Rosa1-1/+4
The script has its own timeout, which is about how long the script will wait (when called with --wait) for the pipeline to complete, and not necessarily for the pipeline to complete. Hopefully this new wording will be clearer. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-3-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-13scripts/ci/gitlab-pipeline-status: make branch name configurableCleber Rosa1-6/+6
With the utility function `get_local_staging_branch_commit()`, the name of the branch is hard coded (including in the function name). For extensibility reasons, let's make that configurable. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-2-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-07-13GitLab Gating CI: introduce pipeline-status contrib scriptCleber Rosa1-0/+157
This script is intended to be used right after a push to a branch. By default, it will look for the pipeline associated with the commit that is the HEAD of the *local* staging branch. It can be used as a one time check, or with the `--wait` option to wait until the pipeline completes. If the pipeline is successful, then a merge of the staging branch into the master branch should be the next step. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200709024657.2500558-2-crosa@redhat.com> [thuth: Added the changes suggested by Erik Skultety] Signed-off-by: Thomas Huth <thuth@redhat.com>