You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2020/11/08 15:04:37 UTC

[incubator-hop-docs] branch master updated: add github token

This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new 7680291  add github token
7680291 is described below

commit 76802919b006051df67ba81f9e19657cd8ff1c53
Author: Hans Van Akelyen <ha...@gmail.com>
AuthorDate: Sun Nov 8 16:04:25 2020 +0100

    add github token
---
 Jenkinsfile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
index a27a95d..bdff542 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -18,6 +18,7 @@
  */
 
 def AGENT_LABEL = env.AGENT_LABEL ?: 'ubuntu'
+def githubToken = "5f95d117-af3b-452a-9e5c-4bddb22a67f4"
 
 pipeline {
 
@@ -67,6 +68,7 @@ pipeline {
                 not { triggeredBy cause: "UserIdCause", detail: "asf-ci" }
             }
             steps {
+                withCredentials([usernamePassword(credentialsId: githubToken, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
                 echo 'Adding new Files from Hop'
                 sh '''
                     cd ./tmp;
@@ -85,9 +87,11 @@ pipeline {
                 '''
                 echo 'Generate new Navigation'
                 sh './generate_navigation.sh'
+                sh 'git config --local credential.helper "!f() { echo username=\\$GIT_USERNAME; echo password=\\$GIT_PASSWORD; }; f";'
                 sh 'git add .'
                 sh 'git commit -m "Documentation updated to $GIT_COMMIT"'
                 sh 'git push --force origin HEAD:master'
+                }
             }
         }
         stage('Website update') {