forked from sentinl/sentinl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified gradle to support passing credentials from Jenkins
- Loading branch information
Showing
5 changed files
with
40 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ node_modules | |
/.idea | ||
/target | ||
/build | ||
package-lock.json |
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
nodeVersion=6.9.0 | ||
|
||
# placeholders needed so gradle will not complain about missing properties during init phase | ||
# these are provided by Jenkins | ||
artifactory_username= | ||
artifactory_password= | ||
artifactory_url= | ||
|
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* Required for the loadPackageJson method | ||
*/ | ||
apply plugin: 'groovy' | ||
import groovy.json.JsonSlurper | ||
|
||
def loadPackageJson() { | ||
File packageJson = new File(projectDir, "package.json") | ||
return new JsonSlurper().parseText(packageJson.text) | ||
} | ||
|
||
project.ext { | ||
loadPackageJson = this.&loadPackageJson | ||
} |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
def getArtifactoryRepository() { | ||
return { | ||
maven { | ||
url project.artifactory_url + "/" + (project.version.contains('SNAPSHOT') ? 'libs-snapshot-local' : 'libs-release-local') | ||
credentials { | ||
username project.artifactory_username | ||
password project.artifactory_password | ||
} | ||
} | ||
} | ||
} | ||
|
||
project.ext { | ||
getArtifactoryRepository = this.&getArtifactoryRepository | ||
} |