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

chore(actions/common.go): update filename for e2e chart #105

Merged
merged 1 commit into from
Jun 28, 2016
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
2 changes: 1 addition & 1 deletion actions/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ var (
Files: []string{
"README.md",
"Chart.yaml",
filepath.Join("tpl", "workflow-e2e-pod.yaml"),
filepath.Join("tpl", "generate_params.toml"),
},
}
)
Expand Down
18 changes: 9 additions & 9 deletions actions/helm_stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ func helmStage(ghClient *github.Client, c *cli.Context, helmChart helmChart) {
log.Fatalf("Error creating dir %s (%s)", filepath.Join(stagingDir, "tpl"), err)
}

// stage 'tpl/generate_params.toml' with latest git shas for each component
defaultParamsComponentAttrs := genParamsComponentAttrs{
Org: c.GlobalString(OrgFlag),
PullPolicy: c.GlobalString(PullPolicyFlag),
Tag: c.GlobalString(TagFlag),
}
paramsComponentMap := getParamsComponentMap(ghClient, defaultParamsComponentAttrs, helmChart.Template, c.GlobalString(RefFlag))
generateParams(ourFS, stagingDir, paramsComponentMap, helmChart)

Copy link
Member Author

@vdice vdice Jun 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arschles I updated this PR with this order change. Since we now track generate_params.toml for e2e, we need to first generate it and then run updateFilesWithRelease -- let me know if you have questions/concerns with this.

Again, the hope is that this logic will be removed/refactored in #11

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vdice makes sense & looks good. thanks!

// gather helmChart.Files from GitHub needing release string updates
ghFiles, err := downloadFiles(ghClient, org, repo, &opt, helmChart)
if err != nil {
Expand All @@ -42,15 +51,6 @@ func helmStage(ghClient *github.Client, c *cli.Context, helmChart helmChart) {
if err := updateFilesWithRelease(ourFP, ourFS, deisRelease, stagingDir); err != nil {
log.Fatalf("Error updating files with release '%s' (%s)", deisRelease.Short, err)
}

// stage 'tpl/generate_params.toml' with latest git shas for each component
defaultParamsComponentAttrs := genParamsComponentAttrs{
Org: c.GlobalString(OrgFlag),
PullPolicy: c.GlobalString(PullPolicyFlag),
Tag: c.GlobalString(TagFlag),
}
paramsComponentMap := getParamsComponentMap(ghClient, defaultParamsComponentAttrs, helmChart.Template, c.GlobalString(RefFlag))
generateParams(ourFS, stagingDir, paramsComponentMap, helmChart)
}

func createDir(fs sys.FS, dirName string) error {
Expand Down