Skip to content

Commit

Permalink
Merge pull request #399 from stevekuznetsov/skuznets/fix-timezone-gce
Browse files Browse the repository at this point in the history
ipi-deprovision: use US pacific time zone
  • Loading branch information
openshift-merge-robot authored Jan 23, 2020
2 parents 755190b + 6786514 commit ae11a32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/ipi-deprovision/ipi-deprovision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ EOF
done
done

gce_cluster_age_cutoff="$(TZ=":Africa/Abidjan" date --date="${CLUSTER_TTL}-4 hours" '+%Y-%m-%dT%H:%M+0000')"
gce_cluster_age_cutoff="$(TZ=":America/Los_Angeles" date --date="${CLUSTER_TTL}-4 hours" '+%Y-%m-%dT%H:%M%z')"
echo "deprovisioning clusters with a creationTimestamp before ${gce_cluster_age_cutoff} in GCE ..."
export CLOUDSDK_CONFIG=/tmp/gcloudconfig
mkdir -p "${CLOUDSDK_CONFIG}"
gcloud auth activate-service-account --key-file="${GOOGLE_APPLICATION_CREDENTIALS}"
export FILTER="creationTimestamp.date('%Y-%m-%dT%H:%M+0000')<${gce_cluster_age_cutoff} AND name~'ci-*'"
export FILTER="creationTimestamp.date('%Y-%m-%dT%H:%M%z')<${gce_cluster_age_cutoff} AND name~'ci-*'"
for network in $( gcloud --project=openshift-gce-devel-ci compute networks list --filter "${FILTER}" --format "value(name)" ); do
infraID="${network%"-network"}"
region="$( gcloud --project=openshift-gce-devel-ci compute networks describe "${network}" --format="value(subnetworks[0])" | grep -Po "(?<=regions/)[^/]+" || true )"
Expand Down

0 comments on commit ae11a32

Please sign in to comment.