Skip to content

[JENKINS-71596] Provide a git plugin option to hide git logs #1671

@jenkins-infra-bot

Description

@jenkins-infra-bot

I want to hidden git log,eg:

Started by user acai Loading library ops-lib@​master Attempting to resolve master from remote references... > git --version # timeout=10 > git --version # 'git version 2.30.2' using GIT_ASKPASS to set credentials gitee密码 > git ls-remote -h – https://gitee.com/acaiblog/libraries.git # timeout=10 Found match: refs/heads/master revision 7d28fd8619888375db12f965be491319b6afa9c2 > git rev-parse --resolve-git-dir /var/jenkins_home/workspace/aaa@​libs/9fa4d5b31656b386121512d2efe921ecd112ae9bc24b6af3b921704457ba5822/.git # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://gitee.com/acaiblog/libraries.git # timeout=10 Fetching without tags Fetching upstream changes from https://gitee.com/acaiblog/libraries.git > git --version # timeout=10 > git --version # 'git version 2.30.2' using GIT_ASKPASS to set credentials gitee密码 > git fetch --no-tags --force --progress – https://gitee.com/acaiblog/libraries.git +refs/heads/:refs/remotes/origin/ # timeout=10 Checking out Revision 7d28fd8619888375db12f965be491319b6afa9c2 (master) > git config core.sparsecheckout # timeout=10 > git checkout -f 7d28fd8619888375db12f965be491319b6afa9c2 # timeout=10 Commit message: "新增日志时间戳" [Pipeline] Start of Pipeline [Pipeline] echo [2023-07-06 10:59:56] INFO: info [Pipeline] echo [2023-07-06 10:59:56] DEBUG: debug [Pipeline] End of Pipeline Finished: SUCCESS

 

JenkinsFile:

@​Library('ops-lib@​master') _
log.info "info"
log.debug "debug"

 


Originally reported by acaiblog, imported from: Provide a git plugin option to hide git logs
  • assignee: acaiblog
  • status: Open
  • priority: Minor
  • component(s): git-client-plugin
  • label(s): git
  • resolution: Unresolved
  • votes: 0
  • watchers: 3
  • imported: 20251211-071809
Raw content of original issue

I want to hidden git log,eg:

Started by user acai Loading library ops-lib@master Attempting to resolve master from remote references... > git --version # timeout=10 > git --version # 'git version 2.30.2' using GIT_ASKPASS to set credentials gitee密码 > git ls-remote -h – https://gitee.com/acaiblog/libraries.git # timeout=10 Found match: refs/heads/master revision 7d28fd8619888375db12f965be491319b6afa9c2 > git rev-parse --resolve-git-dir /var/jenkins_home/workspace/aaa@libs/9fa4d5b31656b386121512d2efe921ecd112ae9bc24b6af3b921704457ba5822/.git # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://gitee.com/acaiblog/libraries.git # timeout=10 Fetching without tags Fetching upstream changes from https://gitee.com/acaiblog/libraries.git > git --version # timeout=10 > git --version # 'git version 2.30.2' using GIT_ASKPASS to set credentials gitee密码 > git fetch --no-tags --force --progress – https://gitee.com/acaiblog/libraries.git +refs/heads/:refs/remotes/origin/ # timeout=10 Checking out Revision 7d28fd8619888375db12f965be491319b6afa9c2 (master) > git config core.sparsecheckout # timeout=10 > git checkout -f 7d28fd8619888375db12f965be491319b6afa9c2 # timeout=10 Commit message: "新增日志时间戳" [Pipeline] Start of Pipeline [Pipeline] echo [2023-07-06 10:59:56] INFO: info [Pipeline] echo [2023-07-06 10:59:56] DEBUG: debug [Pipeline] End of Pipeline Finished: SUCCESS

 

JenkinsFile:

@Library('ops-lib@master') _ log.info "info" log.debug "debug"

 

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions