Skip to content

Commit 093c8c7

Browse files
authored
Merge pull request #421 from sm43/fix-cron
2 parents c708f33 + 312f03d commit 093c8c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/305-cleanup-cron.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ spec:
3131
- command:
3232
- /bin/bash
3333
- -c
34-
- test -e /etc/config/max-keep-days && export MAX_DAY_KEEP=$(cat /etc/config/max-keep-days);for pr in $(kubectl get pipelineruns -l app.kubernetes.io/managed-by=pipelines-as-code -o json | python3 -c "import
34+
- test -e /etc/config/max-keep-days && export MAX_DAY_KEEP=$(cat /etc/config/max-keep-days);for pr in $(kubectl get taskruns -l app.kubernetes.io/managed-by=pipelines-as-code -o json | python3 -c "import
3535
os, sys, datetime, json;jeez=json.load(sys.stdin);res=[ i['metadata']['name']
3636
for i in jeez['items'] if datetime.datetime.now() > datetime.datetime.strptime(i['metadata']['creationTimestamp'],
3737
'%Y-%m-%dT%H:%M:%SZ') + datetime.timedelta(days=int(os.environ.get('MAX_DAY_KEEP', 1))) ];print(' '.join(res))");do
38-
kubectl delete pipelinerun ${pr};done
38+
kubectl delete taskrun ${pr};done
3939
image: quay.io/openshift/origin-cli:4.8
4040
imagePullPolicy: IfNotPresent
4141
name: cleanup

0 commit comments

Comments
 (0)