attempt 2

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2022-05-10 22:24:44 +02:00
parent 0e55852f7e
commit 518cd8ed16
3 changed files with 49 additions and 25 deletions

View File

@@ -1,36 +1,59 @@
def main(ctx): def main(ctx):
return [ return [
cancelPreviousBuilds(),
step("amd64"), step("amd64"),
step("arm64"), step("arm64"),
] ]
def cancelPreviousBuilds():
return [{
"kind": "pipeline",
"type": "docker",
"name": "cancel-previous-builds",
"clone": {
"disable": True,
},
"steps": [{
"name": "cancel-previous-builds",
"image": "owncloudci/drone-cancel-previous-builds",
"settings": {
"DRONE_TOKEN": {
"from_secret": "drone_token",
},
},
}],
"trigger": {
"ref": [
"refs/pull/**",
],
},
}]
def step(arch): def step(arch):
return { return {
"kind": "pipeline", "kind": "pipeline",
"name": "build-%s" % arch, "type": "docker",
"name": "docker-%s" % (arch),
"platform": {
"os": "linux",
"arch": arch,
},
"steps": [ "steps": [
{ {
"name": "build", "name": "dryrun",
"image": "plugins/docker", "image": "plugins/docker",
"repo": "dragonchaser/motsognir", "settings": {
"volumes": [ "dockerfile": "motsognir/Dockerfile",
{ "dry_run": "true",
"name":"docker_sock", "purge":"true",
"path":"/var/run/docker.sock" "repo": "dragonchaser/dockerhub-autobuild",
"tag": "latest"
} }
},
], ],
"commands": [ "trigger": {
"cd motsognir", "ref": [
"docker build -t dragonchaser/motsognir:latest ." "refs/pull/**",
]
}
], ],
"volumes": [ },
{
"name":"docker_sock",
"host": {
"path": "/var/run/docker.sock"
}
}
]
} }

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.drone.yml

View File

@@ -14,6 +14,6 @@ RUN rm -Rfv /etc/apt/sources.list.*
RUN rm -Rfv /build RUN rm -Rfv /build
RUN useradd -ms /bin/bash -d /gopher gopher RUN useradd -ms /bin/bash -d /gopher gopher
WORKDIR /gopher WORKDIR /gopher
COPY entrypoint.sh / COPY motsognir/entrypoint.sh /
COPY rsyslog.conf /etc COPY motsognir/rsyslog.conf /etc
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]