Created
August 8, 2013 14:23
-
-
Save willis7/6185026 to your computer and use it in GitHub Desktop.
OSB 11g Gradle deployment scripts
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 characters
| environments { | |
| local { | |
| serverName = 'localVM' | |
| wls { | |
| adminurl = 't3://localhost:7001' | |
| user = 'weblogic' | |
| password = 'welcome1' | |
| targets = 'AdminServer' | |
| upload = 'true' | |
| verbose = 'true' | |
| debug = 'false' | |
| } | |
| osb{ | |
| importScript = 'import.py' | |
| exportScript = 'export.py' | |
| importjar = 'export/sbconfig.jar' | |
| importCustomFile = 'plans/sbconfig_Customization.xml' | |
| } | |
| } | |
| } |
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 characters
| task deployToOSB (dependsOn: 'configEnv') << { | |
| println "$System.env.WEBLOGIC_CLASSPATH" | |
| ant.taskdef(name: 'wlst', | |
| classname: 'weblogic.ant.taskdefs.management.WLSTTask', | |
| classpath: (configurations.weblogic + configurations.osb).asPath) | |
| ant.wlst(fileName: config.osb.importScript, | |
| debug: true , | |
| failOnError: false , | |
| classpath: "$System.env.WEBLOGIC_CLASSPATH" + (configurations.weblogic + configurations.osb).asPath, | |
| arguments: "$config.wls.user $config.wls.password $config.wls.adminurl $project.name $config.osb.importjar $config.osb.importCustomFile") | |
| } | |
| task configEnv << { | |
| project.ext.config = new ConfigSlurper("$env").parse(new File('env.groovy').toURL()) | |
| logger.lifecycle "Environment is set to $env" | |
| } |
Author
Hi
This script is not working for me.
Could you also please mention what environment variables needs to be configured.
If you have a working example ,please do attach
Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$gradle deployToOSB -Penv=local