From 54227fe92f86b60d6d67a6611c52c47e8cf44f85 Mon Sep 17 00:00:00 2001 From: thegeeklab-bot Date: Sat, 23 Dec 2023 00:48:51 +0000 Subject: [PATCH] [skip ci] auto-update documentation --- content/_index.md | 66 ++++++++++++++++++++++++++++++ data/data.yaml | 101 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 content/_index.md create mode 100644 data/data.yaml diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..e65ae95 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,66 @@ +--- +title: wp-git-clone +--- + +[![Build Status](https://ci.thegeeklab.de/api/badges/thegeeklab/wp-git-clone/status.svg)](https://ci.thegeeklab.de/repos/thegeeklab/wp-git-clone) +[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/wp-git-clone) +[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/wp-git-clone) +[![Go Report Card](https://goreportcard.com/badge/github.com/thegeeklab/wp-git-clone)](https://goreportcard.com/report/github.com/thegeeklab/wp-git-clone) +[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/wp-git-clone)](https://github.com/thegeeklab/wp-git-clone/graphs/contributors) +[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/wp-git-clone) +[![License: Apache-2.0](https://img.shields.io/github/license/thegeeklab/wp-git-clone)](https://github.com/thegeeklab/wp-git-clone/blob/main/LICENSE) + +Woodpecker CI plugin to clone git repositories. + + + +{{< toc >}} + + + +## Usage + +```YAML +clone: + git: + image: quay.io/thegeeklab/wp-git-clone + settings: + depth: 50 + lfs: false +``` + +### Parameters + + + +{{< propertylist name=wp-git-clone.data sort=name >}} + + + +## Build + +Build the binary with the following command: + +```Shell +make build +``` + +Build the container image with the following command: + +```Shell +docker build --file Containerfile.multiarch --tag thegeeklab/wp-git-clone . +``` + +## Test + +```Shell +docker run --rm \ + -e CI_REPO_CLONE_URL=https://github.com/octocat/Hello-World.git \ + -e CI_PIPELINE_EVENT=push \ + -e CI_COMMIT_SHA=553c2077f0edc3d5dc5d17262f6aa498e69d6f8e \ + -e CI_COMMIT_REF=refs/heads/master \ + -e CI_WORKSPACE=/tmp/wp_git_testrepo \ + -v $(pwd):/build:z \ + -w /build \ + quay.io/thegeeklab/wp-git-clone +``` diff --git a/data/data.yaml b/data/data.yaml new file mode 100644 index 0000000..b7d9f02 --- /dev/null +++ b/data/data.yaml @@ -0,0 +1,101 @@ +--- +properties: + - name: branch + description: | + Change branch name. + defaultvalue: "main" + + - name: ci_netrc_machine + description: | + Netrc machine. + + - name: ci_netrc_password + description: | + Netrc password. + + - name: ci_netrc_username + description: | + Metrc username. + + - name: ci_pipeline_event + description: | + Pipeline event. + defaultvalue: "push" + + - name: commit_ref + description: | + Git commit ref. + defaultvalue: "refs/heads/main" + + - name: commit_sha + description: | + Git commit sha. + + - name: depth + description: | + Clone depth. + defaultvalue: 0 + + - name: insecure_ssl_verify + description: | + Set SSL verification of the remote machine. + defaultvalue: false + + - name: lfs + description: | + Whether to retrieve LFS content if available. + defaultvalue: true + + - name: partial + description: | + Enable/disable partial clone. + defaultvalue: false + + - name: recursive + description: | + Clone submodules. + defaultvalue: true + + - name: remote + description: | + Git remote HTTP clone url. + + - name: remote_ssh + description: | + Git remote SSH clone url. + + - name: safe_directory + description: | + Define/replace safe directories. + + - name: ssh_key + description: | + SSH key for ssh clone. + + - name: submodule_override + description: | + JSON map of submodule overrides. + + - name: submodules_partial + description: | + Update submodules via partial clone (`depth=1`). + defaultvalue: true + + - name: submodules_update_remote + description: | + Update remote submodules. + defaultvalue: false + + - name: tags + description: | + Clone tags, if not explicitly set and event is tag its default is `true` else `false`. + defaultvalue: false + + - name: use_ssh + description: | + Using ssh for git clone. + defaultvalue: false + + - name: workdir + description: | + Path to clone git repository.