drone-tests #3
76
.drone.star
Normal file
76
.drone.star
Normal file
@@ -0,0 +1,76 @@
|
||||
def main(ctx):
|
||||
return [
|
||||
stepPR("amd64"),
|
||||
stepPR("arm64"),
|
||||
stepMergeMaster("amd64"),
|
||||
stepMergeMaster("arm64"),
|
||||
]
|
||||
|
||||
|
||||
def stepPR(arch):
|
||||
return {
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "docker-build-%s" % (arch),
|
||||
"platform": {
|
||||
"os": "linux",
|
||||
"arch": arch,
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"name": "build-image-%s" % (arch),
|
||||
"image": "plugins/docker",
|
||||
"settings": {
|
||||
"dockerfile": "motsognir/Dockerfile",
|
||||
"repo": "dragonchaser/motsognir",
|
||||
"dry_run": "true",
|
||||
"tag": "latest-%s" % (arch),
|
||||
"username": {
|
||||
"from_secret": "dockerhub-user"
|
||||
},
|
||||
"password": {
|
||||
"from_secret": "dockerhub-password"
|
||||
}
|
||||
}
|
||||
},
|
||||
],
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
def stepMergeMaster(arch):
|
||||
return {
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "docker-publish-%s" % (arch),
|
||||
"platform": {
|
||||
"os": "linux",
|
||||
"arch": arch,
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"name": "build-build-and-publish-image-%s" % (arch),
|
||||
"image": "plugins/docker",
|
||||
"settings": {
|
||||
"dockerfile": "motsognir/Dockerfile",
|
||||
"repo": "dragonchaser/motsognir",
|
||||
"dry_run": "true",
|
||||
"tag": "latest-%s" % (arch),
|
||||
"username": {
|
||||
"from_secret": "dockerhub-user"
|
||||
},
|
||||
"password": {
|
||||
"from_secret": "dockerhub-password"
|
||||
}
|
||||
}
|
||||
},
|
||||
],
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
],
|
||||
},
|
||||
}
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.drone.yml
|
||||
@@ -14,6 +14,6 @@ RUN rm -Rfv /etc/apt/sources.list.*
|
||||
RUN rm -Rfv /build
|
||||
RUN useradd -ms /bin/bash -d /gopher gopher
|
||||
WORKDIR /gopher
|
||||
COPY entrypoint.sh /
|
||||
COPY rsyslog.conf /etc
|
||||
COPY motsognir/entrypoint.sh /
|
||||
COPY motsognir/rsyslog.conf /etc
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
curl -L https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz | tar zxvf - -C . && mv qemu-3.0.0+resin-arm/qemu-arm-static . && pwd && ls
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
#register qemu-*-static for all supported processors except the
|
||||
# current one, but also remove all registered binfmt_misc before
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
Reference in New Issue
Block a user