Initial CI
This commit is contained in:
commit
48ed75f37a
131
.drone.yml
Normal file
131
.drone.yml
Normal file
|
@ -0,0 +1,131 @@
|
|||
kind: pipeline
|
||||
type: docker
|
||||
name: publish-amd64
|
||||
|
||||
platform:
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: push
|
||||
image: plugins/docker:20
|
||||
settings:
|
||||
username: asonix
|
||||
password:
|
||||
from_secret: dockerhub_token
|
||||
repo: asonix/element
|
||||
dockerfile: Dockerfile
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-amd64
|
||||
build_args:
|
||||
- REPO_ARCH=amd64
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: publish-arm64v8
|
||||
|
||||
platform:
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: push
|
||||
image: plugins/docker:20
|
||||
settings:
|
||||
username: asonix
|
||||
password:
|
||||
from_secret: dockerhub_token
|
||||
repo: asonix/element
|
||||
dockerfile: Dockerfile
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm64v8
|
||||
build_args:
|
||||
- REPO_ARCH=arm64v8
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: publish-arm32v7
|
||||
|
||||
platform:
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: push
|
||||
image: plugins/docker:20
|
||||
settings:
|
||||
username: asonix
|
||||
password:
|
||||
from_secret: dockerhub_token
|
||||
repo: asonix/element
|
||||
dockerfile: Dockerfile
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm32v7
|
||||
build_args:
|
||||
- REPO_ARCH=arm32v7
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: manifest
|
||||
|
||||
platform:
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: manifest
|
||||
image: plugins/manifest:1
|
||||
settings:
|
||||
username: asonix
|
||||
password:
|
||||
from_secret: dockerhub_token
|
||||
dump: true
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
spec: manifest.tmpl
|
||||
|
||||
|
||||
depends_on:
|
||||
- publish-amd64
|
||||
- publish-arm64v8
|
||||
- publish-arm32v7
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: cron
|
||||
|
||||
steps:
|
||||
- name: tag
|
||||
image: asonix/release-checker:0.1
|
||||
pull: always
|
||||
environment:
|
||||
GITEA_TOKEN:
|
||||
from_secret: gitea_token
|
||||
commands:
|
||||
- /usr/local/bin/release-checker
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- custom
|
||||
- cron
|
||||
|
10
Check.toml
Normal file
10
Check.toml
Normal file
|
@ -0,0 +1,10 @@
|
|||
[project]
|
||||
kind = "dockerhub"
|
||||
namespace = "vectorim"
|
||||
repository = "element-web"
|
||||
regex = "v\\d\\.\\d\\.\\d"
|
||||
|
||||
[gitea]
|
||||
domain = "git.asonix.dog"
|
||||
owner = "asonix"
|
||||
repo = "docker-element"
|
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
FROM vectorim/element-web:VERSION as builder
|
||||
|
||||
ARG REPO_ARCH
|
||||
|
||||
FROM ${REPO_ARCH}/nginx:mainline-alpine
|
||||
|
||||
RUN \
|
||||
apk add tini && \
|
||||
sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types
|
||||
|
||||
COPY --from=builder /app /app
|
||||
COPY init.sh /usr/local/bin/init.sh
|
||||
|
||||
RUN \
|
||||
rm -rf /usr/share/nginx/html && \
|
||||
ln -s /app /usr/share/nginx/html && \
|
||||
mkdir /etc/riot-web
|
||||
|
||||
VOLUME /etc/riot-web
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD ["init.sh", "nginx", "-g", "daemon off;"]
|
7
init.sh
Executable file
7
init.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
set -xe
|
||||
|
||||
cp /etc/riot-web/config.json /app/config.json
|
||||
|
||||
exec "$@"
|
19
manifest.tmpl
Normal file
19
manifest.tmpl
Normal file
|
@ -0,0 +1,19 @@
|
|||
image: asonix/element:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
manifests:
|
||||
-
|
||||
image: asonix/element:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
-
|
||||
image: asonix/element:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64v8
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
||||
-
|
||||
image: asonix/element:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm32v7
|
||||
platform:
|
||||
architecture: arm
|
||||
os: linux
|
||||
variant: v7
|
Loading…
Reference in a new issue