jenkins 配置

1.python

ssh-keygen -t rsagit

2.  api

配置 GitLab 用户

建立一个用户或选择一个已有用户,用来让 Jenkins 和 GitLab API 交互。这个用户将须要是全局的管理员或添加进每一个组/工程,并做为成员。须要开发者权限来报告构建状态。这是因为,当使用了 ‘Merge when pipeline succeeds’ 功能时,成功的构建状态能够触发合并。GitLab Plugin 的一些功能可能须要其它的一些权限。好比,有一个选项用于在构建成功时,接受 merge request。使用这一功能须要 developer,master 或 owner 级的权限。ssh

增长:Active Personal Access Tokens (1)gitlab

 GitLab API token

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>  

相关文章
相关标签/搜索