Closed jorgemoralespou closed 7 years ago
So for refrence this is what we want to do right?
Just create a js file and insert it into the configuration. I guess we also need to change the jenkins configuration a little.
Can we do this on a running cluster? How can we restart the cluster to have this work out?
RIght, we need to set this up as a plugin, so I would rather have #20 done first.
I'm also still investigating if there's a way to restart just the origin container and not the whole cluster. I'm discussing this with main engineer in charge of "oc clsuter". For now full cluster down and up is required.
Also, some changes in next release will make this easier, since cluster initialization will not happen on second run (like creating the user and the project).
So i played around with this today.
Given that this script is run inside a maser/config file it will do the trick
sed -i 's/ extensionScripts: null/ extensionScripts:\
- pipelines.js/g' master-config.yaml
sed -i 's/autoProvisionEnabled: false/autoProvisionEnabled: true/g' master-config.yaml
echo "window.OPENSHIFT_CONSTANTS.ENABLE_TECH_PREVIEW_FEATURE.pipelines = true;" >> pipelines.js
It doesn't work for me on mac, but I didn't have time to validate the commands. But initilly the code looks good, although the sed like that is too dangerously complex ;-)
As to enable the pipelines just first and third lines are required, second line will provide ability to autoprovision jenkins, which means that if deploy a pipeline in a project that don't have jenkins installed, will deploy it for you. Not sure whether we want to do this or not.
Like the pipelines.
This can have dependency on #20 or be created now and then moved into a plugin