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

Introduce Context type #42

Merged
merged 5 commits into from
Nov 15, 2023
Merged

Conversation

atanasdinov
Copy link
Contributor

@atanasdinov atanasdinov commented Nov 15, 2023

  • Introduces a new Context type
  • Context stores all necessary information required by planned components structure
  • Removing dir handling from Builder making it only responsible for actually building the image and allowing more robust testing (dropping the stateful .prepareDir() calls) and further combustion decoupling
  • Drops BuildConfig type

pkg/build/raw.go Outdated
@@ -79,7 +79,7 @@ func (b *Builder) writeModifyScript() error {
}

func (b *Builder) createModifyCommand() *exec.Cmd {
scriptPath := filepath.Join(b.buildConfig.BuildDir, modifyScriptName)
scriptPath := filepath.Join(b.dirStructure.BuildDir, modifyScriptName)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This could have been a hard to find bug since b.buildConfig.BuildDir is the user provided value (which could be empty) and not b.eibBuildDir.

pkg/build/dir_structure.go Outdated Show resolved Hide resolved
pkg/build/dir_structure.go Outdated Show resolved Hide resolved
@atanasdinov atanasdinov changed the title Decouple dir structure from Builder lifecycle Decouple dir structure from Builder type Nov 15, 2023
@atanasdinov atanasdinov marked this pull request as ready for review November 15, 2023 12:22
Signed-off-by: Atanas Dinov <[email protected]>
@atanasdinov atanasdinov changed the title Decouple dir structure from Builder type Introduce Context type Nov 15, 2023
@atanasdinov atanasdinov merged commit 52147f3 into suse-edge:main Nov 15, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants