Merge "Increase ocata packer timeout from 60m to 75m"
[releng/builder.git] / jjb / opendaylight-infra-cleanup-stale-nodes.sh
1 #!/bin/bash
2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11
12 # Todo: As a safe check we could obtain the list of active jobs from Jenkins and
13 # compute the checksum from $JOB_NAME to check if any active nodes exist and
14 # skip deleting those nodes. This step may not be required since there is already
15 # 24H timeout in place for all jobs therefore all jobs are expected to complete
16 # within the timeout.
17
18 lftools openstack --os-cloud vex \
19     server list --days=1
20 lftools openstack --os-cloud vex \
21     server cleanup --days=1