wp-git-clone
Woodpecker CI plugin to clone git repositories.
clone:
git:
image: quay.io/thegeeklab/wp-git-clone
settings:
depth: 50
lfs: false
-
Change branch name.Default: main
-
Git commit ref.Default: refs/heads/main
-
Git commit sha.Default: $CI_COMMIT_SHA
-
Clone depth.Default: 0
-
Skip SSL verification.
Activating this option is insecure and should be avoided in most cases.
Default: false -
Whether to retrieve LFS content if available.Default: true
-
Plugin log level.Default: info
-
Enable/disable partial clone.Default: false
-
Clone submodules.Default: true
-
Git remote HTTP clone url.Default: $CI_REPO_CLONE_URL
-
Git remote SSH clone url.Default: $CI_REPO_CLONE_SSH_URL
-
Define/replace safe directories.Default: $CI_WORKSPACE
-
Private key for SSH clone.Default: none
-
JSON map of submodule overrides.Default: none
-
Update submodules via partial clone (
depth=1
).Default: true -
Update remote submodules.Default: false
-
Fetch git tags during clone.Default: true
-
Path to clone git repository.Default: $CI_WORKSPACE
Build the binary with the following command:
make build
Build the container image with the following command:
docker build --file Containerfile.multiarch --tag thegeeklab/wp-git-clone .
docker run --rm \
-e CI_REPO_CLONE_URL=https://github.com/octocat/Hello-World.git \
-e CI_COMMIT_SHA=b3cbd5bbd7e81436d2eee04537ea2b4c0cad4cdf \
-e CI_COMMIT_REF=refs/heads/test \
-e CI_WORKSPACE=/tmp/wp_git_testrepo \
-v $(pwd):/build:z \
-w /build \
thegeeklab/wp-git-clone