feat: specify repo gpg when not inside repo
gboutry opened this issue · 0 comments
gboutry commented
Summary
Add the possibility to specify an external gpg key to a RHEL repo.
Motivation
To install Jenkins with its official repository, I need to import manually a key since it's not in the repo configuration
Link to RHEL documentation: https://www.jenkins.io/doc/book/installing/linux/#red-hat-centos
Alternative
I'm currently doing the following:
await @file.download
$header: "Download jenkins repo's signing key"
$unless_exists: "/tmp/jenkins.io.key"
source: "https://pkg.jenkins.io/redhat/jenkins.io.key"
target: "/tmp/jenkins.io.key"
await @execute
$header: "Install jenkins repo's signing key"
command: "rpm --import-key /tmp/jenkins.io.key"
await @tools.repo
$header: "Setup jenkins repo"
$unless_exists: "/etc/yum.repos.d/jenkins.repo"
source: "https://pkg.jenkins.io/redhat-stable/jenkins.repo"
target: "/etc/yum.repos.d/jenkins.repo"
verify: false
Draft
I would like the following API:
await @tools.repo
$header: "Setup jenkins repo"
source: "https://pkg.jenkins.io/redhat-stable/jenkins.repo"
gpg_key: "https://pkg.jenkins.io/redhat/jenkins.io.key"
target: "/etc/yum.repos.d/jenkins.repo"
verify: true