Skip to content

Commit

Permalink
added github credentials on jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Joaquimmnetto committed May 12, 2021
1 parent 85982fb commit e905863
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
26 changes: 24 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@

@Library('github.com/wooga/atlas-jenkins-pipeline@1.x') _

withCredentials([string(credentialsId: 'atlas_plugins_coveralls_token', variable: 'coveralls_token')]) {
buildGradlePlugin plaforms: ['osx','windows','linux'], coverallsToken: coveralls_token, testEnvironment: []
withCredentials([usernamePassword(credentialsId: 'github_integration', passwordVariable: 'githubPassword', usernameVariable: 'githubUser'),
usernamePassword(credentialsId: 'github_integration_2', passwordVariable: 'githubPassword2', usernameVariable: 'githubUser2'),
usernamePassword(credentialsId: 'github_integration_3', passwordVariable: 'githubPassword3', usernameVariable: 'githubUser3'),
string(credentialsId: 'atlas_plugins_coveralls_token', variable: 'coveralls_token')]) {
def testEnvironment = [
'osx':
[
"ATLAS_GITHUB_INTEGRATION_USER=${githubUser}",
"ATLAS_GITHUB_INTEGRATION_PASSWORD=${githubPassword}"
],
'windows':
[
"ATLAS_GITHUB_INTEGRATION_USER=${githubUser2}",
"ATLAS_GITHUB_INTEGRATION_PASSWORD=${githubPassword2}"
],
'linux':
[
"ATLAS_GITHUB_INTEGRATION_USER=${githubUser3}",
"ATLAS_GITHUB_INTEGRATION_PASSWORD=${githubPassword3}"
]
]


buildGradlePlugin plaforms: ['osx','windows','linux'], coverallsToken: coveralls_token, testEnvironment: testEnvironment
}
4 changes: 2 additions & 2 deletions src/main/groovy/wooga/gradle/plugins/PluginsPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ class PluginsPlugin implements Plugin<Project> {
postReleaseTask.dependsOn publishTask
publishTask.mustRunAfter releaseTask

GenerateReleaseNotes releaseNotesTask = tasks.getByName(RELEASE_NOTES_TASK_NAME) as GenerateReleaseNotes //check
GithubPublish githubPublishTask = (GithubPublish) tasks.getByName(GithubPublishPlugin.PUBLISH_TASK_NAME) //check
GenerateReleaseNotes releaseNotesTask = (GenerateReleaseNotes) tasks.getByName(RELEASE_NOTES_TASK_NAME)
GithubPublish githubPublishTask = (GithubPublish) tasks.getByName(GithubPublishPlugin.PUBLISH_TASK_NAME)
githubPublishTask.onlyIf(new ProjectStatusTaskSpec('candidate', 'release'))
githubPublishTask.tagName = "v${project.version}"
githubPublishTask.setReleaseName(project.version.toString())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package wooga.gradle.plugins.releasenotes

import com.wooga.github.changelog.changeSet.ChangeSet
import com.wooga.github.changelog.changeSet.Compound
import com.wooga.github.changelog.changeSet.Logs
import com.wooga.github.changelog.changeSet.PullRequests
Expand Down

0 comments on commit e905863

Please sign in to comment.