From e441bfc57edcb7a9caa5c53a462facde5bdc57a7 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Mon, 16 Nov 2020 08:22:35 +0100 Subject: [PATCH] Add DroneCI --- .dockerignore | 3 ++- .drone-manifest.yml | 22 +++++++++++++++ .drone.yml | 66 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 .drone-manifest.yml create mode 100644 .drone.yml diff --git a/.dockerignore b/.dockerignore index b7258b7..8e0dd5e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ -Dockerfile +.drone.yml +.drone-manifest.yml onyx2/cache/*.cache.php onyx2/cache/signatures/*.sign onyx2/log/*.log diff --git a/.drone-manifest.yml b/.drone-manifest.yml new file mode 100644 index 0000000..c3a3700 --- /dev/null +++ b/.drone-manifest.yml @@ -0,0 +1,22 @@ +image: halobattle/game:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - image: halobattle/game:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - image: halobattle/game:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + platform: + architecture: arm64 + os: linux + variant: v8 + - image: halobattle/game:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm + platform: + architecture: arm + os: linux + variant: v7 diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..7500fbe --- /dev/null +++ b/.drone.yml @@ -0,0 +1,66 @@ +--- +kind: pipeline +type: docker +name: build-amd64 + +platform: + os: linux + arch: amd64 + +steps: +- name: publish + image: plugins/docker + settings: + repo: halobattle/game + auto_tag: true + auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + username: + from_secret: docker_username + password: + from_secret: docker_password + +--- +kind: pipeline +type: docker +name: build-arm64 + +platform: + os: linux + arch: arm64 + +steps: +- name: publish + image: plugins/docker + settings: + repo: halobattle/game + auto_tag: true + auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + username: + from_secret: docker_username + password: + from_secret: docker_password + +--- +kind: pipeline +name: docker-manifest + +steps: +- name: publish + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + spec: .drone-manifest.yml + username: + from_secret: docker_username + password: + from_secret: docker_password + +trigger: + event: + - push + - tag + +depends_on: +- build-amd64 +- build-arm64