Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
From: Jacob Lifshay <programmerjake@gmail.com>
To: Libre-RISCV General Development <libre-riscv-dev@lists.libre-riscv.org>
Subject: [libre-riscv-dev] email support for gitlab-ci-archiver
Date: Mon, 13 Apr 2020 04:50:46 -0700
Message-ID: <CAC2bXD58bwoQPSjdMrBvRzrNN3cywm0j902WMwaFoup9Y-5dDg@mail.gmail.com> (raw)

I fixed the issues with ignoring new jobs.
I also added support for calling external programs/shell scripts to
build the emails and stuff, since after thinking about it a bit, we're
going to probably want to reconfigure which emails get sent to who
relatively often, so having that logic in a shell script may make it
easier to maintain.

The program to run is configured in the email.command value in the config toml:

[email]
command = ["bash", "-c", "env | sort | grep '^GITLAB_CI_ARCHIVER_' && cat"]

The build log is piped to the stdin and everything gitlab-ci-archiver
knows (except for things like access tokens which shouldn't be spread
around) is sent in a whole list of environment variables. The above
email command will print all the environment variables as well as the
build log.

The list of environment variables is constructed from the JSON that
the server returns.

Part of the list of env vars:
GITLAB_CI_ARCHIVER_JOB_ARTIFACTS_0_FILENAME=job.log
GITLAB_CI_ARCHIVER_JOB_ARTIFACTS_0_FILE_FORMAT=null
GITLAB_CI_ARCHIVER_JOB_ARTIFACTS_0_FILE_TYPE=trace
GITLAB_CI_ARCHIVER_JOB_ARTIFACTS_0_SIZE=1470134
GITLAB_CI_ARCHIVER_JOB_ARTIFACTS_EXPIRE_AT=null
GITLAB_CI_ARCHIVER_JOB_ARTIFACTS_FILE=null
GITLAB_CI_ARCHIVER_JOB_ARTIFACTS_LEN=1
GITLAB_CI_ARCHIVER_JOB_COMMIT_AUTHORED_DATE=2020-04-10T16:07:07Z
GITLAB_CI_ARCHIVER_JOB_COMMIT_AUTHOR_EMAIL=lkcl@lkcl.net
GITLAB_CI_ARCHIVER_JOB_COMMIT_AUTHOR_NAME=Luke Kenneth Casson Leighton
GITLAB_CI_ARCHIVER_JOB_COMMIT_COMMITTED_DATE=2020-04-10T16:07:07Z
GITLAB_CI_ARCHIVER_JOB_COMMIT_COMMITTER_EMAIL=lkcl@lkcl.net
GITLAB_CI_ARCHIVER_JOB_COMMIT_COMMITTER_NAME=Luke Kenneth Casson Leighton
GITLAB_CI_ARCHIVER_JOB_COMMIT_CREATED_AT=2020-04-10T16:07:07Z
GITLAB_CI_ARCHIVER_JOB_COMMIT_ID=93d7d7931939585cce484b468f516412514f2719
GITLAB_CI_ARCHIVER_JOB_COMMIT_MESSAGE=connect up ALU properly to pass
full InternalOp subset over, MUL now works

Jacob

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13 11:50 Jacob Lifshay [this message]
2020-04-13 11:53 ` Luke Kenneth Casson Leighton

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=CAC2bXD58bwoQPSjdMrBvRzrNN3cywm0j902WMwaFoup9Y-5dDg@mail.gmail.com \
    --to=programmerjake@gmail.com \
    --cc=libre-riscv-dev@lists.libre-riscv.org \
    /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

Libre RISC-V Mailing list Archives (accessible via public-inbox)

Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev

Example config snippet for mirrors


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git