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' },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
local PipelineNotifications = {
|
|
|
|
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" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
depends_on: [
|
|
|
|
"deployment",
|
|
|
|
],
|
|
|
|
trigger: {
|
|
|
|
event: [ "push", "tag" ],
|
|
|
|
status: [ "success", "failure" ],
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
[
|
2019-03-14 12:38:24 +00:00
|
|
|
PipelineBuild(os='linux', arch='amd64')
|
2019-03-13 09:57:48 +00:00
|
|
|
]
|