Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create pipeline drone-git-harness #52

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .harness/eventPR.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
inputSet:
name: event-PR
identifier: eventPR
orgIdentifier: default
projectIdentifier: Drone_Plugins
pipeline:
identifier: dronegitharness
properties:
ci:
codebase:
build:
type: PR
spec:
number: <+trigger.prNumber>
14 changes: 14 additions & 0 deletions .harness/eventPush.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
inputSet:
name: event-Push
identifier: eventPush
orgIdentifier: default
projectIdentifier: Drone_Plugins
pipeline:
identifier: dronegitharness
properties:
ci:
codebase:
build:
type: branch
spec:
branch: <+trigger.branch>
14 changes: 14 additions & 0 deletions .harness/eventTag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
inputSet:
name: eventTag
identifier: eventTag
orgIdentifier: default
projectIdentifier: Drone_Plugins
pipeline:
identifier: dronegitharness
properties:
ci:
codebase:
build:
type: tag
spec:
tag: <+trigger.tag>
290 changes: 290 additions & 0 deletions .harness/harness.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,290 @@
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