This repository has been archived on 2023-11-07. You can view files and clone it, but cannot push or open issues or pull requests.
rpmbuild/.drone.jsonnet

71 lines
1.8 KiB
Plaintext
Raw Normal View History

2019-03-13 09:57:48 +00:00
local PipelineBuild(os='linux', arch='amd64') = {
local tag = os + '-' + arch,
local file_suffix = std.strReplace(tag, '-', '.'),
kind: "pipeline",
name: tag,
platform: {
os: os,
arch: arch,
},
steps: [
{
name: 'dryrun',
image: 'plugins/docker:' + tag,
pull: 'always',
settings: {
dry_run: true,
tags: tag,
dockerfile: 'docker/Dockerfile.' + file_suffix,
2019-03-13 10:22:07 +00:00
repo: ' xoxys/rpmbuild-centos7',
2019-03-13 09:57:48 +00:00
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
},
},
{
name: 'publish',
image: 'plugins/docker:' + tag,
pull: 'always',
settings: {
auto_tag: true,
auto_tag_suffix: tag,
dockerfile: 'docker/Dockerfile.' + file_suffix,
2019-03-13 10:22:07 +00:00
repo: ' xoxys/rpmbuild-centos7',
2019-03-13 09:57:48 +00:00
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
},
},
],
};
2019-03-14 12:54:36 +00:00
local PipelineNotifications(depends_on=[]) = {
2019-03-13 09:57:48 +00:00
kind: "pipeline",
name: "notifications",
platform: {
os: "linux",
arch: "amd64",
},
steps: [
{
image: "plugins/matrix",
settings: {
homeserver: "https://matrix.rknet.org",
roomid: "MtidqQXWWAtQcByBhH:rknet.org",
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}",
username: { "from_secret": "matrix_username" },
password: { "from_secret": "matrix_password" },
},
2019-03-14 12:54:36 +00:00
when: {
status: [ "success", "failure" ],
},
2019-03-13 09:57:48 +00:00
},
],
2019-03-14 12:54:36 +00:00
depends_on: depends_on,
2019-03-13 09:57:48 +00:00
};
[
2019-03-14 12:54:36 +00:00
PipelineBuild(os='linux', arch='amd64'),
PipelineNotifications(depends_on=[
2019-03-14 12:55:21 +00:00
'linux-amd64',
2019-03-14 12:54:36 +00:00
])
2019-03-13 09:57:48 +00:00
]