Compare commits
2 Commits
55a876e535
...
76d3787be9
Author | SHA1 | Date | |
---|---|---|---|
|
76d3787be9 | ||
9362979e13 |
@ -1,6 +1,10 @@
|
|||||||
local pipeline(os, arch) = {
|
local pipeline(os, arch) = {
|
||||||
kind: "pipeline",
|
kind: "pipeline",
|
||||||
name: "build " + os + "/" + arch,
|
name: os + "/" + arch,
|
||||||
|
platform: {
|
||||||
|
"os": os,
|
||||||
|
"arch": arch,
|
||||||
|
},
|
||||||
steps: [{
|
steps: [{
|
||||||
name: "compile " + os + "/" + arch,
|
name: "compile " + os + "/" + arch,
|
||||||
image: "golang:1.15.6-alpine3.12",
|
image: "golang:1.15.6-alpine3.12",
|
||||||
@ -34,7 +38,7 @@ local pipeline(os, arch) = {
|
|||||||
username: { "from_secret": "docker_username" },
|
username: { "from_secret": "docker_username" },
|
||||||
password: { "from_secret": "docker_password" },
|
password: { "from_secret": "docker_password" },
|
||||||
auto_tag: true,
|
auto_tag: true,
|
||||||
//auto_tag_suffix: os + "-" + arch
|
auto_tag_suffix: os + "-" + arch
|
||||||
},
|
},
|
||||||
when: {
|
when: {
|
||||||
event: "tag"
|
event: "tag"
|
||||||
@ -43,10 +47,32 @@ local pipeline(os, arch) = {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
local manifest() = {
|
||||||
|
kind: "pipeline",
|
||||||
|
type: "docker",
|
||||||
|
name: "manifest",
|
||||||
|
depends_on: ["linux/arm64", "linux/amd64"],
|
||||||
|
when: {
|
||||||
|
event: "tag"
|
||||||
|
},
|
||||||
|
|
||||||
|
steps: [
|
||||||
|
{
|
||||||
|
name: "publish",
|
||||||
|
image: "plugins/manifest",
|
||||||
|
settings: {
|
||||||
|
auto_tag: true,
|
||||||
|
ignore_missing: true,
|
||||||
|
spec: "manifest.yml",
|
||||||
|
username: { "from_secret": "docker_username" },
|
||||||
|
password: { "from_secret": "docker_password" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
[
|
[
|
||||||
pipeline("linux", "amd64"),
|
pipeline("linux", "amd64"),
|
||||||
// pipeline("linux", "arm64"),
|
pipeline("linux", "arm64"),
|
||||||
// pipeline("darwin", "amd64"),
|
manifest()
|
||||||
// pipeline("darwin", "arm64"),
|
|
||||||
// pipeline("windows", "amd64"),
|
|
||||||
]
|
]
|
@ -1,4 +1,4 @@
|
|||||||
FROM alpine:3.12.3
|
FROM alpine
|
||||||
WORKDIR /opt/
|
WORKDIR /opt/
|
||||||
|
|
||||||
ADD ./release/*/*/ubnt-freifunk-map-api /opt/ubnt-freifunk-map-api
|
ADD ./release/*/*/ubnt-freifunk-map-api /opt/ubnt-freifunk-map-api
|
||||||
|
19
manifest.yml
Normal file
19
manifest.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
image: fftdf/ffmap-ubnt-api:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||||
|
{{#if build.tags}}
|
||||||
|
tags:
|
||||||
|
- "latest"
|
||||||
|
{{#each build.tags}}
|
||||||
|
- {{this}}
|
||||||
|
{{/each}}
|
||||||
|
{{/if}}
|
||||||
|
manifests:
|
||||||
|
-
|
||||||
|
image: fftdf/ffmap-ubnt-api:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
-
|
||||||
|
image: fftdf/ffmap-ubnt-api:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
||||||
|
platform:
|
||||||
|
architecture: arm64
|
||||||
|
os: linux
|
Loading…
Reference in New Issue
Block a user