Files
plugin-drone-git/.harness/harness.yaml
T
2025-03-20 11:58:10 +05:30

291 lines
10 KiB
YAML

pipeline:
name: drone-git-harness
identifier: dronegitharness
projectIdentifier: Drone_Plugins
orgIdentifier: default
tags: {}
properties:
ci:
codebase:
connectorRef: GitHub_Drone_Org
repoName: drone-git
build: <+input>
sparseCheckout: []
stages:
- stage:
name: Testing
identifier: Testing
description: ""
type: CI
spec:
cloneCodebase: true
caching:
enabled: true
platform:
os: Linux
arch: Amd64
runtime:
type: Cloud
spec: {}
execution:
steps:
- step:
type: Run
name: Test
identifier: Test
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: golang:1.10
shell: Sh
command: |-
cd posix
tar -xf fixtures.tar -C /
go test -v
- 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: {}
buildIntelligence:
enabled: false
execution:
steps:
- step:
type: Run
name: Build Binary
identifier: Build
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: golang:1.10
shell: Sh
command: |-
cd posix
tar -xf fixtures.tar -C /
go test -v
- step:
type: Plugin
name: BuildAndPushDockerPlugin
identifier: BuildAndPushDockerPlugin
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: plugins/docker:18
settings:
username: drone
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
repo: plugins/git
dockerfile: docker/Dockerfile.linux.amd64
auto_tag: "true"
auto_tag_suffix: linux-amd64
when:
stageStatus: Success
condition: <+codebase.build.type> == "tag"
- step:
type: BuildAndPushDockerRegistry
name: BuildAndPushDockerRegistry_1
identifier: BuildAndPushDockerRegistry_1
spec:
connectorRef: Plugins_Docker_Hub_Connector
repo: plugins/git
tags:
- linux-amd64
caching: false
dockerfile: docker/Dockerfile.linux.amd64
when:
stageStatus: Success
condition: |
<+codebase.build.type> == "branch"
- 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: {}
buildIntelligence:
enabled: false
execution:
steps:
- step:
type: Run
name: Build Binary
identifier: Build
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: golang:1.10
shell: Sh
command: |-
cd posix
tar -xf fixtures.tar -C /
go test -v
- step:
type: Plugin
name: BuildAndPushDockerPlugin
identifier: BuildAndPushDockerPlugin
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: plugins/docker:18
settings:
username: drone
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
repo: plugins/git
dockerfile: docker/Dockerfile.linux.arm64
auto_tag: "true"
auto_tag_suffix: linux-arm64
when:
stageStatus: Success
condition: <+codebase.build.type> == "tag"
- step:
type: BuildAndPushDockerRegistry
name: BuildAndPushDockerRegistry_1
identifier: BuildAndPushDockerRegistry_1
spec:
connectorRef: Plugins_Docker_Hub_Connector
repo: plugins/git
tags:
- linux-arm64
caching: false
dockerfile: docker/Dockerfile.linux.arm64
when:
stageStatus: Success
condition: |
<+codebase.build.type> == "branch"
- stage:
name: windows-1809
identifier: windows1809
description: ""
type: CI
spec:
cloneCodebase: true
caching:
enabled: false
paths: []
buildIntelligence:
enabled: false
execution:
steps:
- step:
type: Plugin
name: BuildAndPushDockerPlugin
identifier: BuildAndPushDockerPlugin
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: plugins/docker
settings:
username: drone
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
repo: plugins/git
dockerfile: docker/Dockerfile.windows.1809
auto_tag: "true"
auto_tag_suffix: windows-1809-amd64
daemon_off: "true"
purge: "false"
when:
stageStatus: Success
condition: <+codebase.build.type> == "branch"
infrastructure:
type: VM
spec:
type: Pool
spec:
poolName: windows-2019
os: Windows
delegateSelectors:
- windows-vm
- stage:
name: windows-ltsc2022
identifier: windowsltsc2022
description: ""
type: CI
spec:
cloneCodebase: true
caching:
enabled: false
paths: []
platform:
os: Windows
arch: Amd64
runtime:
type: Cloud
spec: {}
buildIntelligence:
enabled: false
execution:
steps:
- step:
type: Plugin
name: BuildAndPushDockerPlugin
identifier: BuildAndPushDockerPlugin
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: plugins/docker
settings:
username: drone
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
repo: plugins/git
dockerfile: docker/Dockerfile.windows.ltsc2022
auto_tag: "true"
auto_tag_suffix: windows-ltsc2022-amd64
daemon_off: "true"
purge: "false"
when:
stageStatus: Success
condition: <+codebase.build.type> == "branch"
- 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:
- step:
type: Plugin
name: Manifest
identifier: Manifest
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: plugins/manifest
settings:
username: drone
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
ignore_missing: "true"
spec: docker/manifest.tmpl
auto_tag: "true"
when:
stageStatus: Success
condition: <+codebase.build.type> == "branch" || <+codebase.build.type> == "tag"
buildIntelligence:
enabled: false
allowStageExecutions: true