Last active
April 22, 2021 03:51
-
-
Save robertobatts/42da9069e13b61a238f51c36754de97b to your computer and use it in GitHub Desktop.
Revisions
-
robertobatts revised this gist
Dec 17, 2019 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,9 +23,6 @@ pipeline { releaseRepo: "libs-release", snapshotRepo: "libs-release" ) } } @@ -37,8 +34,7 @@ pipeline { tool: "Maven 3.6.2",//Tool name from Jenkins configuration pom: 'pom.xml', goals: '-U -s $MAVEN_SETTINGS_XML clean install', deployerId: "MAVEN_DEPLOYER" ) } } -
robertobatts renamed this gist
Nov 18, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
robertobatts revised this gist
Nov 18, 2019 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,10 @@ pipeline { agent any triggers { bitbucketPush() } tools { jdk 'OpenJDK_1_8_0' } -
robertobatts revised this gist
Nov 17, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ pipeline { agent any tools { @@ -30,7 +30,7 @@ pipeline{ configFileProvider([configFile(fileId: 'MavenArtifactorySettingId', variable: 'MAVEN_SETTINGS_XML')]) { retry(count: 3) { rtMavenRun( tool: "Maven 3.6.2",//Tool name from Jenkins configuration pom: 'pom.xml', goals: '-U -s $MAVEN_SETTINGS_XML clean install', deployerId: "MAVEN_DEPLOYER"/*, -
robertobatts revised this gist
Nov 17, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ pipeline{ stages { stage('Artifactory config') { steps { rtServer( id: "server_tutorial", url: "http://3.134.8.172:8081/artifactory", -
robertobatts revised this gist
Nov 17, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ pipeline{ snapshotRepo: "libs-release" ) //with the resolver it doesn't work, I suppose it's because Artifactory doesn't support Maven3 //I'll manage the resolver by changing the settings.xml /*rtMavenResolver(id:"MAVEN_RESOLVER",serverId:"server_tutorial",releaseRepo:"libs-release",snapshotRepo:"libs-release")*/ } } -
robertobatts revised this gist
Nov 17, 2019 . 1 changed file with 13 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,44 +1,36 @@ pipeline{ agent any tools { jdk 'OpenJDK_1_8_0' } stages { stage('Artifactory config') { steps{ rtServer( id: "server_tutorial", url: "http://3.134.8.172:8081/artifactory", credentialsId: "artifactory-credentials" ) rtMavenDeployer( id: "MAVEN_DEPLOYER", serverId: "server_tutorial", releaseRepo: "libs-release", snapshotRepo: "libs-release" ) //with the resolver it doesn't work, I suppose it's because Artifactory doesn't support Maven3 //we will mange the resolver by changing the settings.xml /*rtMavenResolver(id:"MAVEN_RESOLVER",serverId:"server_tutorial",releaseRepo:"libs-release",snapshotRepo:"libs-release")*/ } } stage('Build Maven') { steps { configFileProvider([configFile(fileId: 'MavenArtifactorySettingId', variable: 'MAVEN_SETTINGS_XML')]) { retry(count: 3) { rtMavenRun( tool: "Maven3.6.2",//Tool name from Jenkins configuration pom: 'pom.xml', goals: '-U -s $MAVEN_SETTINGS_XML clean install', deployerId: "MAVEN_DEPLOYER"/*, @@ -48,12 +40,10 @@ pipeline { } } } stage('Publish to Artifactory') { steps { rtPublishBuildInfo(serverId: "server_tutorial") } } } } -
robertobatts created this gist
Nov 17, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,59 @@ pipeline { agent any tools { jdk 'OpenJDK_1_8_0' } stages { stage ('Artifactory configuration') { steps { rtServer ( id: "server_tutorial", url: "http://3.134.8.172:8081/artifactory", credentialsId: "artifactory-credentials" ) rtMavenDeployer ( id: "MAVEN_DEPLOYER", serverId: "server_tutorial", releaseRepo: "libs-release", snapshotRepo: "libs-release" ) //with the resolver it doesn't work, I suppose it's because Artifactory doesn't support Maven3 /*rtMavenResolver ( id: "MAVEN_RESOLVER", serverId: "server_tutorial", releaseRepo: "libs-release", snapshotRepo: "libs-release" )*/ } } stage ('Build Maven') { steps { //set settings.xml with the ID of the config file on Jenkins configFileProvider([configFile(fileId: 'MavenArtifactorySettingId', variable: 'MAVEN_SETTINGS_XML')]) { retry(count: 3) { rtMavenRun ( tool: "Maven 3.6.2", // Tool name from Jenkins configuration pom: 'pom.xml', goals: '-U -s $MAVEN_SETTINGS_XML clean install', deployerId: "MAVEN_DEPLOYER"/*, resolverId: "MAVEN_RESOLVER"*/ ) } } } } stage ('Publish to Artifactory') { steps { rtPublishBuildInfo (serverId: "server_tutorial") } } } }