# gitclone **Repository Path**: fairy_squad/gitclone ## Basic Information - **Project Name**: gitclone - **Description**: 这是一段描述这是一段描述 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-01-11 - **Last Updated**: 2023-01-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # flowci-plugin-gitclone ## Description The plugin will clone the git repo, and submodules based on inputs ## Inputs - `FLOWCI_GIT_URL` (required): git http/ssh url, ex: git@github.com:FlowCI/spring-petclinic-sample.git - `FLOWCI_GIT_BRANCH`: git branch name, default value is master - `FLOWCI_GIT_COMMIT_ID`: clone from commit id if this variable specified - `FLOWCI_GIT_CREDENTIAL`: credential name created from flow.ci, it's required if git url is based on ssh - `FLOWCI_GITCLONE_TIMEOUT`: timeout for gitclone in seconds, default is 60 seconds - `FLOWCI_PIP_SOURCE`: since `gitpython` will be installed from `pip`, you can define the pip source if needed ## Outputs to job context - `FLOWCI_GIT_COMMIT_ID`: head commit id - `FLOWCI_GIT_COMMIT_MESSAGE`: head commit message - `FLOWCI_GIT_COMMIT_LIST`: commit list as base64 json format, ex: `[{id:xxx, mesage:xxx, time:xxx, author:{email:xxx, name:xxx}}]` ## How to use it ```yml envs: FLOWCI_GIT_URL: "https://github.com/FlowCI/spring-petclinic-sample.git" FLOWCI_GIT_BRANCH: "master" # FLOWCI_GIT_CREDENTIAL: "created from ci admin page" # FLOWCI_GITCLONE_TIEMOUT: 60 steps: - name: clone plugin: 'gitclone' # customize pip source from FLOWCI_PIP_SOURCE, please add --trusted-host if source is not https # envs: # FLOWCI_PIP_SOURCE: "http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com" - name: list script: | cd ${FLOWCI_GIT_REPO} ls ```