Fix duplicated step names

This commit is contained in:
Thomas Boerger
2019-01-21 01:05:01 +01:00
parent 7bea9aab6c
commit e6289388c4
3 changed files with 984 additions and 960 deletions

View File

@@ -34,16 +34,16 @@ local PipelineTesting = {
},
};
local PipelineBuild(os="linux", arch="amd64") = {
local PipelineBuild(binary="docker", os="linux", arch="amd64") = {
kind: "pipeline",
name: os + "-" + arch,
name: os + "-" + arch + "-" + binary,
platform: {
os: os,
arch: arch,
},
steps: [
{
name: "build-docker",
name: "build-push",
image: "golang:1.11",
pull: "always",
environment: {
@@ -51,14 +51,14 @@ local PipelineBuild(os="linux", arch="amd64") = {
GO111MODULE: "on",
},
commands: [
"go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/" + os + "/" + arch + "/drone-docker ./cmd/drone-docker",
"go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/" + os + "/" + arch + "/drone-" + binary + " ./cmd/drone-" + binary,
],
when: {
event: [ "push", "pull_request" ],
},
},
{
name: "build-docker",
name: "build-tag",
image: "golang:1.11",
pull: "always",
environment: {
@@ -66,21 +66,21 @@ local PipelineBuild(os="linux", arch="amd64") = {
GO111MODULE: "on",
},
commands: [
"go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/" + os + "/" + arch + "/drone-docker ./cmd/drone-docker",
"go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/" + os + "/" + arch + "/drone-" + binary + " ./cmd/drone-" + binary,
],
when: {
event: [ "tag" ],
},
},
{
name: "dryrun-docker",
name: "dryrun",
image: "plugins/docker:" + os + "-" + arch,
pull: "always",
settings: {
dry_run: true,
tags: os + "-" + arch,
dockerfile: "docker/docker/Dockerfile." + os + "." + arch,
repo: "plugins/docker",
dockerfile: "docker/" + binary + "/Dockerfile." + os + "." + arch,
repo: "plugins/" + binary,
username: { "from_secret": "docker_username" },
password: { "from_secret": "docker_password" },
},
@@ -89,14 +89,14 @@ local PipelineBuild(os="linux", arch="amd64") = {
},
},
{
name: "publish-docker",
name: "publish",
image: "plugins/docker:" + os + "-" + arch,
pull: "always",
settings: {
auto_tag: true,
auto_tag_suffix: os + "-" + arch,
dockerfile: "docker/docker/Dockerfile." + os + "." + arch,
repo: "plugins/docker",
dockerfile: "docker/" + binary + "/Dockerfile." + os + "." + arch,
repo: "plugins/" + binary,
username: { "from_secret": "docker_username" },
password: { "from_secret": "docker_password" },
},
@@ -104,192 +104,6 @@ local PipelineBuild(os="linux", arch="amd64") = {
event: [ "push", "tag" ],
},
},
{
name: "build-heroku",
image: "golang:1.11",
pull: "always",
environment: {
CGO_ENABLED: "0",
GO111MODULE: "on",
},
commands: [
"go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/" + os + "/" + arch + "/drone-heroku ./cmd/drone-heroku",
],
when: {
event: [ "push", "pull_request" ],
},
},
{
name: "build-heroku",
image: "golang:1.11",
pull: "always",
environment: {
CGO_ENABLED: "0",
GO111MODULE: "on",
},
commands: [
"go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/" + os + "/" + arch + "/drone-heroku ./cmd/drone-heroku",
],
when: {
event: [ "tag" ],
},
},
{
name: "dryrun-heroku",
image: "plugins/docker:" + os + "-" + arch,
pull: "always",
settings: {
dry_run: true,
tags: os + "-" + arch,
herokufile: "docker/heroku/Dockerfile." + os + "." + arch,
repo: "plugins/heroku",
username: { "from_secret": "heroku_username" },
password: { "from_secret": "heroku_password" },
},
when: {
event: [ "pull_request" ],
},
},
{
name: "publish-heroku",
image: "plugins/docker:" + os + "-" + arch,
pull: "always",
settings: {
auto_tag: true,
auto_tag_suffix: os + "-" + arch,
herokufile: "docker/heroku/Dockerfile." + os + "." + arch,
repo: "plugins/heroku",
username: { "from_secret": "heroku_username" },
password: { "from_secret": "heroku_password" },
},
when: {
event: [ "push", "tag" ],
},
},
{
name: "build-gcr",
image: "golang:1.11",
pull: "always",
environment: {
CGO_ENABLED: "0",
GO111MODULE: "on",
},
commands: [
"go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/" + os + "/" + arch + "/drone-gcr ./cmd/drone-gcr",
],
when: {
event: [ "push", "pull_request" ],
},
},
{
name: "build-gcr",
image: "golang:1.11",
pull: "always",
environment: {
CGO_ENABLED: "0",
GO111MODULE: "on",
},
commands: [
"go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/" + os + "/" + arch + "/drone-gcr ./cmd/drone-gcr",
],
when: {
event: [ "tag" ],
},
},
{
name: "dryrun-gcr",
image: "plugins/docker:" + os + "-" + arch,
pull: "always",
settings: {
dry_run: true,
tags: os + "-" + arch,
gcrfile: "docker/gcr/Dockerfile." + os + "." + arch,
repo: "plugins/gcr",
username: { "from_secret": "gcr_username" },
password: { "from_secret": "gcr_password" },
},
when: {
event: [ "pull_request" ],
},
},
{
name: "publish-gcr",
image: "plugins/docker:" + os + "-" + arch,
pull: "always",
settings: {
auto_tag: true,
auto_tag_suffix: os + "-" + arch,
gcrfile: "docker/gcr/Dockerfile." + os + "." + arch,
repo: "plugins/gcr",
username: { "from_secret": "gcr_username" },
password: { "from_secret": "gcr_password" },
},
when: {
event: [ "push", "tag" ],
},
},
{
name: "build-ecr",
image: "golang:1.11",
pull: "always",
environment: {
CGO_ENABLED: "0",
GO111MODULE: "on",
},
commands: [
"go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/" + os + "/" + arch + "/drone-ecr ./cmd/drone-ecr",
],
when: {
event: [ "push", "pull_request" ],
},
},
{
name: "build-ecr",
image: "golang:1.11",
pull: "always",
environment: {
CGO_ENABLED: "0",
GO111MODULE: "on",
},
commands: [
"go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/" + os + "/" + arch + "/drone-ecr ./cmd/drone-ecr",
],
when: {
event: [ "tag" ],
},
},
{
name: "dryrun-ecr",
image: "plugins/docker:" + os + "-" + arch,
pull: "always",
settings: {
dry_run: true,
tags: os + "-" + arch,
dockerfile: "docker/ecr/Dockerfile." + os + "." + arch,
repo: "plugins/ecr",
username: { "from_secret": "ecr_username" },
password: { "from_secret": "ecr_password" },
},
when: {
event: [ "pull_request" ],
},
},
{
name: "publish-ecr",
image: "plugins/docker:" + os + "-" + arch,
pull: "always",
settings: {
auto_tag: true,
auto_tag_suffix: os + "-" + arch,
dockerfile: "docker/ecr/Dockerfile." + os + "." + arch,
repo: "plugins/ecr",
username: { "from_secret": "ecr_username" },
password: { "from_secret": "ecr_password" },
},
when: {
event: [ "push", "tag" ],
},
},
],
depends_on: [
"testing",
@@ -299,95 +113,38 @@ local PipelineBuild(os="linux", arch="amd64") = {
},
};
local PipelineNotifications = {
local PipelineNotifications(binary="docker") = {
kind: "pipeline",
name: "notifications",
name: "notifications-" + binary,
platform: {
os: "linux",
arch: "amd64",
},
steps: [
{
name: "manifest-docker",
name: "manifest",
image: "plugins/manifest:1",
pull: "always",
settings: {
username: { "from_secret": "docker_username" },
password: { "from_secret": "docker_password" },
spec: "docker/docker/manifest.tmpl",
spec: "docker/" + binary + "/manifest.tmpl",
ignore_missing: true,
},
},
{
name: "microbadger-docker",
name: "microbadger",
image: "plugins/webhook:1",
pull: "always",
settings: {
url: { "from_secret": "microbadger_docker" },
},
},
{
name: "manifest-heroku",
image: "plugins/manifest:1",
pull: "always",
settings: {
username: { "from_secret": "heroku_username" },
password: { "from_secret": "heroku_password" },
spec: "docker/heroku/manifest.tmpl",
ignore_missing: true,
},
},
{
name: "microbadger-heroku",
image: "plugins/webhook:1",
pull: "always",
settings: {
url: { "from_secret": "microbadger_heroku" },
},
},
{
name: "manifest-gcr",
image: "plugins/manifest:1",
pull: "always",
settings: {
username: { "from_secret": "gcr_username" },
password: { "from_secret": "gcr_password" },
spec: "docker/gcr/manifest.tmpl",
ignore_missing: true,
},
},
{
name: "microbadger-gcr",
image: "plugins/webhook:1",
pull: "always",
settings: {
url: { "from_secret": "microbadger_gcr" },
},
},
{
name: "manifest-ecr",
image: "plugins/manifest:1",
pull: "always",
settings: {
username: { "from_secret": "ecr_username" },
password: { "from_secret": "ecr_password" },
spec: "docker/ecr/manifest.tmpl",
ignore_missing: true,
},
},
{
name: "microbadger-ecr",
image: "plugins/webhook:1",
pull: "always",
settings: {
url: { "from_secret": "microbadger_ecr" },
},
},
],
depends_on: [
"linux-amd64",
"linux-arm64",
"linux-arm",
"linux-amd64-" + binary,
"linux-arm64-" + binary,
"linux-arm-" + binary,
],
trigger: {
branch: [ "master" ],
@@ -397,8 +154,20 @@ local PipelineNotifications = {
[
PipelineTesting,
PipelineBuild("linux", "amd64"),
PipelineBuild("linux", "arm64"),
PipelineBuild("linux", "arm"),
PipelineNotifications,
PipelineBuild("docker", "linux", "amd64"),
PipelineBuild("docker", "linux", "arm64"),
PipelineBuild("docker", "linux", "arm"),
PipelineBuild("gcr", "linux", "amd64"),
PipelineBuild("gcr", "linux", "arm64"),
PipelineBuild("gcr", "linux", "arm"),
PipelineBuild("ecr", "linux", "amd64"),
PipelineBuild("ecr", "linux", "arm64"),
PipelineBuild("ecr", "linux", "arm"),
PipelineBuild("heroku", "linux", "amd64"),
PipelineBuild("heroku", "linux", "arm64"),
PipelineBuild("heroku", "linux", "arm"),
PipelineNotifications("docker"),
PipelineNotifications("gcr"),
PipelineNotifications("ecr"),
PipelineNotifications("heroku"),
]