7 Commits

Author SHA1 Message Date
OP (oppenheimer) a7044f7561 Merge pull request #44 from drone-plugins/CI-15946
Create pipeline drone-gitea-release-harness
2025-05-09 21:30:14 +05:30
Archit Mallik ca3c0a6314 Create inputset event-Tag 2025-03-18 15:47:50 +05:30
Archit Mallik a0f555112f Create inputset event-Push 2025-03-18 15:46:14 +05:30
Archit Mallik bbcd1f18ce Create inputset event-PR 2025-03-18 15:45:32 +05:30
Archit Mallik fee91d3014 Create pipeline drone-gitea-release-harness 2025-03-18 15:43:39 +05:30
TP Honey c7539c8910 Merge pull request #39 from tphoney/use_correct_arm_runner
(fix) use correct arm runner
2023-09-15 15:03:07 +01:00
dependabot-ci 420e9f7f28 (fix) use correct arm runner 2023-09-15 14:48:58 +01:00
6 changed files with 437 additions and 12 deletions
+11 -11
View File
@@ -9,7 +9,7 @@ pool:
steps:
- name: lint
image: golang:1.19
image: golang:1.20
pull: always
commands:
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
@@ -19,7 +19,7 @@ steps:
- name: gopath
path: "/go"
- name: test
image: golang:1.19
image: golang:1.20
commands:
- go test -cover ./...
volumes:
@@ -46,7 +46,7 @@ pool:
steps:
- name: environment
image: golang:1.19
image: golang:1.20
pull: always
environment:
CGO_ENABLED: "0"
@@ -54,7 +54,7 @@ steps:
- go version
- go env
- name: build
image: golang:1.19
image: golang:1.20
environment:
CGO_ENABLED: "0"
commands:
@@ -80,7 +80,7 @@ trigger:
---
kind: pipeline
type: docker
type: vm
name: linux-arm64
platform:
os: linux
@@ -90,7 +90,7 @@ pool:
steps:
- name: environment
image: golang:1.19
image: golang:1.20
pull: always
environment:
CGO_ENABLED: "0"
@@ -98,7 +98,7 @@ steps:
- go version
- go env
- name: build
image: golang:1.19
image: golang:1.20
environment:
CGO_ENABLED: "0"
commands:
@@ -134,7 +134,7 @@ pool:
steps:
- name: environment
image: golang:1.19
image: golang:1.20
pull: always
environment:
CGO_ENABLED: "0"
@@ -142,7 +142,7 @@ steps:
- go version
- go env
- name: build
image: golang:1.19
image: golang:1.20
environment:
CGO_ENABLED: "0"
commands:
@@ -184,7 +184,7 @@ pool:
steps:
- name: environment
image: golang:1.19
image: golang:1.20
pull: always
environment:
CGO_ENABLED: "0"
@@ -192,7 +192,7 @@ steps:
- go version
- go env
- name: build
image: golang:1.19
image: golang:1.20
environment:
CGO_ENABLED: "0"
commands:
+14
View File
@@ -0,0 +1,14 @@
inputSet:
name: event-PR
identifier: eventPR
orgIdentifier: default
projectIdentifier: Drone_Plugins
pipeline:
identifier: dronegiteareleaseharness
properties:
ci:
codebase:
build:
type: PR
spec:
number: <+trigger.prNumber>
+14
View File
@@ -0,0 +1,14 @@
inputSet:
name: event-Push
identifier: eventPush
orgIdentifier: default
projectIdentifier: Drone_Plugins
pipeline:
identifier: dronegiteareleaseharness
properties:
ci:
codebase:
build:
type: branch
spec:
branch: <+trigger.branch>
+14
View File
@@ -0,0 +1,14 @@
inputSet:
name: event-Tag
identifier: eventTag
orgIdentifier: default
projectIdentifier: Drone_Plugins
pipeline:
identifier: dronegiteareleaseharness
properties:
ci:
codebase:
build:
type: tag
spec:
tag: <+trigger.tag>
+383
View File
@@ -0,0 +1,383 @@
pipeline:
name: drone-gitea-release-harness
identifier: dronegiteareleaseharness
projectIdentifier: Drone_Plugins
orgIdentifier: default
tags: {}
properties:
ci:
codebase:
connectorRef: GitHub_Drone_Plugins_Org
repoName: drone-gitea-release
build: <+input>
sparseCheckout: []
stages:
- stage:
name: Testing Stage
identifier: Testing_Stage
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.20
shell: Sh
command: |-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint version
golangci-lint run
- step:
type: Run
name: Test
identifier: Run_1
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: golang:1.20
shell: Sh
command: go test -cover ./...
description: ""
- parallel:
- stage:
name: linux-amd64
identifier: linuxamd64
type: CI
spec:
cloneCodebase: true
caching:
enabled: false
paths: []
platform:
os: Linux
arch: Amd64
runtime:
type: Cloud
spec: {}
execution:
steps:
- step:
name: Build binaries
identifier: Build_binaries
type: Run
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: golang:1.20
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 -a -tags netgo -o release/linux/amd64/drone-gitea-release .
when:
stageStatus: Success
- 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/gitea-release
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
identifier: BuildAndPushDockerRegistry
spec:
connectorRef: Plugins_Docker_Hub_Connector
repo: plugins/gitea-release
tags:
- linux-amd64
caching: false
dockerfile: docker/Dockerfile.linux.amd64
when:
stageStatus: Success
condition: |
<+codebase.build.type> == "branch"
description: ""
- stage:
name: linux-arm64
identifier: linuxarm64
type: CI
spec:
cloneCodebase: true
caching:
enabled: false
paths: []
platform:
os: Linux
arch: Arm64
runtime:
type: Cloud
spec: {}
execution:
steps:
- step:
name: Build binaries
identifier: Build_binaries
type: Run
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: golang:1.20
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 -a -tags netgo -o release/linux/arm64/drone-gitea-release .
when:
stageStatus: Success
- 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/gitea-release
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
identifier: BuildAndPushDockerRegistry
spec:
connectorRef: Plugins_Docker_Hub_Connector
repo: plugins/gitea-release
tags:
- linux-arm64
caching: false
dockerfile: docker/Dockerfile.linux.arm64
when:
stageStatus: Success
condition: |
<+codebase.build.type> == "branch"
description: ""
- stage:
name: windows-1809-amd64
identifier: windows1809amd64
type: CI
spec:
cloneCodebase: true
caching:
enabled: false
paths: []
execution:
steps:
- step:
name: Build binaries
identifier: Build_binaries
type: Run
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: golang:1.20
shell: Sh
command: |-
# force go modules
export GOPATH=""
# disable cgo
export CGO_ENABLED=0
set -e
set -x
# Windows
GOOS=windows
go build -v -a -tags netgo -o release/windows/amd64/drone-gitea-release.exe .
when:
stageStatus: Success
- 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/gitea-release
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: BuildAndPushDockerRegistry
identifier: BuildAndPushDockerRegistry
spec:
connectorRef: Plugins_Docker_Hub_Connector
repo: plugins/gitea-release
tags:
- windows-1809-amd64
caching: false
dockerfile: docker/Dockerfile.windows.1809
when:
stageStatus: Success
condition: |
<+codebase.build.type> == "branch"
infrastructure:
type: VM
spec:
type: Pool
spec:
poolName: windows-2019
os: Windows
description: ""
delegateSelectors:
- windows-vm
- stage:
name: windows-ltsc2022-amd64
identifier: windowsltsc2022amd64
type: CI
spec:
cloneCodebase: true
caching:
enabled: false
paths: []
platform:
os: Windows
arch: Amd64
runtime:
type: Cloud
spec: {}
execution:
steps:
- step:
name: Build binaries
identifier: Build_binaries
type: Run
spec:
connectorRef: Plugins_Docker_Hub_Connector
image: golang:1.20
shell: Sh
command: |-
# force go modules
export GOPATH=""
# disable cgo
export CGO_ENABLED=0
set -e
set -x
# Windows
GOOS=windows
go build -v -a -tags netgo -o release/windows/amd64/drone-gitea-release.exe .
- 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/gitea-release
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: BuildAndPushDockerRegistry
identifier: BuildAndPushDockerRegistry
spec:
connectorRef: Plugins_Docker_Hub_Connector
repo: plugins/gitea-release
tags:
- windows-ltsc2022-amd64
caching: false
dockerfile: docker/Dockerfile.windows.ltsc2022
when:
stageStatus: Success
condition: |
<+codebase.build.type> == "branch"
description: ""
- stage:
name: Manifest
identifier: Manifest
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" || <+codebase.build.type> == "branch"
description: ""
allowStageExecutions: true
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/drone-plugins/drone-gitea-release
go 1.19
go 1.20
require (
code.gitea.io/sdk/gitea v0.15.1