support arm platforms
parent
b40ed139b5
commit
12e8026aa3
171
.drone.yml
171
.drone.yml
|
@ -1,8 +1,165 @@
|
||||||
pipeline:
|
---
|
||||||
docker:
|
kind: pipeline
|
||||||
image: plugins/docker
|
name: linux-amd64
|
||||||
secrets: [ docker_username, docker_password ]
|
|
||||||
repo: lucap/drone-netlify
|
platform:
|
||||||
auto_tag: true
|
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:
|
when:
|
||||||
event: tag
|
event:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
- name: publish
|
||||||
|
pull: always
|
||||||
|
image: plugins/docker:linux-amd64
|
||||||
|
settings:
|
||||||
|
auto_tag: true
|
||||||
|
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
|
||||||
|
|
||||||
|
...
|
||||||
|
|
10
Dockerfile
10
Dockerfile
|
@ -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.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.name="drone-netlify"
|
||||||
LABEL org.label-schema.description="Deploying to netlify with Drone CI"
|
LABEL org.label-schema.description="Deploying to netlify with Drone CI"
|
||||||
LABEL org.label-schema.vendor="Luca Perret"
|
LABEL org.label-schema.vendor="techknowlogick"
|
||||||
LABEL org.label-schema.schema-version="1.0"
|
LABEL org.label-schema.schema-version="2.0"
|
||||||
|
|
||||||
RUN npm install -g netlify-cli
|
RUN npm install -g netlify-cli
|
||||||
|
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue