Switch default git plugin (#449)

* update pipeline samples

* update docs

* use woodpeckerci/plugin-git:latest as default

* code format nit
This commit is contained in:
6543 2021-10-16 02:54:28 +02:00 committed by GitHub
parent 4cc8594b63
commit 6828057f66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 23 additions and 22 deletions

View file

@ -505,7 +505,7 @@ Woodpecker automatically configures a default clone step if not explicitly defin
```diff
+clone:
+ git:
+ image: plugins/git
+ image: woodpeckerci/plugin-git
pipeline:
build:
@ -520,7 +520,7 @@ Example configuration to override depth:
```diff
clone:
git:
image: plugins/git
image: woodpeckerci/plugin-git
+ depth: 50
```
@ -557,7 +557,7 @@ To use the ssh git url in `.gitmodules` for users cloning with ssh, and also use
```diff
clone:
git:
image: plugins/git
image: woodpeckerci/plugin-git
recursive: true
+ submodule_override:
+ my-module: https://github.com/octocat/my-module.git

View file

@ -106,12 +106,13 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config {
}
// add default clone step
if c.local == false && len(conf.Clone.Containers) == 0 && !conf.SkipClone {
if !c.local && len(conf.Clone.Containers) == 0 && !conf.SkipClone {
container := &yaml.Container{
Name: "clone",
Image: "plugins/git:latest",
Image: "woodpeckerci/plugin-git:latest",
Vargs: map[string]interface{}{"depth": "0"},
}
// TODO: migrate to woodpeckerci/plugin-git:latest (multi arch)
switch c.metadata.Sys.Arch {
case "linux/arm":
container.Image = "plugins/git:linux-arm"
@ -127,7 +128,7 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config {
stage.Steps = append(stage.Steps, step)
config.Stages = append(config.Stages, stage)
} else if c.local == false && !conf.SkipClone {
} else if !c.local && !conf.SkipClone {
for i, container := range conf.Clone.Containers {
if !container.Constraints.Match(c.metadata) {
continue

View file

@ -7,7 +7,7 @@
{
"name": "pipeline_clone_0",
"alias": "git",
"image": "plugins/git:latest",
"image": "woodpeckerci/plugin-git:latest",
"working_dir": "/go/src/github.com/drone/envsubst",
"environment": {
"CI": "pipec",

View file

@ -4,7 +4,7 @@ workspace:
clone:
git:
image: plugins/git
image: woodpeckerci/plugin-git
depth: 50
pipeline:

View file

@ -7,7 +7,7 @@
{
"name": "pipeline_clone_0",
"alias": "git",
"image": "plugins/git:windows",
"image": "woodpeckerci/plugin-git:windows",
"working_dir": "c:\\gopath/src\\github.com\\drone\\envsubst",
"environment": {
"CI": "drone",

View file

@ -6,7 +6,7 @@ workspace:
clone:
git:
image: plugins/git:windows
image: woodpeckerci/plugin-git:windows
depth: 50
pipeline:

View file

@ -6,7 +6,7 @@
"steps": [
{
"name": "pipeline_clone",
"image": "plugins/git:latest",
"image": "woodpeckerci/plugin-git:latest",
"working_dir": "/go/src/github.com/go-sql-driver/mysql",
"environment": {
"CI": "pipec",

View file

@ -7,7 +7,7 @@
{
"name": "pipeline_clone_0",
"alias": "git",
"image": "plugins/git:latest",
"image": "woodpeckerci/plugin-git:latest",
"working_dir": "/go/src/github.com/drone/envsubst",
"environment": {
"CI": "pipec",

View file

@ -4,7 +4,7 @@ workspace:
clone:
git:
image: plugins/git
image: woodpeckerci/plugin-git
depth: 50
pipeline:

View file

@ -7,7 +7,7 @@
{
"name": "pipeline_clone_0",
"alias": "git",
"image": "plugins/git:latest",
"image": "woodpeckerci/plugin-git:latest",
"working_dir": "/go/src/github.com/drone/envsubst",
"environment": {
"CI": "pipec",

View file

@ -4,7 +4,7 @@ workspace:
clone:
git:
image: plugins/git
image: woodpeckerci/plugin-git
depth: 50
pipeline:

View file

@ -7,7 +7,7 @@
{
"name": "pipeline_clone_0",
"alias": "git",
"image": "plugins/git:latest",
"image": "woodpeckerci/plugin-git:latest",
"working_dir": "/go/src/github.com/drone/envsubst",
"environment": {
"CI": "pipec",

View file

@ -4,7 +4,7 @@ workspace:
clone:
git:
image: plugins/git
image: woodpeckerci/plugin-git
depth: 50
pipeline:

View file

@ -7,7 +7,7 @@
{
"name": "pipeline_clone_0",
"alias": "git",
"image": "plugins/git:latest",
"image": "woodpeckerci/plugin-git:latest",
"working_dir": "/go/src/github.com/drone/envsubst",
"environment": {
"CI": "drone",

View file

@ -4,7 +4,7 @@ workspace:
clone:
git:
image: plugins/git
image: woodpeckerci/plugin-git
depth: 50
pipeline:

View file

@ -7,7 +7,7 @@
{
"name": "pipeline_clone_0",
"alias": "git",
"image": "plugins/git:latest",
"image": "woodpeckerci/plugin-git:latest",
"working_dir": "/go/src/github.com/drone/envsubst",
"environment": {
"CI": "drone",

View file

@ -4,7 +4,7 @@ workspace:
clone:
git:
image: plugins/git
image: woodpeckerci/plugin-git
depth: 50
pipeline:

View file

@ -7,7 +7,7 @@
{
"name": "pipeline_clone",
"alias": "clone",
"image": "plugins/git:latest",
"image": "woodpeckerci/plugin-git:latest",
"working_dir": "/pipeline/src",
"environment": {
"CI": "drone",