1.python
ssh-keygen -t rsagit
2. api
建立一個用戶或選擇一個已有用戶,用來讓 Jenkins 和 GitLab API 交互。這個用戶將須要是全局的管理員或添加進每一個組/工程,並做爲成員。須要開發者權限來報告構建狀態。這是因爲,當使用了 ‘Merge when pipeline succeeds’ 功能時,成功的構建狀態能夠觸發合併。GitLab Plugin 的一些功能可能須要其它的一些權限。好比,有一個選項用於在構建成功時,接受 merge request。使用這一功能須要 developer,master 或 owner 級的權限。ssh
增長:Active Personal Access Tokens (1)gitlab
3. ui
env
cd /home/master
rm -fr *
git clone $gitlabSourceRepoSshUrlurl
cd $WORKSPACE
rm -fr *
git clone $gitlabSourceRepoSshUrl
cd RobotTest/
git checkout $gitlabBranch
git diff master $gitlabBranch > $WORKSPACE/../$BUILD_ID
cat $WORKSPACE/../$BUILD_ID
python /home/master/RobotTest/tools/pickup_mr_releated_suites.py $WORKSPACE/../$BUILD_ID $WORKSPACE/results $WORKSPACE/RobotTest/suites
rm -f $WORKSPACE/../$BUILD_IDspa
4..net
com.dabsquared.gitlabjenkins.connection.GitLabConnectionConfig.xmlxml
<?xml version='1.1' encoding='UTF-8'?>
<com.dabsquared.gitlabjenkins.connection.GitLabConnectionConfig plugin="gitlab-plugin@1.5.9">
<useAuthenticatedEndpoint>true</useAuthenticatedEndpoint>
<connections>
<com.dabsquared.gitlabjenkins.connection.GitLabConnection>
<name>RobotTest</name>
<url>https://gitlabe1.ext.net.nokia.com</url>
<apiTokenId>37f8840e-4565-4a25-9275-7ef1ee5f527d</apiTokenId> <clientBuilder class="com.dabsquared.gitlabjenkins.gitlab.api.impl.AutodetectGitLabClientBuilder"> <id>autodetect</id> <ordinal>0</ordinal> </clientBuilder> <ignoreCertificateErrors>false</ignoreCertificateErrors> <connectionTimeout>10</connectionTimeout> <readTimeout>10</readTimeout> </com.dabsquared.gitlabjenkins.connection.GitLabConnection> </connections> </com.dabsquared.gitlabjenkins.connection.GitLabConnectionConfig>