Skip to content

Commit

Permalink
Revert "CLOUDP-192880: Make clean CLI tool (#1149)" (#1153)
Browse files Browse the repository at this point in the history
This reverts commit 59ecd70.
  • Loading branch information
josvazg committed Oct 5, 2023
1 parent 3431fcf commit 45c18c8
Show file tree
Hide file tree
Showing 29 changed files with 665 additions and 127 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vpc
package main

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vpc
package main

import (
"context"
Expand Down
42 changes: 42 additions & 0 deletions .github/actions/clean-vpc/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module actions/cleanup-vpc

go 1.21

require (
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
github.com/Azure/go-autorest/autorest/azure/auth v0.5.12
google.golang.org/api v0.125.0
)

require (
cloud.google.com/go/compute v1.19.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.28 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.5 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/golang-jwt/jwt/v4 v4.3.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.10.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
google.golang.org/grpc v1.55.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
)
234 changes: 234 additions & 0 deletions .github/actions/clean-vpc/go.sum

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tools/clean/vpc/vpc.go → .github/actions/clean-vpc/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package vpc
package main

import (
"context"
"errors"
"fmt"
"log"
"os"
)
Expand All @@ -14,7 +15,7 @@ const (
azureVPCName = "test-vnet"
)

func CleanVPCs() {
func main() {
err := setGCPCredentials()
if err != nil {
log.Fatal(err)
Expand Down Expand Up @@ -42,10 +43,9 @@ func CleanVPCs() {
log.Println("Not all Azure VPC was deleted")
}
if allErr != nil {
log.Println("ERRORS: ", allErr)
fmt.Println("ERRORS: ", allErr)
}
if !azureOk || !gcpOk {
os.Exit(1)
}
log.Printf("VPC cleanups completed OK")
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pe
package main

import (
"context"
Expand Down
45 changes: 45 additions & 0 deletions .github/actions/cleanup-pe/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module actions/cleanup-pe

go 1.21

require (
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
github.com/Azure/go-autorest/autorest/azure/auth v0.5.12
github.com/aws/aws-sdk-go v1.44.274
google.golang.org/api v0.125.0
)

require (
cloud.google.com/go/compute v1.19.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.28 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.5 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/golang-jwt/jwt/v4 v4.3.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.10.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
google.golang.org/grpc v1.55.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit 45c18c8

Please sign in to comment.