support arm platforms

pull/1/head
Matti R 2020-01-14 21:39:12 -05:00
parent b40ed139b5
commit 12e8026aa3
No known key found for this signature in database
GPG Key ID: 9D8A57ADAA232E95
3 changed files with 194 additions and 12 deletions

View File

@ -1,8 +1,165 @@
pipeline:
docker:
image: plugins/docker
secrets: [ docker_username, docker_password ]
repo: lucap/drone-netlify
---
kind: pipeline
name: linux-amd64
platform:
os: linux
arch: amd64
steps:
- name: dryrun
pull: always
image: plugins/docker:linux-amd64
settings:
dry_run: true
password:
from_secret: docker_password
repo: techknowlogick/drone-netlify
tags: linux-amd64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish
pull: always
image: plugins/docker:linux-amd64
settings:
auto_tag: true
when:
event: tag
auto_tag_suffix: linux-amd64
password:
from_secret: docker_password
repo: techknowlogick/drone-netlify
username:
from_secret: docker_username
when:
event:
- push
- tag
trigger:
branch:
- master
---
kind: pipeline
name: linux-arm64
platform:
os: linux
arch: arm64
steps:
- name: dryrun
pull: always
image: plugins/docker:linux-arm64
settings:
dry_run: true
password:
from_secret: docker_password
repo: techknowlogick/drone-netlify
tags: linux-arm64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish
pull: always
image: plugins/docker:linux-arm64
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
password:
from_secret: docker_password
repo: techknowlogick/drone-netlify
username:
from_secret: docker_username
when:
event:
- push
- tag
trigger:
branch:
- master
---
kind: pipeline
name: linux-arm
platform:
os: linux
arch: arm
steps:
- name: dryrun
pull: always
image: plugins/docker:linux-arm
settings:
dry_run: true
password:
from_secret: docker_password
repo: techknowlogick/drone-netlify
tags: linux-arm
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish
pull: always
image: plugins/docker:linux-arm
settings:
auto_tag: true
auto_tag_suffix: linux-arm
password:
from_secret: docker_password
repo: techknowlogick/drone-netlify
username:
from_secret: docker_username
when:
event:
- push
- tag
trigger:
branch:
- master
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
steps:
- name: manifest
pull: always
image: plugins/manifest:1
settings:
ignore_missing: true
password:
from_secret: docker_password
spec: manifest.tmpl
username:
from_secret: docker_username
trigger:
branch:
- master
event:
- push
- tag
depends_on:
- linux-amd64
- linux-arm64
- linux-arm
...

View File

@ -1,12 +1,12 @@
FROM node:alpine
FROM node:10-alpine3.11
LABEL maintainer="Luca Perret <perret.luca@gmail.com>"
LABEL maintainer="techknowlogick <techknowlogick@gitea.io>"
LABEL org.label-schema.version=latest
LABEL org.label-schema.vcs-url="https://github.com/lucaperret/drone-netlify"
LABEL org.label-schema.vcs-url="https://github.com/techknowlogick/drone-netlify"
LABEL org.label-schema.name="drone-netlify"
LABEL org.label-schema.description="Deploying to netlify with Drone CI"
LABEL org.label-schema.vendor="Luca Perret"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.vendor="techknowlogick"
LABEL org.label-schema.schema-version="2.0"
RUN npm install -g netlify-cli

25
manifest.tmpl Normal file
View File

@ -0,0 +1,25 @@
image: techknowlogick/drone-netlify:{{#if build.tag}}{{trimPrefix build.tag "v"}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
-
image: techknowlogick/drone-netlify:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
-
image: techknowlogick/drone-netlify:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm64
platform:
architecture: arm64
os: linux
variant: v8
-
image: techknowlogick/drone-netlify:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm
platform:
architecture: arm
os: linux
variant: v7