Add the User Data script for Windows systems.
Change-Id: I9a38c3965b6201dbcecf204b2046694413996719
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
--- /dev/null
+<powershell>
+ # Resize first partition of first disk to maximum size
+ Get-Partition -DiskNumber 0 -PartitionNumber 1
+ $size = (Get-PartitionSupportedSize -DiskNumber 0 -PartitionNumber 1)
+ Resize-Partition -DiskNumber 0 -PartitionNumber 1 -Size $size.SizeMax
+
+ mkdir -Force "${SLAVE_JENKINS_HOME}"
+ (new-object System.Net.WebClient).DownloadFile('${SLAVE_JAR_URL}','${SLAVE_JENKINS_HOME}\slave.jar')
+ cd "${SLAVE_JENKINS_HOME}"
+ java ${SLAVE_JVM_OPTIONS} -jar "slave.jar" -jnlpUrl "${SLAVE_JNLP_URL}" -secret "${SLAVE_JNLP_SECRET}"
+</powershell>
.. literalinclude:: ../_static/ciman/jenkins-init-script.sh.example
+ For Windows:
+
+ .. code-block:: none
+
+ Type: OpenStack User Data
+ ID: jenkins-init-script-windows
+ Name: jenkins-init-script-windows
+ Comment: jenkins-init-script-windows
+
+ With the contents (change the git clone URL as necessary for the project):
+
+ .. literalinclude:: ../_static/ciman/jenkins-init-script-windows.ps1.example
+
#. Configure ``cattle`` cloud
#. Create cloud config directory ``mkdir -p jenkins-config/clouds/openstack/cattle``