mirror of
https://github.com/drone/drone-kaniko.git
synced 2026-06-14 22:11:19 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fcc31490fe |
@@ -1,14 +0,0 @@
|
|||||||
inputSet:
|
|
||||||
name: event-PR
|
|
||||||
identifier: eventPR
|
|
||||||
orgIdentifier: default
|
|
||||||
projectIdentifier: Drone_Plugins
|
|
||||||
pipeline:
|
|
||||||
identifier: dronekanikoharness
|
|
||||||
properties:
|
|
||||||
ci:
|
|
||||||
codebase:
|
|
||||||
build:
|
|
||||||
type: PR
|
|
||||||
spec:
|
|
||||||
number: <+trigger.prNumber>
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
inputSet:
|
|
||||||
name: event-Push
|
|
||||||
identifier: eventPush
|
|
||||||
orgIdentifier: default
|
|
||||||
projectIdentifier: Drone_Plugins
|
|
||||||
pipeline:
|
|
||||||
identifier: dronekanikoharness
|
|
||||||
properties:
|
|
||||||
ci:
|
|
||||||
codebase:
|
|
||||||
build:
|
|
||||||
type: branch
|
|
||||||
spec:
|
|
||||||
branch: <+trigger.branch>
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
inputSet:
|
|
||||||
name: event-Tag
|
|
||||||
identifier: eventTag
|
|
||||||
orgIdentifier: default
|
|
||||||
projectIdentifier: Drone_Plugins
|
|
||||||
pipeline:
|
|
||||||
identifier: dronekanikoharness
|
|
||||||
properties:
|
|
||||||
ci:
|
|
||||||
codebase:
|
|
||||||
build:
|
|
||||||
type: tag
|
|
||||||
spec:
|
|
||||||
tag: <+trigger.tag>
|
|
||||||
@@ -1,681 +0,0 @@
|
|||||||
pipeline:
|
|
||||||
name: drone-kaniko-harness
|
|
||||||
identifier: dronekanikoharness
|
|
||||||
projectIdentifier: Drone_Plugins
|
|
||||||
orgIdentifier: default
|
|
||||||
tags: {}
|
|
||||||
properties:
|
|
||||||
ci:
|
|
||||||
codebase:
|
|
||||||
connectorRef: GitHub_Drone_Org
|
|
||||||
repoName: drone-kaniko
|
|
||||||
build: <+input>
|
|
||||||
sparseCheckout: []
|
|
||||||
stages:
|
|
||||||
- stage:
|
|
||||||
name: Manager Approval
|
|
||||||
identifier: Manager_Approval
|
|
||||||
description: ""
|
|
||||||
type: Approval
|
|
||||||
spec:
|
|
||||||
execution:
|
|
||||||
steps:
|
|
||||||
- step:
|
|
||||||
name: CI Manager Approval
|
|
||||||
identifier: CI_Manager_Approval
|
|
||||||
type: HarnessApproval
|
|
||||||
timeout: 1d
|
|
||||||
spec:
|
|
||||||
approvalMessage: |-
|
|
||||||
Please review the following information
|
|
||||||
and approve the pipeline progression
|
|
||||||
includePipelineExecutionHistory: true
|
|
||||||
approvers:
|
|
||||||
minimumCount: 1
|
|
||||||
disallowPipelineExecutor: false
|
|
||||||
userGroups:
|
|
||||||
- CI_Manager
|
|
||||||
isAutoRejectEnabled: false
|
|
||||||
approverInputs: []
|
|
||||||
tags: {}
|
|
||||||
- parallel:
|
|
||||||
- stage:
|
|
||||||
name: linux-amd64
|
|
||||||
identifier: linuxamd64
|
|
||||||
description: ""
|
|
||||||
type: CI
|
|
||||||
spec:
|
|
||||||
cloneCodebase: true
|
|
||||||
caching:
|
|
||||||
enabled: false
|
|
||||||
paths: []
|
|
||||||
platform:
|
|
||||||
os: Linux
|
|
||||||
arch: Amd64
|
|
||||||
runtime:
|
|
||||||
type: Cloud
|
|
||||||
spec: {}
|
|
||||||
execution:
|
|
||||||
steps:
|
|
||||||
- step:
|
|
||||||
type: Run
|
|
||||||
name: Build Binary
|
|
||||||
identifier: Build
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
image: golang:1.22.4
|
|
||||||
shell: Sh
|
|
||||||
command: |-
|
|
||||||
go test ./...
|
|
||||||
sh scripts/build.sh
|
|
||||||
- parallel:
|
|
||||||
- step:
|
|
||||||
type: Plugin
|
|
||||||
name: BuildAndPushDockerTag
|
|
||||||
identifier: BuildAndPushDockerTag
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
username: drone
|
|
||||||
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
|
|
||||||
repo: plugins/kaniko<+matrix.image>
|
|
||||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64
|
|
||||||
auto_tag: "true"
|
|
||||||
auto_tag_suffix: linux-amd64
|
|
||||||
daemon_off: "false"
|
|
||||||
when:
|
|
||||||
stageStatus: Success
|
|
||||||
condition: <+codebase.build.type> == "tag"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
image:
|
|
||||||
- ""
|
|
||||||
- "-gcr"
|
|
||||||
- "-gar"
|
|
||||||
- "-ecr"
|
|
||||||
- "-acr"
|
|
||||||
repo:
|
|
||||||
- docker
|
|
||||||
- gcr
|
|
||||||
- gar
|
|
||||||
- ecr
|
|
||||||
- acr
|
|
||||||
exclude:
|
|
||||||
- image: ""
|
|
||||||
repo: gcr
|
|
||||||
- image: ""
|
|
||||||
repo: gar
|
|
||||||
- image: ""
|
|
||||||
repo: ecr
|
|
||||||
- image: ""
|
|
||||||
repo: acr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: acr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gar"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: acr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: acr
|
|
||||||
- image: "-acr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-acr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-acr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-acr"
|
|
||||||
repo: ecr
|
|
||||||
nodeName: _<+matrix.repo>
|
|
||||||
- step:
|
|
||||||
type: Plugin
|
|
||||||
name: BuildAndPushDockerTag_Kaniko
|
|
||||||
identifier: BuildAndPushDockerTag_Kaniko
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
username: drone
|
|
||||||
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
|
|
||||||
repo: plugins/kaniko<+matrix.image>
|
|
||||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64.kaniko1.9.1
|
|
||||||
auto_tag: "true"
|
|
||||||
auto_tag_suffix: linux-amd64-kaniko1.9.1
|
|
||||||
daemon_off: "false"
|
|
||||||
when:
|
|
||||||
stageStatus: Success
|
|
||||||
condition: <+codebase.build.type> == "tag"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
image:
|
|
||||||
- ""
|
|
||||||
- "-gcr"
|
|
||||||
- "-gar"
|
|
||||||
- "-ecr"
|
|
||||||
repo:
|
|
||||||
- docker
|
|
||||||
- gcr
|
|
||||||
- gar
|
|
||||||
- ecr
|
|
||||||
exclude:
|
|
||||||
- image: ""
|
|
||||||
repo: gcr
|
|
||||||
- image: ""
|
|
||||||
repo: gar
|
|
||||||
- image: ""
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gar"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gar
|
|
||||||
nodeName: <+matrix.repo>
|
|
||||||
- parallel:
|
|
||||||
- step:
|
|
||||||
type: BuildAndPushDockerRegistry
|
|
||||||
name: BuildAndPushDockerBranch
|
|
||||||
identifier: BuildAndPushDockerBranch
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
repo: plugins/kaniko<+matrix.image>
|
|
||||||
tags:
|
|
||||||
- linux-amd64
|
|
||||||
caching: false
|
|
||||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64
|
|
||||||
when:
|
|
||||||
stageStatus: Success
|
|
||||||
condition: <+codebase.build.type> == "branch"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
image:
|
|
||||||
- ""
|
|
||||||
- "-gcr"
|
|
||||||
- "-gar"
|
|
||||||
- "-ecr"
|
|
||||||
- "-acr"
|
|
||||||
repo:
|
|
||||||
- docker
|
|
||||||
- gcr
|
|
||||||
- gar
|
|
||||||
- ecr
|
|
||||||
- acr
|
|
||||||
exclude:
|
|
||||||
- image: ""
|
|
||||||
repo: gcr
|
|
||||||
- image: ""
|
|
||||||
repo: gar
|
|
||||||
- image: ""
|
|
||||||
repo: ecr
|
|
||||||
- image: ""
|
|
||||||
repo: acr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: acr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gar"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: acr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: acr
|
|
||||||
- image: "-acr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-acr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-acr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-acr"
|
|
||||||
repo: ecr
|
|
||||||
nodeName: <+matrix.repo>
|
|
||||||
- step:
|
|
||||||
type: BuildAndPushDockerRegistry
|
|
||||||
name: BuildAndPushDockerBranch_Kaniko
|
|
||||||
identifier: BuildAndPushDockerBranch_Kaniko
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
repo: plugins/kaniko<+matrix.image>
|
|
||||||
tags:
|
|
||||||
- linux-amd64-kaniko1.9.1
|
|
||||||
caching: false
|
|
||||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64.kaniko1.9.1
|
|
||||||
when:
|
|
||||||
stageStatus: Success
|
|
||||||
condition: <+codebase.build.type> == "branch"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
image:
|
|
||||||
- ""
|
|
||||||
- "-gcr"
|
|
||||||
- "-gar"
|
|
||||||
- "-ecr"
|
|
||||||
repo:
|
|
||||||
- docker
|
|
||||||
- gcr
|
|
||||||
- gar
|
|
||||||
- ecr
|
|
||||||
exclude:
|
|
||||||
- image: ""
|
|
||||||
repo: gcr
|
|
||||||
- image: ""
|
|
||||||
repo: gar
|
|
||||||
- image: ""
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gar"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gar
|
|
||||||
nodeName: _<+matrix.repo>
|
|
||||||
when:
|
|
||||||
pipelineStatus: Success
|
|
||||||
- stage:
|
|
||||||
name: linux-arm64
|
|
||||||
identifier: linuxarm64
|
|
||||||
description: ""
|
|
||||||
type: CI
|
|
||||||
spec:
|
|
||||||
cloneCodebase: true
|
|
||||||
caching:
|
|
||||||
enabled: false
|
|
||||||
paths: []
|
|
||||||
platform:
|
|
||||||
os: Linux
|
|
||||||
arch: Arm64
|
|
||||||
runtime:
|
|
||||||
type: Cloud
|
|
||||||
spec: {}
|
|
||||||
execution:
|
|
||||||
steps:
|
|
||||||
- step:
|
|
||||||
type: Run
|
|
||||||
name: Build Binary
|
|
||||||
identifier: Build_and_Test
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
image: golang:1.22.4
|
|
||||||
shell: Sh
|
|
||||||
command: |-
|
|
||||||
go test ./...
|
|
||||||
sh scripts/build.sh
|
|
||||||
- parallel:
|
|
||||||
- step:
|
|
||||||
type: Plugin
|
|
||||||
name: BuildAndPushDockerTag
|
|
||||||
identifier: BuildAndPushDockerTag
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
username: drone
|
|
||||||
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
|
|
||||||
repo: plugins/kaniko<+matrix.image>
|
|
||||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64
|
|
||||||
auto_tag: "true"
|
|
||||||
auto_tag_suffix: linux-arm64
|
|
||||||
daemon_off: "false"
|
|
||||||
when:
|
|
||||||
stageStatus: Success
|
|
||||||
condition: <+codebase.build.type> == "tag"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
image:
|
|
||||||
- ""
|
|
||||||
- "-gcr"
|
|
||||||
- "-gar"
|
|
||||||
- "-ecr"
|
|
||||||
- "-acr"
|
|
||||||
repo:
|
|
||||||
- docker
|
|
||||||
- gcr
|
|
||||||
- gar
|
|
||||||
- ecr
|
|
||||||
- acr
|
|
||||||
exclude:
|
|
||||||
- image: ""
|
|
||||||
repo: gcr
|
|
||||||
- image: ""
|
|
||||||
repo: gar
|
|
||||||
- image: ""
|
|
||||||
repo: ecr
|
|
||||||
- image: ""
|
|
||||||
repo: acr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: acr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gar"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: acr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: acr
|
|
||||||
- image: "-acr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-acr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-acr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-acr"
|
|
||||||
repo: ecr
|
|
||||||
nodeName: _<+matrix.repo>
|
|
||||||
- step:
|
|
||||||
type: Plugin
|
|
||||||
name: BuildAndPushDockerTag_Kaniko
|
|
||||||
identifier: BuildAndPushDockerTag_Kaniko
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
username: drone
|
|
||||||
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
|
|
||||||
repo: plugins/kaniko<+matrix.image>
|
|
||||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64.kaniko1.9.1
|
|
||||||
auto_tag: "true"
|
|
||||||
auto_tag_suffix: linux-arm64-kaniko1.9.1
|
|
||||||
daemon_off: "false"
|
|
||||||
when:
|
|
||||||
stageStatus: Success
|
|
||||||
condition: <+codebase.build.type> == "tag"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
image:
|
|
||||||
- ""
|
|
||||||
- "-gcr"
|
|
||||||
- "-gar"
|
|
||||||
- "-ecr"
|
|
||||||
repo:
|
|
||||||
- docker
|
|
||||||
- gcr
|
|
||||||
- gar
|
|
||||||
- ecr
|
|
||||||
exclude:
|
|
||||||
- image: ""
|
|
||||||
repo: gcr
|
|
||||||
- image: ""
|
|
||||||
repo: gar
|
|
||||||
- image: ""
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gar"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gar
|
|
||||||
nodeName: _<+matrix.repo>
|
|
||||||
- parallel:
|
|
||||||
- step:
|
|
||||||
type: BuildAndPushDockerRegistry
|
|
||||||
name: BuildAndPushDockerBranch
|
|
||||||
identifier: BuildAndPushDockerBranch
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
repo: plugins/kaniko<+matrix.image>
|
|
||||||
tags:
|
|
||||||
- linux-arm64
|
|
||||||
caching: false
|
|
||||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64
|
|
||||||
when:
|
|
||||||
stageStatus: Success
|
|
||||||
condition: <+codebase.build.type> == "branch"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
image:
|
|
||||||
- ""
|
|
||||||
- "-gcr"
|
|
||||||
- "-gar"
|
|
||||||
- "-ecr"
|
|
||||||
- "-acr"
|
|
||||||
repo:
|
|
||||||
- docker
|
|
||||||
- gcr
|
|
||||||
- gar
|
|
||||||
- ecr
|
|
||||||
- acr
|
|
||||||
exclude:
|
|
||||||
- image: ""
|
|
||||||
repo: gcr
|
|
||||||
- image: ""
|
|
||||||
repo: gar
|
|
||||||
- image: ""
|
|
||||||
repo: ecr
|
|
||||||
- image: ""
|
|
||||||
repo: acr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: acr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gar"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: acr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: acr
|
|
||||||
- image: "-acr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-acr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-acr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-acr"
|
|
||||||
repo: ecr
|
|
||||||
nodeName: <+matrix.repo>
|
|
||||||
- step:
|
|
||||||
type: BuildAndPushDockerRegistry
|
|
||||||
name: BuildAndPushDockerBranch_Kaniko
|
|
||||||
identifier: BuildAndPushDockerBranch_Kaniko
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
repo: plugins/kaniko<+matrix.image>
|
|
||||||
tags:
|
|
||||||
- linux-arm64-kaniko1.9.1
|
|
||||||
caching: false
|
|
||||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64.kaniko1.9.1
|
|
||||||
when:
|
|
||||||
stageStatus: Success
|
|
||||||
condition: <+codebase.build.type> == "branch"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
image:
|
|
||||||
- ""
|
|
||||||
- "-gcr"
|
|
||||||
- "-gar"
|
|
||||||
- "-ecr"
|
|
||||||
repo:
|
|
||||||
- docker
|
|
||||||
- gcr
|
|
||||||
- gar
|
|
||||||
- ecr
|
|
||||||
exclude:
|
|
||||||
- image: ""
|
|
||||||
repo: gcr
|
|
||||||
- image: ""
|
|
||||||
repo: gar
|
|
||||||
- image: ""
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: gar
|
|
||||||
- image: "-gcr"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: docker
|
|
||||||
- image: "-gar"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-gar"
|
|
||||||
repo: ecr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: docker
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gcr
|
|
||||||
- image: "-ecr"
|
|
||||||
repo: gar
|
|
||||||
nodeName: _<+matrix.repo>
|
|
||||||
when:
|
|
||||||
pipelineStatus: Success
|
|
||||||
- stage:
|
|
||||||
name: Manifest
|
|
||||||
identifier: Manifest
|
|
||||||
description: ""
|
|
||||||
type: CI
|
|
||||||
spec:
|
|
||||||
cloneCodebase: true
|
|
||||||
caching:
|
|
||||||
enabled: false
|
|
||||||
paths: []
|
|
||||||
platform:
|
|
||||||
os: Linux
|
|
||||||
arch: Amd64
|
|
||||||
runtime:
|
|
||||||
type: Cloud
|
|
||||||
spec: {}
|
|
||||||
execution:
|
|
||||||
steps:
|
|
||||||
- parallel:
|
|
||||||
- step:
|
|
||||||
type: Plugin
|
|
||||||
name: Manifest
|
|
||||||
identifier: Manifest
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
image: plugins/manifest
|
|
||||||
settings:
|
|
||||||
auto_tag: "true"
|
|
||||||
spec: docker/<+matrix.repo>/manifest.tmpl
|
|
||||||
username: drone
|
|
||||||
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
|
|
||||||
ignore_missing: "true"
|
|
||||||
when:
|
|
||||||
stageStatus: Success
|
|
||||||
condition: <+codebase.build.type> == "branch" || <+codebase.build.type> == "tag"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
repo:
|
|
||||||
- docker
|
|
||||||
- gcr
|
|
||||||
- gar
|
|
||||||
- ecr
|
|
||||||
- acr
|
|
||||||
nodeName: manifest_<+matrix.repo>
|
|
||||||
- step:
|
|
||||||
type: Plugin
|
|
||||||
name: Manifest_kaniko
|
|
||||||
identifier: Manifest_kaniko
|
|
||||||
spec:
|
|
||||||
connectorRef: Plugins_Docker_Hub_Connector
|
|
||||||
image: plugins/manifest
|
|
||||||
settings:
|
|
||||||
auto_tag: "true"
|
|
||||||
spec: docker/<+matrix.repo>/manifest-kaniko1.9.1.tmpl
|
|
||||||
username: drone
|
|
||||||
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
|
|
||||||
ignore_missing: "true"
|
|
||||||
when:
|
|
||||||
stageStatus: Success
|
|
||||||
condition: <+codebase.build.type> == "branch" || <+codebase.build.type> == "tag"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
repo:
|
|
||||||
- docker
|
|
||||||
- gcr
|
|
||||||
- gar
|
|
||||||
- ecr
|
|
||||||
nodeName: manifest_<+matrix.repo>
|
|
||||||
when:
|
|
||||||
pipelineStatus: Success
|
|
||||||
+4
-11
@@ -480,32 +480,25 @@ func setupAuth(tenantId, clientId, cert,
|
|||||||
return "", fmt.Errorf("registry must be specified")
|
return "", fmt.Errorf("registry must be specified")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if noPush {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
|
|
||||||
// case of client secret or cert based auth
|
// case of client secret or cert based auth
|
||||||
if clientId != "" {
|
if clientId != "" {
|
||||||
// only setup auth when pushing or credentials are defined
|
// only setup auth when pushing or credentials are defined
|
||||||
|
|
||||||
token, publicUrl, err := getACRToken(subscriptionId, tenantId, clientId, clientSecret, cert, registry)
|
token, publicUrl, err := getACRToken(subscriptionId, tenantId, clientId, clientSecret, cert, registry)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if noPush {
|
|
||||||
logrus.Warnf("NO_PUSH mode: failed to fetch ACR Token: %v", err)
|
|
||||||
return "", nil
|
|
||||||
}
|
|
||||||
return "", errors.Wrap(err, "failed to fetch ACR Token")
|
return "", errors.Wrap(err, "failed to fetch ACR Token")
|
||||||
}
|
}
|
||||||
|
|
||||||
// setup docker config for azure registry and base image docker registry
|
// setup docker config for azure registry and base image docker registry
|
||||||
if err := setDockerAuth(username, token, registry, dockerUsername, dockerPassword, dockerRegistry); err != nil {
|
if err := setDockerAuth(username, token, registry, dockerUsername, dockerPassword, dockerRegistry); err != nil {
|
||||||
if noPush {
|
|
||||||
logrus.Warnf("NO_PUSH mode: failed to create docker config: %v", err)
|
|
||||||
return "", nil
|
|
||||||
}
|
|
||||||
return "", errors.Wrap(err, "failed to create docker config")
|
return "", errors.Wrap(err, "failed to create docker config")
|
||||||
}
|
}
|
||||||
return publicUrl, nil
|
return publicUrl, nil
|
||||||
} else {
|
} else {
|
||||||
if noPush {
|
|
||||||
return "", nil
|
|
||||||
}
|
|
||||||
return "", fmt.Errorf("managed authentication is not supported")
|
return "", fmt.Errorf("managed authentication is not supported")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -483,13 +483,14 @@ func (p Plugin) Exec() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p.Output.OutputFile = os.Getenv("DRONE_OUTPUT")
|
if p.Output.OutputFile != "" {
|
||||||
var tarPath string
|
var tarPath string
|
||||||
if p.Build.TarPath != "" {
|
if p.Build.TarPath != "" {
|
||||||
tarPath = getTarPath(p.Build.TarPath)
|
tarPath = getTarPath(p.Build.TarPath)
|
||||||
}
|
}
|
||||||
if err = output.WritePluginOutputFile(p.Output.OutputFile, getDigest(p.Build.DigestFile), tarPath); err != nil {
|
if err = output.WritePluginOutputFile(p.Output.OutputFile, getDigest(p.Build.DigestFile), tarPath); err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "failed to write plugin output file at path: %s with error: %s\n", p.Output.OutputFile, err)
|
fmt.Fprintf(os.Stderr, "failed to write plugin output file at path: %s with error: %s\n", p.Output.OutputFile, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user