blob: 8618e35afb36dfdf11fa3ef2cc48d8d2cc546b76 [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project>
<actions/>
<description>This job terminates dataproc cluster, cleans up storage bucket, removes notebook kernels</description>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>Username</name>
<description>name of the data scientist user</description>
<defaultValue></defaultValue>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>dataproc_cluster_name</name>
<description>name of the Dataproc cluster to terminate</description>
<defaultValue></defaultValue>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>Notebook_Name</name>
<description>name of the notebook, Dataproc cluster is linked to</description>
<defaultValue></defaultValue>
</hudson.model.StringParameterDefinition>
<hudson.model.ChoiceParameterDefinition>
<name>Action</name>
<description></description>
<choices class="java.util.Arrays$ArrayList">
<a class="string-array">
<string>terminate</string>
</a>
</choices>
</hudson.model.ChoiceParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.scm.NullSCM"/>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>rand=`openssl rand -hex 10`;
sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/terminate_dataengine-service/template.json |
sed &apos;s/EUN/&apos;${Username}&apos;/g&apos; | sed &apos;s/DCN/&apos;${dataproc_cluster_name}&apos;/g&apos;
| sed &apos;s/NIN/&apos;${Notebook_Name}&apos;/g&apos; | sudo docker run -i -e &quot;conf_tag_resource_id=${Service_base_name}&quot;
-v /home/datalab-user/keys:/root/keys -v /opt/datalab/tmp/result:/response -v
/var/opt/datalab/log/dataengine-service:/logs/dataengine-service docker.datalab-dataengine-service --action
$Action
</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>