2016-12-16 6 views
1

私の仕事に秘密のファイルを追加したいのですが、私はJenkis DSLのどのキーワードを提案できませんか? XMLでJenkins DSL Add secretファイル

enter image description here

それは次のようになります。

<project> 
... 
<properties>...</properties> 
<scm class="hudson.scm.NullSCM"/> 
<builders>...</builders> 
<buildWrappers> 
    <org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper plugin="[email protected]"> 
    <bindings> 
     <org.jenkinsci.plugins.credentialsbinding.impl.FileBinding> 
      <credentialsId>my-keytab</credentialsId> 
      <variable>KEYTAB</variable> 
     </org.jenkinsci.plugins.credentialsbinding.impl.FileBinding> 
    </bindings> 
    </org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper> 
</buildWrappers> 
</project> 

答えて

2

あなたはcredentialsBindingコンテキスト内file使用することができます。

job('example') { 
    wrappers { 
    credentialsBinding { 
     file('KEYTAB', 'my-keytab') 
    } 
    } 
} 

詳細はAPI Viewerを参照してください。

関連する問題