Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
63
.drone.star
63
.drone.star
@@ -1,35 +1,50 @@
|
|||||||
def main(ctx):
|
def main(ctx):
|
||||||
return [
|
return [
|
||||||
stepPR("amd64"),
|
stepPR("amd64", "motsognir"),
|
||||||
stepPR("arm64"),
|
#stepPR("arm64", "motsognir"),
|
||||||
stepMergeMaster("amd64"),
|
#stepMergeMaster("amd64", "motsognir"),
|
||||||
stepMergeMaster("arm64"),
|
#stepMergeMaster("arm64", "motsognir"),
|
||||||
|
|
||||||
|
stepPR("amd64", "webtest"),
|
||||||
|
#stepPR("arm64", "webtest"),
|
||||||
|
#stepMergeMaster("amd64", "webtest"),
|
||||||
|
#stepMergeMaster("arm64", "webtest"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def stepPR(arch):
|
def stepPR(arch, path):
|
||||||
return {
|
return {
|
||||||
"kind": "pipeline",
|
"kind": "pipeline",
|
||||||
"type": "docker",
|
"type": "docker",
|
||||||
"name": "docker-build-%s" % (arch),
|
"name": "docker-build-%s-%s" % (path, arch),
|
||||||
"platform": {
|
"platform": {
|
||||||
"os": "linux",
|
"os": "linux",
|
||||||
"arch": arch,
|
"arch": arch,
|
||||||
},
|
},
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"name": "build-image-%s" % (arch),
|
"name": "build-image-%s-%s" % (path, arch),
|
||||||
"image": "plugins/docker",
|
"image": "plugins/docker",
|
||||||
"settings": {
|
"settings": {
|
||||||
"dockerfile": "motsognir/Dockerfile",
|
"dockerfile": "%s/Dockerfile" % (path),
|
||||||
"repo": "dragonchaser/motsognir",
|
"repo": "dragonchaser/%s" % (path),
|
||||||
"dry_run": "true",
|
"dry_run": "true",
|
||||||
"tag": "latest-%s" % (arch),
|
"tag": "latest-%s" % (arch),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "notify-build-%s-%s" % (path, arch),
|
||||||
|
"image": "plugins/matrix",
|
||||||
|
"settings": {
|
||||||
|
"homeserver": "matrix.datenschmutz.space",
|
||||||
|
"roomid": {
|
||||||
|
"from_secret": "matrix-room"
|
||||||
|
},
|
||||||
"username": {
|
"username": {
|
||||||
"from_secret": "dockerhub-user"
|
"from_secret": "matrix-user"
|
||||||
},
|
},
|
||||||
"password": {
|
"password": {
|
||||||
"from_secret": "dockerhub-password"
|
"from_secret": "matrix-password"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -41,22 +56,22 @@ def stepPR(arch):
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
def stepMergeMaster(arch):
|
def stepMergeMaster(arch, path):
|
||||||
return {
|
return {
|
||||||
"kind": "pipeline",
|
"kind": "pipeline",
|
||||||
"type": "docker",
|
"type": "docker",
|
||||||
"name": "docker-publish-%s" % (arch),
|
"name": "docker-publish-%s-%s" % (path, arch),
|
||||||
"platform": {
|
"platform": {
|
||||||
"os": "linux",
|
"os": "linux",
|
||||||
"arch": arch,
|
"arch": arch,
|
||||||
},
|
},
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"name": "build-build-and-publish-image-%s" % (arch),
|
"name": "build-and-publish-image-%s-%s" % (path, arch),
|
||||||
"image": "plugins/docker",
|
"image": "plugins/docker",
|
||||||
"settings": {
|
"settings": {
|
||||||
"dockerfile": "motsognir/Dockerfile",
|
"dockerfile": "%s/Dockerfile" % (path),
|
||||||
"repo": "dragonchaser/motsognir",
|
"repo": "dragonchaser/%s" % (path),
|
||||||
"dry_run": "false",
|
"dry_run": "false",
|
||||||
"tag": "latest-%s" % (arch),
|
"tag": "latest-%s" % (arch),
|
||||||
"username": {
|
"username": {
|
||||||
@@ -67,6 +82,22 @@ def stepMergeMaster(arch):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "notify-publish-%s-%s" % (path, arch),
|
||||||
|
"image": "plugins/matrix",
|
||||||
|
"settings": {
|
||||||
|
"homeserver": "matrix.datenschmutz.space",
|
||||||
|
"roomid": {
|
||||||
|
"from_secret": "matrix-room"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"from_secret": "matrix-user"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"from_secret": "matrix-password"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
],
|
],
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"ref": [
|
"ref": [
|
||||||
|
|||||||
43
.github/workflows/docker-image.yml
vendored
43
.github/workflows/docker-image.yml
vendored
@@ -1,43 +0,0 @@
|
|||||||
name: Docker Image CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
DOCKER_REGISTRY: ghcr.io
|
|
||||||
DOCKER_IMAGE: dragonchaser/motsognir
|
|
||||||
DOCKER_TARGET_PLATFORM: "linux/arm/v7,linux/arm64,linux/amd64"
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: crazy-max/ghaction-docker-buildx@v1
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
- name: Prepare
|
|
||||||
if: success()
|
|
||||||
id: prepare
|
|
||||||
run: |
|
|
||||||
echo ::set-output name=docker_platform::${DOCKER_TARGET_PLATFORM}
|
|
||||||
echo ::set-output name=docker_image::${DOCKER_REGISTRY}/${DOCKER_IMAGE}
|
|
||||||
#echo ::set-output name=version::${GITHUB_RUN_NUMBER}
|
|
||||||
echo ::set-output name=version::latest
|
|
||||||
|
|
||||||
- name: Log into registry
|
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
|
||||||
|
|
||||||
- name: Run Buildx
|
|
||||||
if: success()
|
|
||||||
run: |
|
|
||||||
cd motsognir
|
|
||||||
docker buildx build --platform ${{ steps.prepare.outputs.docker_platform }} --tag ${{ steps.prepare.outputs.docker_image }}:${{steps.prepare.outputs.version }} --file ./Dockerfile.arm32v7 --output type=image,push=true .
|
|
||||||
42
.github/workflows/ghrunner.yml
vendored
42
.github/workflows/ghrunner.yml
vendored
@@ -1,42 +0,0 @@
|
|||||||
name: Docker Image CI for GHRUNNER
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
DOCKER_REGISTRY: ghcr.io
|
|
||||||
DOCKER_IMAGE: dragonchaser/ghrunner
|
|
||||||
DOCKER_TARGET_PLATFORM: "linux/arm64,linux/amd64"
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: crazy-max/ghaction-docker-buildx@v1
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
- name: Prepare
|
|
||||||
if: success()
|
|
||||||
id: prepare
|
|
||||||
run: |
|
|
||||||
echo ::set-output name=docker_platform::${DOCKER_TARGET_PLATFORM}
|
|
||||||
echo ::set-output name=docker_image::${DOCKER_REGISTRY}/${DOCKER_IMAGE}
|
|
||||||
echo ::set-output name=version::latest
|
|
||||||
|
|
||||||
- name: Log into registry
|
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
|
||||||
|
|
||||||
- name: Run Buildx
|
|
||||||
if: success()
|
|
||||||
run: |
|
|
||||||
cd ghrunner
|
|
||||||
docker buildx build --platform ${{ steps.prepare.outputs.docker_platform }} --tag ${{ steps.prepare.outputs.docker_image }}:${{steps.prepare.outputs.version }} --file ./Dockerfile --output type=image,push=true .
|
|
||||||
@@ -3,8 +3,7 @@
|
|||||||
This repo contains Dockerfiles used for autobuilding on Dockerhub.
|
This repo contains Dockerfiles used for autobuilding on Dockerhub.
|
||||||
No guarantee for completeness or functionality.
|
No guarantee for completeness or functionality.
|
||||||
|
|
||||||
|URL|Folder|Description|x86_64|arm32v7|aarch64|
|
|URL|Folder|Description|x86_64|aarch64|
|
||||||
|:--|:-----|:----------|:----:|:-----:|:-----:|
|
|:--|:-----|:----------|:----:|:-----:|
|
||||||
|[dragonchaser/webtest](https://hub.docker.com/r/dragonchaser/webtest)|webtest|A small container running ruby WebRick and serves static content from /web|x|x||
|
|[dragonchaser/webtest](https://hub.docker.com/r/dragonchaser/webtest)|webtest|A small container running ruby WebRick and serves static content from /web|x||x|
|
||||||
|[dragonchaser/motsognir](https://hub.docker.com/r/dragonchaser/motsognir) |motsognir|A container for the motsognir gopher server|x|x||
|
|[dragonchaser/motsognir](https://hub.docker.com/r/dragonchaser/motsognir) |motsognir|A container for the motsognir gopher server|x||x|
|
||||||
|[ghcr.io/dragonchaser/ghrunner](https://github.com/dragonchaser/dockerhub-autobuild/pkgs/container/ghrunner)|ghrunner |A container for running github runners |x| |x|
|
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
FROM ubuntu:latest
|
|
||||||
COPY entrypoint.sh /
|
|
||||||
ENV TZ=Europe/Berlin
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get -y install \
|
|
||||||
curl \
|
|
||||||
libdigest-sha-perl \
|
|
||||||
tzdata \
|
|
||||||
sudo
|
|
||||||
RUN useradd -ms /bin/bash runner
|
|
||||||
RUN usermod -aG sudo runner
|
|
||||||
WORKDIR /runner
|
|
||||||
RUN chown runner:runner /runner -Rfv
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GHRUNNER
|
|
||||||
|
|
||||||
This is a small Dockerfile providing a github runner.
|
|
||||||
The images can be found `ghcr.io/dragonchaser/ghrunner:latest`.
|
|
||||||
Supported arches are:
|
|
||||||
- aarch64
|
|
||||||
- amd64
|
|
||||||
|
|
||||||
## Environment variables
|
|
||||||
```terminal
|
|
||||||
| Variable | Values | default |
|
|
||||||
|------------+----------------------------------------+----------------|
|
|
||||||
| `TOKEN` | token for runner from github | <unset> |
|
|
||||||
| `ARCH` | arm64, x64 | x64 |
|
|
||||||
| `OS` | linux,osx | linux |
|
|
||||||
| `ORG` | name of the github org | <unset> |
|
|
||||||
| `REPO` | name of the github repo | <unset> |
|
|
||||||
| `VERSION` | version of the github runner to user | 2.280.3 |
|
|
||||||
| `CHECKSUM` | checksum for the github runner version | valid checksum |
|
|
||||||
```
|
|
||||||
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
ARCH=${ARCH:-x64}
|
|
||||||
VERSION=${VERSION:-2.280.3}
|
|
||||||
CHECKSUM=${CHECKSUM:-69dc323312e3c5547ba1e1cc46c127e2ca8ee7d7037e17ee6965ef6dac3c142b}
|
|
||||||
ORG=${ORG:-dragonchaser}
|
|
||||||
REPO=${REPO:-dockerhub-autobuild}
|
|
||||||
OS=${OS:-linux}
|
|
||||||
|
|
||||||
if [ -z "${ORG}" ]; then
|
|
||||||
echo "missing ORG, bailing out!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${REPO}" ]; then
|
|
||||||
echo "missing REPO, bailing out!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${TOKEN}" ]; then
|
|
||||||
echo "missing TOKEN, bailing out!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
FILE="actions-runner-${OS}-${ARCH}-${VERSION}.tar.gz"
|
|
||||||
curl -o ${FILE} -L https://github.com/actions/runner/releases/download/v${VERSION}/${FILE}
|
|
||||||
echo "${CHECKSUM} ${FILE}" | shasum -a 256 -c
|
|
||||||
tar xzf ./${FILE}
|
|
||||||
./bin/installdependencies.sh
|
|
||||||
su runner -c "./config.sh --unattended --url https://github.com/${ORG}/${REPO} --token ${TOKEN} --name docker-runner-$(hostname) --labels=${ARCH},${OS},self-hosted"
|
|
||||||
while true; do
|
|
||||||
su runner -c "./run.sh"
|
|
||||||
done
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
FROM debian:latest
|
FROM debian:latest
|
||||||
LABEL maintainer="dragonchaser <motsognir@datenschmutz.space>"
|
LABEL maintainer="dragonchaser <autobuilds@datenschmutz.space>"
|
||||||
ENV VERSION=1.0.13
|
ENV VERSION=1.0.13
|
||||||
ENV TARBALL="motsognir-${VERSION}.tar.xz"
|
ENV TARBALL="motsognir-${VERSION}.tar.xz"
|
||||||
EXPOSE 70
|
EXPOSE 70
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
FROM debian:latest
|
FROM debian:latest
|
||||||
LABEL maintainer="dragonchaser <crichter@suse.de>"
|
LABEL maintainer="dragonchaser <autobuilds@datenschmutz.space>"
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y ruby \
|
&& apt-get install -y ruby \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& mkdir /web \
|
&& mkdir /web \
|
||||||
&& chmod 0777 /web
|
&& chmod 0777 /web
|
||||||
COPY ./entrypoint.sh /bin
|
COPY ./webtest/entrypoint.sh /bin
|
||||||
COPY ./index.html /web
|
COPY ./webtest/index.html /web
|
||||||
WORKDIR /web
|
WORKDIR /web
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
ENTRYPOINT entrypoint.sh
|
ENTRYPOINT entrypoint.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user