refactoring
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2019-03-18 13:46:03 +01:00
parent cd667b1b60
commit fcfa8aee3c
5 changed files with 86 additions and 13 deletions

View File

@ -16,9 +16,9 @@ local PipelineBuild(os='linux', arch='amd64') = {
dry_run: true, dry_run: true,
tags: tag, tags: tag,
dockerfile: 'docker/Dockerfile.' + file_suffix, dockerfile: 'docker/Dockerfile.' + file_suffix,
repo: ' xoxys/rpmbuild-centos7', repo: ' xoxys/rpmbuild',
username: { from_secret: 'docker_username' }, username: { from_secret: "docker_username" },
password: { from_secret: 'docker_password' }, password: { from_secret: "docker_password" },
}, },
}, },
{ {
@ -29,9 +29,12 @@ local PipelineBuild(os='linux', arch='amd64') = {
auto_tag: true, auto_tag: true,
auto_tag_suffix: tag, auto_tag_suffix: tag,
dockerfile: 'docker/Dockerfile.' + file_suffix, dockerfile: 'docker/Dockerfile.' + file_suffix,
repo: ' xoxys/rpmbuild-centos7', repo: ' xoxys/rpmbuild',
username: { from_secret: 'docker_username' }, username: { from_secret: "docker_username" },
password: { from_secret: 'docker_password' }, password: { from_secret: "docker_password" },
},
when: {
branch: [ "master" ],
}, },
}, },
], ],
@ -45,27 +48,53 @@ local PipelineNotifications(depends_on=[]) = {
arch: "amd64", arch: "amd64",
}, },
steps: [ steps: [
{
image: "plugins/manifest",
name: "manifest",
pull: "always",
settings: {
ignore_missing: true,
username: { from_secret: "docker_username" },
password: { from_secret: "docker_password" },
spec: "docker/manifest.tmpl",
},
when: {
branch: [ "master" ],
},
},
{
name: "microbadger",
image: "plugins/webhook",
pull: "always",
settings: {
urls: { from_secret: "microbadger_url" },
},
},
{ {
image: "plugins/matrix", image: "plugins/matrix",
name: "matrix", name: "matrix",
pull: 'always',
settings: { settings: {
homeserver: "https://matrix.rknet.org", homeserver: "https://matrix.rknet.org",
roomid: "MtidqQXWWAtQcByBhH: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 }}", 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" }, username: { from_secret: "matrix_username" },
password: { "from_secret": "matrix_password" }, password: { from_secret: "matrix_password" },
}, },
when: { when: {
status: [ "success", "failure" ], status: [ "success", "failure" ],
}, },
}, },
], ],
trigger: {
status: [ "success", "failure" ],
},
depends_on: depends_on, depends_on: depends_on,
}; };
[ [
PipelineBuild(os='linux', arch='amd64'), PipelineBuild(os='linux', arch='amd64'),
PipelineNotifications(depends_on=[ PipelineNotifications(depends_on=[
'linux-amd64', "linux-amd64"
]) ])
] ]

View File

@ -15,7 +15,7 @@ steps:
dry_run: true dry_run: true
password: password:
from_secret: docker_password from_secret: docker_password
repo: xoxys/rpmbuild-centos7 repo: xoxys/rpmbuild
tags: linux-amd64 tags: linux-amd64
username: username:
from_secret: docker_username from_secret: docker_username
@ -29,9 +29,12 @@ steps:
dockerfile: docker/Dockerfile.linux.amd64 dockerfile: docker/Dockerfile.linux.amd64
password: password:
from_secret: docker_password from_secret: docker_password
repo: xoxys/rpmbuild-centos7 repo: xoxys/rpmbuild
username: username:
from_secret: docker_username from_secret: docker_username
when:
branch:
- master
--- ---
kind: pipeline kind: pipeline
@ -42,7 +45,29 @@ platform:
arch: amd64 arch: amd64
steps: steps:
- name: manifest
pull: always
image: plugins/manifest
settings:
ignore_missing: true
password:
from_secret: docker_password
spec: docker/manifest.tmpl
username:
from_secret: docker_username
when:
branch:
- master
- name: microbadger
pull: always
image: plugins/webhook
settings:
urls:
from_secret: microbadger_url
- name: matrix - name: matrix
pull: always
image: plugins/matrix image: plugins/matrix
settings: settings:
homeserver: https://matrix.rknet.org homeserver: https://matrix.rknet.org
@ -57,6 +82,11 @@ steps:
- success - success
- failure - failure
trigger:
status:
- success
- failure
depends_on: depends_on:
- linux-amd64 - linux-amd64

View File

@ -1,2 +1,5 @@
# rpmbuild-centos7 # rpmbuild-centos7
[![Build Status](https://drone.rknet.org/api/badges/docker/rpmbuild/status.svg)](https://drone.rknet.org/docker/rpmbuild/)
Simple docker image based on CentOS 7 to build rpm packages.

View File

@ -1,5 +1,11 @@
FROM centos:7 FROM centos:7
LABEL maintainer="Robert Kaussow <mail@geeklabor.de>" \
org.label-schema.name="cc-arm" \
org.label-schema.vcs-url="https://gitea.rknet.org/docker/cc-arm" \
org.label-schema.vendor="Robert Kaussow" \
org.label-schema.schema-version="1.0"
RUN yum install -y gcc gcc-c++ \ RUN yum install -y gcc gcc-c++ \
libtool libtool-ltdl \ libtool libtool-ltdl \
gnutls-devel \ gnutls-devel \
@ -16,6 +22,4 @@ RUN yum install -y gcc gcc-c++ \
yum clean all yum clean all
USER root USER root
ENV FLAVOR=rpmbuild OS=centos DIST=el7
CMD /srv/pkg CMD /srv/pkg

7
docker/manifest.tmpl Normal file
View File

@ -0,0 +1,7 @@
image: xoxys/rpmbuild:latest
manifests:
-
image: xoxys/rpmbuild:linux-amd64
platform:
architecture: amd64
os: linux