Pin official default clone image (#1526)

address https://github.com/woodpecker-ci/woodpecker/issues/1508#issuecomment-1368007494
This commit is contained in:
6543 2023-01-10 17:34:21 +01:00 committed by GitHub
parent 9e56c66db8
commit f71142d162
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 5 deletions

View file

@ -203,7 +203,7 @@ Always use authentication to clone repositories even if they are public. Needed
List of event names that will be canceled when a new pipeline for the same context (tag, branch) is created.
### `WOODPECKER_DEFAULT_CLONE_IMAGE`
> Default: `woodpeckerci/plugin-git:latest`
> Default is defined in [shared/constant/constant.go](https://github.com/woodpecker-ci/woodpecker/blob/master/shared/constant/constant.go)
The default docker image to be used when cloning the repo
@ -213,7 +213,7 @@ The default docker image to be used when cloning the repo
Configures the session expiration time.
### `WOODPECKER_ESCALATE`
> Default: `plugins/docker,plugins/gcr,plugins/ecr,woodpeckerci/plugin-docker,woodpeckerci/plugin-docker-buildx`
> Defaults are defined in [shared/constant/constant.go](https://github.com/woodpecker-ci/woodpecker/blob/master/shared/constant/constant.go)
Docker images to run in privileged mode. Only change if you are sure what you do!

View file

@ -33,3 +33,7 @@ You should not use `sess.Begin()`, `sess.Commit()` or `sess.Close()` inside a mi
:::
To automatically execute the migration after the start of the server, the new migration needs to be added to the end of `migrationTasks` in `server/store/datastore/migration/migration.go`. After a successful execution of that transaction the server will automatically add the migration to a list, so it won't be executed again on the next start.
## Constants of official images
All official default images, are saved in [shared/constant/constant.go](https://github.com/woodpecker-ci/woodpecker/blob/master/shared/constant/constant.go) and must be pinned by an exact tag.

View file

@ -165,7 +165,7 @@ Link to documentation in the UI.
Always use authentication to clone repositories even if they are public. Needed if the SCM requires to always authenticate as used by many companies.
### `WOODPECKER_DEFAULT_CLONE_IMAGE`
> Default: `woodpeckerci/plugin-git:latest`
> Default is defined in [shared/constant/constant.go](https://github.com/woodpecker-ci/woodpecker/blob/release/v0.15/shared/constant/constant.go)
The default docker image to be used when cloning the repo

View file

@ -14,11 +14,11 @@
package constant
// PrivilegedPlugins can be changed by 'WOODPECKER_ESCALATE' at runtime
var PrivilegedPlugins = []string{
"plugins/docker",
"plugins/gcr",
"plugins/ecr",
"woodpeckerci/plugin-docker",
"woodpeckerci/plugin-docker-buildx",
}
@ -32,5 +32,6 @@ var DefaultConfigOrder = [...]string{
}
const (
DefaultCloneImage = "docker.io/woodpeckerci/plugin-git:2.0"
// DefaultCloneImage can be changed by 'WOODPECKER_DEFAULT_CLONE_IMAGE' at runtime
DefaultCloneImage = "docker.io/woodpeckerci/plugin-git:2.0.3"
)