#!/bin/bash -x -e
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

for SERVICE in "$@"; do
  gcloud app versions list \
    --format="table[no-heading](VERSION.ID)" \
    --filter="SERVICE=${SERVICE} AND
              TRAFFIC_SPLIT=0 AND
              LAST_DEPLOYED.date()<$(date -I --date='-10 day')" \
  | xargs --no-run-if-empty gcloud app versions delete -s ${SERVICE}
done
#!/bin/bash -x -e
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

for SERVICE in "$@"; do
  gcloud app versions list \
    --format="table[no-heading](VERSION.ID)" \
    --filter="SERVICE=${SERVICE} AND
              TRAFFIC_SPLIT=0 AND
              LAST_DEPLOYED.date()<$(date -I --date='-60 day')" \
  | xargs --no-run-if-empty gcloud app versions delete -s ${SERVICE}
done
Increase pinpoint build retention period to 60 days (from 10)
Increase pinpoint build retention period to 60 days (from 10)

Bug: chromium:1250069
Change-Id: I9e557d7d7556f35d54a10a5d3a20187eacc03c7b
Reviewed-on: https://chromium-review.googlesource.com/c/catapult/+/3163673
Commit-Queue: Ryan Heise <50ee0a56d43e9e15503d071e9ceb1a6059353025@google.com>
Commit-Queue: Wenbin Zhang <45ad8a1ff616a38a2202fd35571df81897c5f14f@google.com>
Auto-Submit: Ryan Heise <50ee0a56d43e9e15503d071e9ceb1a6059353025@google.com>
Reviewed-by: Wenbin Zhang <45ad8a1ff616a38a2202fd35571df81897c5f14f@google.com>
