From c4d8a19b4703eb644976dfb1c6d008d1a725dfbf Mon Sep 17 00:00:00 2001 From: architmallik7 <165177188+architmallik7@users.noreply.github.com> Date: Mon, 27 Jan 2025 14:58:20 +0530 Subject: [PATCH] Reverting harness.yaml changes (#184) --- .harness/event-pr.yaml | 14 -- .harness/event-push.yaml | 14 -- .harness/event-tag.yaml | 14 -- .harness/harness.yaml | 426 --------------------------------------- 4 files changed, 468 deletions(-) delete mode 100644 .harness/event-pr.yaml delete mode 100644 .harness/event-push.yaml delete mode 100644 .harness/event-tag.yaml delete mode 100644 .harness/harness.yaml diff --git a/.harness/event-pr.yaml b/.harness/event-pr.yaml deleted file mode 100644 index 3495d40..0000000 --- a/.harness/event-pr.yaml +++ /dev/null @@ -1,14 +0,0 @@ -inputSet: - name: event-pr - identifier: eventpr - orgIdentifier: default - projectIdentifier: Drone_Plugins - pipeline: - identifier: drones3harness - properties: - ci: - codebase: - build: - type: PR - spec: - number: <+trigger.prNumber> diff --git a/.harness/event-push.yaml b/.harness/event-push.yaml deleted file mode 100644 index dfed8d1..0000000 --- a/.harness/event-push.yaml +++ /dev/null @@ -1,14 +0,0 @@ -inputSet: - name: event-push - identifier: eventpush - orgIdentifier: default - projectIdentifier: Drone_Plugins - pipeline: - identifier: drones3harness - properties: - ci: - codebase: - build: - type: branch - spec: - branch: <+trigger.branch> diff --git a/.harness/event-tag.yaml b/.harness/event-tag.yaml deleted file mode 100644 index d364ce0..0000000 --- a/.harness/event-tag.yaml +++ /dev/null @@ -1,14 +0,0 @@ -inputSet: - name: event-tag - identifier: eventtag - orgIdentifier: default - projectIdentifier: Drone_Plugins - pipeline: - identifier: drones3harness - properties: - ci: - codebase: - build: - type: tag - spec: - tag: <+trigger.tag> diff --git a/.harness/harness.yaml b/.harness/harness.yaml deleted file mode 100644 index 99e4b19..0000000 --- a/.harness/harness.yaml +++ /dev/null @@ -1,426 +0,0 @@ -pipeline: - name: drone-s3-harness - identifier: drones3harness - projectIdentifier: Drone_Plugins - orgIdentifier: default - tags: {} - properties: - ci: - codebase: - connectorRef: GitHub_Drone_Plugins_Org - repoName: drone-s3 - build: <+input> - sparseCheckout: [] - stages: - - stage: - name: Test - identifier: Test - 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: lint - identifier: lint - spec: - connectorRef: Plugins_Docker_Hub_Connector - image: golang:1.22.4 - shell: Sh - command: |- - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2 - golangci-lint version - golangci-lint run --timeout=300s - - step: - type: Run - name: test - identifier: Run_1 - spec: - connectorRef: Plugins_Docker_Hub_Connector - image: golang:1.22.4 - shell: Sh - command: go test -cover ./... - - 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: Run_1 - spec: - connectorRef: Plugins_Docker_Hub_Connector - image: golang:1.22.4 - shell: Sh - command: |- - # force go modules - export GOPATH="" - - # disable cgo - export CGO_ENABLED=0 - - set -e - set -x - - # linux - export GOOS=linux GOARCH=amd64 - - go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/amd64/drone-s3 . - envVariables: - CGO_ENABLED: "0" - - step: - type: Plugin - name: Build and Push on Tag - identifier: Plugin_1 - spec: - connectorRef: Plugins_Docker_Hub_Connector - image: plugins/docker - settings: - username: drone - password: <+secrets.getValue("Plugins_Docker_Hub_Pat")> - repo: plugins/s3 - 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: Build And Push on Branch - identifier: BuildAndPushDockerRegistry_1 - spec: - connectorRef: Plugins_Docker_Hub_Connector - repo: plugins/s3 - tags: - - linux-amd64 - caching: true - dockerfile: docker/Dockerfile.linux.amd64 - when: - stageStatus: Success - condition: | - <+codebase.build.type> == "branch" - - stage: - identifier: linarm64 - type: CI - name: linux-arm64 - description: "" - spec: - cloneCodebase: true - caching: - enabled: false - paths: [] - platform: - os: Linux - arch: Arm64 - runtime: - type: Cloud - spec: {} - execution: - steps: - - step: - identifier: buildpush - type: Run - name: Build Binary - spec: - connectorRef: account.harnessImage - image: golang:1.22.4 - shell: Sh - command: |- - # force go modules - export GOPATH="" - - # disable cgo - export CGO_ENABLED=0 - - set -e - set -x - - # linux - export GOOS=linux GOARCH=arm64 - - go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm64/drone-s3 . - - step: - type: Plugin - name: "Build and Push on Tag " - identifier: Plugin_1 - spec: - connectorRef: Plugins_Docker_Hub_Connector - image: plugins/docker - settings: - username: drone - password: <+secrets.getValue("Plugins_Docker_Hub_Pat")> - repo: plugins/s3 - 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: Build And Push On Branch - identifier: BuildAndPushDockerRegistry_1 - spec: - connectorRef: Plugins_Docker_Hub_Connector - repo: plugins/s3 - tags: - - linux-arm64 - caching: true - dockerfile: docker/Dockerfile.linux.arm64 - when: - stageStatus: Success - condition: <+codebase.build.type> == "branch" - - stage: - identifier: winamd64 - type: CI - name: windows-ltsc2022-amd64 - description: "" - spec: - cloneCodebase: true - caching: - enabled: false - paths: [] - platform: - os: Windows - arch: Amd64 - runtime: - type: Cloud - spec: {} - execution: - steps: - - step: - identifier: build_amd64ltsc2022 - type: Run - name: Build Binary - spec: - connectorRef: account.harnessImage - image: golang:1.22.4 - shell: Sh - command: |- - # force go modules - export GOPATH="" - - # disable cgo - export CGO_ENABLED=0 - - set -e - set -x - - # linux - GOOS=windows - - go build -v -ldflags "-X main.version=" -a -tags netgo -o release/windows/amd64/drone-s3.exe . - - step: - type: Plugin - name: Build and Push on Tag - identifier: Plugin_1 - spec: - connectorRef: Plugins_Docker_Hub_Connector - image: plugins/docker - settings: - username: drone - password: <+secrets.getValue("Plugins_Docker_Hub_Pat")> - repo: plugins/s3 - dockerfile: docker/Dockerfile.windows.ltsc2022 - auto_tag: "true" - auto_tag_suffix: windows-ltsc2022-amd64 - when: - stageStatus: Success - condition: <+codebase.build.type> == "tag" - - step: - type: BuildAndPushDockerRegistry - name: Build And Push on Branch - identifier: BuildAndPushDockerRegistry_1 - spec: - connectorRef: Plugins_Docker_Hub_Connector - repo: plugins/s3 - tags: - - windows-ltsc2022-amd64 - caching: true - dockerfile: docker/Dockerfile.windows.ltsc2022 - when: - stageStatus: Success - condition: <+codebase.build.type> == "branch" - - stage: - identifier: win1809amd64 - type: CI - name: windows-1809-amd64 - description: "" - spec: - cloneCodebase: true - caching: - enabled: false - paths: [] - platform: - os: Windows - arch: Amd64 - runtime: - type: Cloud - spec: {} - execution: - steps: - - step: - identifier: build_amd64ltsc2022 - type: Run - name: Build Binary - spec: - connectorRef: account.harnessImage - image: golang:1.22.4 - shell: Sh - command: |- - # force go modules - export GOPATH="" - - # disable cgo - export CGO_ENABLED=0 - - set -e - set -x - - # linux - GOOS=windows - - go build -v -ldflags "-X main.version=" -a -tags netgo -o release/windows/amd64/drone-s3.exe . - - step: - type: Plugin - name: Build and Push on Tag - identifier: Plugin_1 - spec: - connectorRef: Plugins_Docker_Hub_Connector - image: plugins/docker - settings: - username: drone - password: <+secrets.getValue("Plugins_Docker_Hub_Pat")> - repo: plugins/s3 - dockerfile: docker/Dockerfile.windows.1809 - auto_tag: "true" - auto_tag_suffix: windows-1809-amd64 - when: - stageStatus: Success - condition: <+codebase.build.type> == "tag" - - step: - type: BuildAndPushDockerRegistry - name: Build And Push on Branch - identifier: BuildAndPushDockerRegistry_1 - spec: - connectorRef: Plugins_Docker_Hub_Connector - repo: plugins/s3 - tags: - - windows-1809-amd64 - caching: true - dockerfile: docker/Dockerfile.windows.1809 - when: - stageStatus: Success - condition: <+codebase.build.type> == "branch" - - stage: - name: Manifest and Release - identifier: Manifest_and_Release - 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")> - auto_tag: "true" - ignore_missing: "true" - spec: docker/manifest.tmpl - when: - stageStatus: Success - condition: | - <+codebase.build.type> == "tag" || "branch" - - step: - type: Run - name: build binaries - identifier: Run_1 - spec: - connectorRef: Plugins_Docker_Hub_Connector - image: golang:1.22.4 - shell: Sh - command: |- - GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -a -tags netgo -o release/drone-s3-linux-amd64 - GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -a -tags netgo -o release/drone-s3-linux-arm64 - GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -a -tags netgo -o release/drone-s3-darwin-amd64 - GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w" -a -tags netgo -o release/drone-s3-darwin-arm64 - GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -a -tags netgo -o release/drone-s3-windows-amd64 - - apt-get update -y - apt-get install -y zstd - zstd release/drone-s3-linux-amd64 - zstd release/drone-s3-linux-arm64 - zstd release/drone-s3-darwin-arm64 - zstd release/drone-s3-darwin-amd64 - zstd release/drone-s3-windows-amd64 - envVariables: - CGO_ENABLED: "0" - GO111MODULE: "on" - when: - stageStatus: Success - condition: | - <+codebase.build.type> == "tag" - - step: - type: Plugin - name: Release - identifier: Release - spec: - connectorRef: Plugins_Docker_Hub_Connector - image: plugins/github-release - settings: - api_key: <+secrets.getValue("ci_job_github_pat")> - title: <+trigger.tag> - files: release/drone-s3-*.zst - when: - stageStatus: Success - condition: <+codebase.build.type> == "tag" - variables: - - name: DRONE_REPO_OWNER - type: String - description: "" - required: false - value: drone-plugins - allowStageExecutions: true