summaryrefslogtreecommitdiffstats
path: root/scripts/ci/gitlab-pipeline-status
Commit message (Collapse)AuthorAgeFilesLines
* scripts/ci/gitlab-pipeline-status: give more info when pipeline not foundCleber Rosa2021-03-091-1/+3
| | | | | | | | | | This includes both input parameters (project id and commit) in the message so to make it easier to debug returned API calls. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210222193240.921250-4-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* scripts/ci/gitlab-pipeline-status: give more information on failuresCleber Rosa2021-03-091-1/+3
| | | | | | | | | | | When an HTTP GET request fails, it's useful to go beyond the "not successful" message, and show the code returned by the server. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210222193240.921250-3-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* scripts/ci/gitlab-pipeline-status: split utlity function for HTTP GETCleber Rosa2021-03-091-5/+12
| | | | | | | | | | | This simply splits out the code that does an HTTP GET so that it can be used for other API requests. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210222193240.921250-2-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* scripts/ci: clean up default args logic a littleAlex Bennée2020-11-231-11/+13
| | | | | | | | | | | | This allows us to do: ./scripts/ci/gitlab-pipeline-status -w -b HEAD -p 2961854 to check out own pipeline status of a recently pushed branch. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20201117173635.29101-2-alex.bennee@linaro.org>
* scripts/ci/gitlab-pipeline-status: wait for pipeline creationCleber Rosa2020-10-131-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>
* scripts/ci/gitlab-pipeline-status: use more descriptive exceptionsCleber Rosa2020-10-131-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>
* scripts/ci/gitlab-pipeline-status: handle keyboard interruptsCleber Rosa2020-10-131-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>
* scripts/ci/gitlab-pipeline-status: refactor parser creationCleber Rosa2020-10-131-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>
* scripts/ci/gitlab-pipeline-status: give early feedback on running pipelinesCleber Rosa2020-10-131-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>
* scripts/ci/gitlab-pipeline-status: improve message regarding timeoutCleber Rosa2020-10-131-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>
* scripts/ci/gitlab-pipeline-status: make branch name configurableCleber Rosa2020-10-131-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>
* GitLab Gating CI: introduce pipeline-status contrib scriptCleber Rosa2020-07-131-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>