I think you are doing it the wrong way.
There are two ways to do this
1. Add oracle dir and ver to the built in server property class and then use that with TARGET.DIR
2. Use your custom ORACLE property class in the BLPackage by going to the property tab. Add a new property and mark it as property class = "your Oracle class". Now when you creat your CMD you should be able to see ORACLE.DIR in the drop down.
Does it makes sense? I dont have a system in front of me so no screenshots.
Hi, thanks for replying,
the 1st option isnt too useful because I have about 30 env. variables I want to add, things like JYTHON_DIR, APACHE_VER, ORACLE_CLIENT_VER, etc etc
putting all that into Server class is a bit messy, I wanted to create a custom class for the customer so they can manage it.
For 2nd option, I know I can add local properties to the particular BLpackage, but I wanted to add global variables that I can reference in any BLpackage. This is a local option only.
This is what I was thinking. MAybe there are other ways as well
I have created the same Custom Property Class as you did: "Software Deployment"
Link "Software Deployment" to the SERVER property class so that I can use ??TARGET.SOFTWARE_DEPLOYMENT.??... in any package.
Link "Software Deployment" as a Local Property on every BLPackage that needs to use it.
Access the parameter in two diffent ways depending on option 1 or 2.
thats it! I went with option 2, created a Local Property called Software Install - linked to my custom Property class "Software_Install"
then in the BLpackage, the drop down shows Software Install > with all the related custom variables.
the blpacakge looks like this,
sh install.sh -d ??Software_Install.ORACLE_INSTALL_DIR??
thanks for the assist, all my custom env. vars are in 1 custom class. I didnt understand how to use these vars properly.
noticing a problem w this now,
I tried option 1, adding a property to Server class that references the custom Software_Install class, added a parameter to this Software_install class called LOG_DIR with a string value of /opt/log
trying to run my blpackage cmd like this to test whether teh value is getting passed,
echo ??TARGET.Software_Install.LOG_DIR?? >> /tmp/logtest.txt
no value gets passed via that call, the txt file is empty. It doesn seem to pass on the value, I tried it with option 1 and option 2 and no value gets passed.
You need to create an instance of your custom property class Software Install. Goto your custom property class and select the knstance tab and hit the green plus sign. Give it a name and assign values if different from deault values. Now go back to your package and you will have to options.
Assign a defailt value to you SOFTWARE_INSTALL property and point it to the instance you created in step one.
You can also mark it as Required in which case it will appear in the deploymEnt job under the package where you can assign it a new value.
The benefit with this is that you can have multiple jobs deploying the same package to different environments where all use different values for the SW Install property.
Just realized I didnt have an instance, thanks for the reminder. Its working properly now!