Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define Go version files for etcdadm bootstrap provider and controller #2977

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion projects/aws/image-builder/builder/artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"net/url"
"os"
"path/filepath"
k8syaml "sigs.k8s.io/yaml"
"strings"

k8syaml "sigs.k8s.io/yaml"

releasev1 "github.com/aws/eks-anywhere/release/api/v1alpha1"
eksDreleasev1 "github.com/aws/eks-distro-build-tooling/release/api/v1alpha1"
)
Expand Down
4 changes: 2 additions & 2 deletions projects/aws/image-builder/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (b *BuildOptions) BuildImage() {
b.FilesConfig.FilesAnsibleConfig.CustomRoleNames = additionalFilesCustomRole
b.FilesConfig.FilesAnsibleConfig.AnsibleExtraVars = fmt.Sprintf("@%s", additionalFilesList)

log.Println("Marshaling files ansible config to JSON")
log.Println("Marshalling files ansible config to JSON")
filesAnsibleConfig, err := json.Marshal(b.FilesConfig.FilesAnsibleConfig)
if err != nil {
log.Fatalf("Error marshalling files ansible config data: %v", err)
Expand All @@ -93,7 +93,7 @@ func (b *BuildOptions) BuildImage() {
log.Fatalf("Error writing additional files config file to Packer config directory: %v", err)
}

log.Println("Marshaling additional files list to YAML")
log.Println("Marshalling additional files list to YAML")
if b.AMIConfig != nil {
for index, file := range b.FilesConfig.AdditionalFilesList {
for _, defaultFile := range DefaultAMIAdditionalFiles {
Expand Down
2 changes: 1 addition & 1 deletion projects/aws/image-builder/builder/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func downloadFile(path, url string) error {
// Create the leading directories if it doesnt exists
dirs := filepath.Dir(path)
if _, err := os.Stat(dirs); os.IsNotExist(err) {
os.MkdirAll(dirs, 0755)
os.MkdirAll(dirs, 0o755)
}

// Create the file
Expand Down
2 changes: 1 addition & 1 deletion projects/aws/image-builder/builder/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func TestDownloadFile(t *testing.T) {
t.Fatalf("Error getting current working dir: %v", err)
}
testDir := filepath.Join(cwd, "testdata")
os.MkdirAll(testDir, 0755)
os.MkdirAll(testDir, 0o755)
testcases := []struct {
name string
path string
Expand Down
3 changes: 2 additions & 1 deletion projects/aws/image-builder/cmd/downloadartifacts.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package cmd

import (
"github.com/spf13/cobra"
"log"

"github.com/spf13/cobra"
)

var downloadArtifactsCmd = &cobra.Command{
Expand Down
8 changes: 8 additions & 0 deletions tools/version-tracker/pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ var (

// ProjectGoVersionSourceOfTruth is the mapping of project name to Go version source of truth files configuration.
ProjectGoVersionSourceOfTruth = map[string]types.GoVersionSourceOfTruth{
"aws/etcdadm-bootstrap-provider": {
SourceOfTruthFile: "go.mod",
GoVersionSearchString: `go (1\.\d\d)`,
},
"aws/etcdadm-controller": {
SourceOfTruthFile: "go.mod",
GoVersionSearchString: `go (1\.\d\d)`,
},
"brancz/kube-rbac-proxy": {
SourceOfTruthFile: ".github/workflows/build.yml",
GoVersionSearchString: `go-version: '(1\.\d\d)\.\d+'`,
Expand Down