From: Cleber Rosa <crosa@redhat.com>
To: Erik Skultety <eskultet@redhat.com>
Cc: "Fam Zheng" <fam@euphon.net>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Beraldo Leal" <bleal@redhat.com>,
"Stefan Hajnoczi" <stefanha@gmail.com>,
qemu-devel@nongnu.org,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Andrea Bolognani" <abologna@redhat.com>,
"Willian Rampazzo" <wrampazz@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Eduardo Habkost" <ehabkost@redhat.com>
Subject: Re: [PATCH v4 3/4] Jobs based on custom runners: docs and gitlab-runner setup playbook
Date: Mon, 19 Oct 2020 16:54:50 -0400 [thread overview]
Message-ID: <20201019205450.GD1617151@localhost.localdomain> (raw)
In-Reply-To: <20201019102610.GB495479@nautilus>
[-- Attachment #1: Type: text/plain, Size: 2435 bytes --]
On Mon, Oct 19, 2020 at 12:26:10PM +0200, Erik Skultety wrote:
> On Sun, Oct 18, 2020 at 09:50:02PM -0400, Cleber Rosa wrote:
> > +
> > + - name: Checks the availability of official gitlab-runner builds in the archive
> > + uri:
> > + url: https://s3.amazonaws.com/gitlab-runner-downloads/v{{ gitlab_runner_version }}/binaries/gitlab-runner-linux-386
> > + method: HEAD
> > + status_code:
> > + - 200
> > + - 403
>
> Why is 403 an acceptable success status code?
>
I missed this question in my last reply, sorry.
s3 will throw a 403 if the URI doesn't exist... and we don't want to fail
the playbook because of that, given that we'll attempt the fallback
repo defined in vars.yml{,.template}.
> > + register: gitlab_runner_available_archive
> > +
> > + - name: Update base url
> > + set_fact:
> > + gitlab_runner_base_url: https://s3.amazonaws.com/gitlab-runner-downloads/v{{ gitlab_runner_version }}/binaries/gitlab-runner-
> > + when: gitlab_runner_available_archive.status == 200
> > + - debug:
> > + msg: Base gitlab-runner url is {{ gitlab_runner_base_url }}
> > +
> > + - name: Set OS name (FreeBSD)
> > + set_fact:
> > + gitlab_runner_os: freebsd
> > + when: "ansible_facts['system'] == 'FreeBSD'"
> > +
> > + - name: Create a group for the gitlab-runner service
> > + group:
> > + name: gitlab-runner
> > +
> > + - name: Create a user for the gitlab-runner service
> > + user:
> > + user: gitlab-runner
> > + group: gitlab-runner
> > + comment: GitLab Runner
> > + home: /home/gitlab-runner
> > + shell: /bin/bash
> > +
> > + - name: Remove the .bash_logout file when on Ubuntu systems
> > + file:
> > + path: /home/gitlab-runner/.bash_logout
> > + state: absent
> > + when: "ansible_facts['distribution'] == 'Ubuntu'"
> > +
> > + - name: Downloads the matching gitlab-runner
> > + get_url:
> > + dest: /usr/local/bin/gitlab-runner
> > + url: "{{ gitlab_runner_base_url }}{{ gitlab_runner_os }}-{{ gitlab_runner_arch }}"
> > + owner: gitlab-runner
> > + group: gitlab-runner
> > + mode: u=rwx,g=rwx,o=rx
> > +
Here, the actual download is performed, and no 40x is considered OK.
I hope that explains it.
Cheers,
- Cleber.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-10-19 20:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 1:49 [PATCH v4 0/4] GitLab Custom Runners and Jobs (was: QEMU Gating CI) Cleber Rosa
2020-10-19 1:50 ` [PATCH v4 1/4] Jobs based on custom runners: documentation and configuration placeholder Cleber Rosa
2020-10-21 6:45 ` Thomas Huth
2020-11-09 15:17 ` Cleber Rosa
2020-10-19 1:50 ` [PATCH v4 2/4] Jobs based on custom runners: build environment docs and playbook Cleber Rosa
2020-10-19 10:27 ` Erik Skultety
2020-10-19 20:25 ` Cleber Rosa
2020-10-20 6:18 ` Erik Skultety
2020-11-09 15:20 ` Cleber Rosa
2020-10-20 17:52 ` Andrea Bolognani
2020-11-09 16:37 ` Cleber Rosa
2020-11-10 17:27 ` Andrea Bolognani
2020-10-21 7:00 ` Thomas Huth
2020-11-09 16:39 ` Cleber Rosa
2020-10-19 1:50 ` [PATCH v4 3/4] Jobs based on custom runners: docs and gitlab-runner setup playbook Cleber Rosa
2020-10-19 10:26 ` Erik Skultety
2020-10-19 20:41 ` Cleber Rosa
2020-10-20 6:58 ` Erik Skultety
2020-10-20 8:29 ` Daniel P. Berrangé
2020-10-20 18:13 ` Andrea Bolognani
2020-10-19 20:54 ` Cleber Rosa [this message]
2020-10-20 7:00 ` Erik Skultety
2020-10-19 1:50 ` [PATCH v4 4/4] Jobs based on custom runners: add job definitions for QEMU's machines Cleber Rosa
2020-10-19 10:29 ` Daniel P. Berrangé
2020-10-19 10:42 ` Philippe Mathieu-Daudé
2020-10-19 20:17 ` Cleber Rosa
2021-01-28 11:51 ` [PATCH v4 0/4] GitLab Custom Runners and Jobs (was: QEMU Gating CI) Thomas Huth
2021-02-03 21:06 ` Cleber Rosa
2021-02-04 11:27 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201019205450.GD1617151@localhost.localdomain \
--to=crosa@redhat.com \
--cc=abologna@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=bleal@redhat.com \
--cc=ehabkost@redhat.com \
--cc=eskultet@redhat.com \
--cc=fam@euphon.net \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
--cc=wrampazz@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).