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,
tags: tag,
dockerfile: 'docker/Dockerfile.' + file_suffix,
repo: ' xoxys/rpmbuild-centos7',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
repo: ' xoxys/rpmbuild',
username: { from_secret: "docker_username" },
password: { from_secret: "docker_password" },
},
},
{
@ -29,9 +29,12 @@ local PipelineBuild(os='linux', arch='amd64') = {
auto_tag: true,
auto_tag_suffix: tag,
dockerfile: 'docker/Dockerfile.' + file_suffix,
repo: ' xoxys/rpmbuild-centos7',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
repo: ' xoxys/rpmbuild',
username: { from_secret: "docker_username" },
password: { from_secret: "docker_password" },
},
when: {
branch: [ "master" ],
},
},
],
@ -45,27 +48,53 @@ local PipelineNotifications(depends_on=[]) = {
arch: "amd64",
},
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",
name: "matrix",
pull: 'always',
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" },
username: { from_secret: "matrix_username" },
password: { from_secret: "matrix_password" },
},
when: {
status: [ "success", "failure" ],
},
},
],
trigger: {
status: [ "success", "failure" ],
},
depends_on: depends_on,
};
[
PipelineBuild(os='linux', arch='amd64'),
PipelineNotifications(depends_on=[
'linux-amd64',
"linux-amd64"
])
]

View File

@ -15,7 +15,7 @@ steps:
dry_run: true
password:
from_secret: docker_password
repo: xoxys/rpmbuild-centos7
repo: xoxys/rpmbuild
tags: linux-amd64
username:
from_secret: docker_username
@ -29,9 +29,12 @@ steps:
dockerfile: docker/Dockerfile.linux.amd64
password:
from_secret: docker_password
repo: xoxys/rpmbuild-centos7
repo: xoxys/rpmbuild
username:
from_secret: docker_username
when:
branch:
- master
---
kind: pipeline
@ -42,7 +45,29 @@ platform:
arch: amd64
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
pull: always
image: plugins/matrix
settings:
homeserver: https://matrix.rknet.org
@ -57,6 +82,11 @@ steps:
- success
- failure
trigger:
status:
- success
- failure
depends_on:
- linux-amd64

View File

@ -1,2 +1,5 @@
# 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
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++ \
libtool libtool-ltdl \
gnutls-devel \
@ -16,6 +22,4 @@ RUN yum install -y gcc gcc-c++ \
yum clean all
USER root
ENV FLAVOR=rpmbuild OS=centos DIST=el7
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