Files

345 lines
14 KiB
YAML

pipeline:
name: drone-github-actions
identifier: dronegithubactions
projectIdentifier: Drone_Plugins
orgIdentifier: default
tags: {}
properties:
ci:
codebase:
connectorRef: GitHub_Drone_Plugins_Org
repoName: github-actions
build: <+input>
sparseCheckout: []
stages:
- parallel:
- stage:
name: Test and Publish amd64
identifier: Testing
description: ""
type: CI
spec:
cloneCodebase: true
caching:
enabled: true
paths: []
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.26.10
shell: Sh
command: |-
go test -cover ./...
GOARCH=amd64 sh scripts/build.sh
- 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/github-actions
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/github-actions
tags:
- linux-amd64
caching: false
dockerfile: docker/Dockerfile.linux.amd64
when:
stageStatus: Success
condition: <+codebase.build.type> == "branch"
buildIntelligence:
enabled: true
- stage:
name: Test and Publish arm64
identifier: Testing_arm64
description: ""
type: CI
spec:
cloneCodebase: true
caching:
enabled: true
paths: []
platform:
os: Linux
arch: Arm64
runtime:
type: Cloud
spec: {}
execution:
steps:
- step:
type: Run
name: Test
identifier: Test
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: golang:1.26.10
shell: Sh
command: |-
go test -cover ./...
GOARCH=arm64 sh scripts/build.sh
- 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/github-actions
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/github-actions
tags:
- linux-arm64
caching: false
dockerfile: docker/Dockerfile.linux.arm64
when:
stageStatus: Success
condition: <+codebase.build.type> == "branch"
buildIntelligence:
enabled: true
- stage:
name: Test and Publish RF amd64
identifier: test_publish_rf
description: ""
type: CI
spec:
cloneCodebase: true
caching:
enabled: true
paths: []
platform:
os: Linux
arch: Amd64
runtime:
type: Cloud
spec: {}
execution:
steps:
- step:
type: GitClone
name: Clone HHI Dockerfiles
identifier: Clone_RF_Dockerfiles
spec:
connectorRef: RapidFortPlugins
cloneDirectory: rf-plugins
build:
type: branch
spec:
branch: main
- step:
type: Run
name: Test
identifier: Test
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: golang:1.26.10
shell: Sh
command: |-
go test -cover ./...
GOARCH=amd64 sh scripts/build.sh
- step:
type: Plugin
name: HHI Build and Push on Tag
identifier: RF_Build_and_Push_on_Tag
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: plugins/docker
settings:
username: <+secrets.getValue("harnesssecureusername")>
password: <+secrets.getValue("dockerHarnessSecurePwd")>
repo: harnesssecure/github-actions
dockerfile: rf-plugins/github-actions/docker/Dockerfile.linux.amd64.hhi
auto_tag: "true"
auto_tag_suffix: linux-amd64
base_image_username: <+secrets.getValue("harness0HARUsername")>
base_image_password: <+secrets.getValue("harness0HARPAT")>
base_image_registry: harness0.harness.io/oci/docker_artifacts
when:
stageStatus: Success
condition: <+codebase.build.type> == "tag"
- step:
type: BuildAndPushDockerRegistry
name: HHI Build and Push on Branch
identifier: RF_Build_and_Push_on_Branch
spec:
connectorRef: harnesssecure
repo: harnesssecure/github-actions
tags:
- linux-amd64
caching: false
dockerfile: rf-plugins/github-actions/docker/Dockerfile.linux.amd64.hhi
envVariables:
PLUGIN_BASE_IMAGE_USERNAME: <+secrets.getValue("harness0HARUsername")>
PLUGIN_BASE_IMAGE_PASSWORD: <+secrets.getValue("harness0HARPAT")>
PLUGIN_BASE_IMAGE_REGISTRY: harness0.harness.io/oci/docker_artifacts
when:
stageStatus: Success
condition: <+codebase.build.type> == "branch"
buildIntelligence:
enabled: true
- stage:
name: Test and Publish RF arm64
identifier: test_publish_rf_arm64
description: ""
type: CI
spec:
cloneCodebase: true
caching:
enabled: true
paths: []
platform:
os: Linux
arch: Arm64
runtime:
type: Cloud
spec: {}
execution:
steps:
- step:
type: GitClone
name: Clone HHI Dockerfiles
identifier: Clone_RF_Dockerfiles
spec:
connectorRef: RapidFortPlugins
cloneDirectory: rf-plugins
build:
type: branch
spec:
branch: main
- step:
type: Run
name: Test
identifier: Test
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: golang:1.26.10
shell: Sh
command: |-
go test -cover ./...
GOARCH=arm64 sh scripts/build.sh
- step:
type: Plugin
name: HHI Build and Push on Tag
identifier: RF_Build_and_Push_on_Tag
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: plugins/docker
settings:
username: <+secrets.getValue("harnesssecureusername")>
password: <+secrets.getValue("dockerHarnessSecurePwd")>
repo: harnesssecure/github-actions
dockerfile: rf-plugins/github-actions/docker/Dockerfile.linux.arm64.hhi
auto_tag: "true"
auto_tag_suffix: linux-arm64
base_image_username: <+secrets.getValue("harness0HARUsername")>
base_image_password: <+secrets.getValue("harness0HARPAT")>
base_image_registry: harness0.harness.io/oci/docker_artifacts
when:
stageStatus: Success
condition: <+codebase.build.type> == "tag"
- step:
type: BuildAndPushDockerRegistry
name: HHI Build and Push on Branch
identifier: RF_Build_and_Push_on_Branch
spec:
connectorRef: harnesssecure
repo: harnesssecure/github-actions
tags:
- linux-arm64
caching: false
dockerfile: rf-plugins/github-actions/docker/Dockerfile.linux.arm64.hhi
envVariables:
PLUGIN_BASE_IMAGE_USERNAME: <+secrets.getValue("harness0HARUsername")>
PLUGIN_BASE_IMAGE_PASSWORD: <+secrets.getValue("harness0HARPAT")>
PLUGIN_BASE_IMAGE_REGISTRY: harness0.harness.io/oci/docker_artifacts
when:
stageStatus: Success
condition: <+codebase.build.type> == "branch"
buildIntelligence:
enabled: true
- stage:
name: Manifest
identifier: Manifest
description: Multi-arch manifests, published for tag (release / pre-release) builds only
type: CI
spec:
cloneCodebase: true
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")>
spec: docker/manifest.tmpl
auto_tag: "true"
ignore_missing: "false"
- step:
type: Plugin
name: RF Manifest
identifier: RF_Manifest
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: plugins/manifest
settings:
username: <+secrets.getValue("harnesssecureusername")>
password: <+secrets.getValue("dockerHarnessSecurePwd")>
spec: docker/manifest.rf.tmpl
auto_tag: "true"
ignore_missing: "false"
when:
pipelineStatus: Success
condition: <+codebase.build.type> == "tag"
allowStageExecutions: true