Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Setup Jenkins locally: 

To write.

Push logs to Nexus Akraino Repository:

To push the logs using, you'll have to:

  • write a script to push logs
  • create/configure a job on your jenkins
  • validate the logs being pushed on Nexus Akraino Repository

Write a script to push logs: 

To write.

Create a job on your Jenkins: 

Follow these steps:

  • Log into to Jenkins
  • Through the Dashboard, go to New Item
  • (in our case, we used push-logs)
  • Select the Pipeline options shown
  • Click OK
  • In the General (tab), under the Pipeline section, Pipeline script option must be selected. And paste the below provided groovy script into the Script area. The script is as follows:

    Code Block
    languagegroovy
    titleAn example (groovy-script) to push logs to Nexus Akraino Repository
    linenumberstrue
    pipeline { 
        agent none 
        
        stages { 
            stage ("push-logs-nexus") { 
                agent any 
                steps { 
                    sh "echo 'Start of job (push-logs)'" 
                    sh "pwd" 
                    dir("../scripts/") { 
                        sh "pwd" 
                        sh "./push-logs.sh" 
                    } 
                    sh "pwd" 
                    sh "echo 'End of job (push-logs)'" 
                } 
            } 
        } 
    } 


  • Now you have to configure the job to load/run the script to push logs (wrote in the previous step). An example on how to is provided below:

Validate the logs being pushed on Nexus Akraino Repository:

Visit the associated repository to your blueprint. The logs must be there. In our case, the link is:


...