<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Need help with Groovy Pipeline script. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Need-help-with-Groovy-Pipeline-script/m-p/2375532#M145915</link>
    <description>&lt;P&gt;Issue has been resolved.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2019 14:57:21 GMT</pubDate>
    <dc:creator>sarora1</dc:creator>
    <dc:date>2019-08-09T14:57:21Z</dc:date>
    <item>
      <title>Need help with Groovy Pipeline script.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-help-with-Groovy-Pipeline-script/m-p/2375531#M145914</link>
      <description>&lt;P&gt;What part of the script does git checkout and &lt;STRONG&gt;where&lt;/STRONG&gt; on server will it checkout the code? I am getting missing pom.xml error from below script&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;&lt;SPAN class="pipeline-node-22"&gt;&lt;SPAN class="error-inline"&gt;[ERROR]   &lt;/SPAN&gt;&lt;SPAN class="error-inline"&gt;[ERROR]   The project  (/var/lib/jenkins/workspace/test_pipeline/cicd_poc_project/poms/pom.xml) has 1 error&lt;/SPAN&gt;&lt;SPAN class="error-inline"&gt;[ERROR]     Non-readable POM /var/lib/jenkins/workspace/test_pipeline/cicd_poc_project/poms/pom.xml: /var/lib/jenkins/workspace/test_pipeline/cicd_poc_project/poms/pom.xml (No such file or directory)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;env.PROJECT_GIT_NAME = 'cicd_poc_project'
env.PROJECT_NAME = env.PROJECT_GIT_NAME.toLowerCase()
env.ARTIFACT = 'test_job'
env.VERSION = '0.1'
env.GIT_URL = 'https://github.com/XXXXX/XXXXXXXX.git'
env.CLOUD_URL = 'https://tmc.us.cloud.talend.com/inventory/'
env.TYPE = "" // if big data = _mr
env.IMAGE_NAME = 'XXX'   
// Credentials IDs (Manage Jenkins =&amp;gt; Credentials)
env.GIT_CREDENTIALS_ID = 'XXXX'
env.TMC_CREDENTIALS_ID = 'XXXXX'

node {
 	// Clean workspace before doing anything
    try {
        def userInput
        def deployprod
        stage('Initialize') {
            sh '''
                echo "PATH = ${PATH}"
                echo "M2_HOME = ${M2_HOME}"
            ''' 
        }
        stage ('Git Checkout') {
            git(
                url: "${GIT_URL}",
                credentialsId: "${GIT_CREDENTIALS_ID}",
                branch: 'master'
            )       
            mvnHome = tool 'M3'
        }
        stage ('Build, Test and Publish artifacts to Cloud') {
            withCredentials([usernamePassword(credentialsId: "${TMC_CREDENTIALS_ID}", usernameVariable: 'Dusername', passwordVariable: 'Dpassword')]) {
					withMaven(
                            // Maven installation declared in the Jenkins "Global Tool Configuration"
                            maven: 'M3',
                            // Maven settings.xml file defined with the Jenkins Config File Provider Plugin
                            // Maven settings and global settings can also be defined in Jenkins Global Tools Configuration
                            mavenSettingsConfig: 'maven-settings-file',
                            mavenOpts: '-Dlicense.path=~/Documents/files/license -Dproduct.path=~/Documents/cmdline -Dgeneration.type=local -Dservice.url=${CLOUD_URL} -Dcloud.publisher.screenshot=true -Dcloud.publisher.skip=false -Dservice.accelerate=true -Dcloud.publisher.updateFlow=true -Dservice.username=$Dusername -Dservice.password=$Dpassword -Dcloud.publisher.environment=Development -Dcloud.publisher.workspace=XXXX -Xms1024m -Xmx3096m') 
                            {
                    
                        // Run the maven build
                        sh "mvn -X -f $PROJECT_GIT_NAME/poms/pom.xml -Pcloud-publisher clean deploy -fn -e -pl jobs/process${TYPE}/${ARTIFACT}_${VERSION} -am"
                    
                        }    
		        }
        }
        
    } catch (err) {
        currentBuild.result = 'FAILED'
        throw err
    }
}&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:01:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-help-with-Groovy-Pipeline-script/m-p/2375531#M145914</guid>
      <dc:creator>sarora1</dc:creator>
      <dc:date>2024-11-16T05:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Groovy Pipeline script.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-help-with-Groovy-Pipeline-script/m-p/2375532#M145915</link>
      <description>&lt;P&gt;Issue has been resolved.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 14:57:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-help-with-Groovy-Pipeline-script/m-p/2375532#M145915</guid>
      <dc:creator>sarora1</dc:creator>
      <dc:date>2019-08-09T14:57:21Z</dc:date>
    </item>
  </channel>
</rss>

