This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
// TODO: replace REPO_URL & WEB_HOOK_URL with yours | |
def REPO_URL = '' | |
def WEB_HOOK_URL = "" | |
// 配置 PATH | |
withEnv(["PATH+EXTRA=/opt/homebrew/bin:${env.ANDROID_HOME}/platform-tools:${env.ANDROID_HOME}/emulator:${env.ANDROID_HOME}/build-tools/32.0.0:${env.ANDROID_HOME}/cmdline-tools/latest/bin"]) { | |
stage('pull code') { | |
// TODO: replace gitlab_jenkins_password with yours |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git filter-branch --env-filter ' | |
OLD_EMAIL="your-old-email@example.com" | |
CORRECT_NAME="Your Correct Name" | |
CORRECT_EMAIL="your-correct-email@example.com" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gitlab | |
# gitlab 地址 | |
url = '' | |
# gitlab private token(设置 api 访问权限) | |
private_token = '' | |
# 获取 gitlab 操作对象 | |
gl = gitlab.Gitlab(url, private_token) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gitlab | |
# gitlab url | |
url = '' | |
# account's private token (select api access permission) | |
private_token = '' | |
# login to get gitlab object | |
gl = gitlab.Gitlab(url, private_token) |