Skip to content

Commit

Permalink
change console logs into exec
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam Bennett committed Apr 25, 2022
1 parent 51d3bc6 commit e6cae92
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .werft/platform-delete-preview-environments-cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ async function deletePreviewEnvironments() {
}

async function removeCertificate(preview: string, kubectlConfig: string) {
console.log(`kubectl --kubeconfig ${kubectlConfig} -n certs delete cert ${preview}`)
exec(`kubectl --kubeconfig ${kubectlConfig} -n certs delete cert ${preview}`)
return
}

async function removeDNSRecord(preview: string) {
console.log(`gcloud dns record-sets delete *.ws.${preview}.preview.gitpod-dev.com. --type=A --zone=preview-gitpod-dev-com`)
console.log(`gcloud dns record-sets delete *.${preview}.preview.gitpod-dev.com. --type=A --zone=preview-gitpod-dev-com`)
console.log(`gcloud dns record-sets delete ${preview}.preview.gitpod-dev.com. --type=A --zone=preview-gitpod-dev-com`)
console.log(`gcloud dns record-sets delete prometheus-${preview}.preview.gitpod-dev.com. --type=A --zone=preview-gitpod-dev-com`)
console.log(`gcloud dns record-sets delete prometheus-${preview}.preview.gitpod-dev.com. --type=TXT --zone=preview-gitpod-dev-com`)
console.log(`gcloud dns record-sets delete grafana-${preview}.preview.gitpod-dev.com. --type=A --zone=preview-gitpod-dev-com`)
console.log(`gcloud dns record-sets delete grafana-${preview}.preview.gitpod-dev.com. --type=TXT --zone=preview-gitpod-dev-com`)
exec(`gcloud dns record-sets delete *.ws.${preview}.preview.gitpod-dev.com. --type=A --zone=preview-gitpod-dev-com`)
exec(`gcloud dns record-sets delete *.${preview}.preview.gitpod-dev.com. --type=A --zone=preview-gitpod-dev-com`)
exec(`gcloud dns record-sets delete ${preview}.preview.gitpod-dev.com. --type=A --zone=preview-gitpod-dev-com`)
exec(`gcloud dns record-sets delete prometheus-${preview}.preview.gitpod-dev.com. --type=A --zone=preview-gitpod-dev-com`)
exec(`gcloud dns record-sets delete prometheus-${preview}.preview.gitpod-dev.com. --type=TXT --zone=preview-gitpod-dev-com`)
exec(`gcloud dns record-sets delete grafana-${preview}.preview.gitpod-dev.com. --type=A --zone=preview-gitpod-dev-com`)
exec(`gcloud dns record-sets delete grafana-${preview}.preview.gitpod-dev.com. --type=TXT --zone=preview-gitpod-dev-com`)
return
}

Expand Down

0 comments on commit e6cae92

Please sign in to comment.