mirror of
https://github.com/drone/drone-git.git
synced 2026-06-16 14:50:26 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3363275f2a | |||
| c23e93a782 | |||
| bae18c8c71 | |||
| c41dfd51c5 | |||
| ad9d687dbe |
@@ -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>
|
||||||
@@ -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>
|
||||||
@@ -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>
|
||||||
@@ -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
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM alpine:3.20.7
|
FROM alpine:3.12
|
||||||
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl aws-cli sudo
|
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl aws-cli sudo
|
||||||
|
|
||||||
ADD posix/* /usr/local/bin/
|
ADD posix/* /usr/local/bin/
|
||||||
@@ -8,4 +8,4 @@ ADD posix/* /usr/local/bin/
|
|||||||
# USER drone:drone
|
# USER drone:drone
|
||||||
# RUN chmod -R 777 /home/drone
|
# RUN chmod -R 777 /home/drone
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/clone"]
|
ENTRYPOINT ["/usr/local/bin/clone"]
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM arm64v8/alpine:3.20.7
|
FROM arm64v8/alpine:3.12
|
||||||
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl aws-cli sudo
|
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl aws-cli sudo
|
||||||
|
|
||||||
ADD posix/* /usr/local/bin/
|
ADD posix/* /usr/local/bin/
|
||||||
|
|||||||
Reference in New Issue
Block a user