Skip to content

Commit

Permalink
Update commands
Browse files Browse the repository at this point in the history
Signed-off-by: Razieh Behjati <razieh@google.com>
  • Loading branch information
rbehjati committed Dec 15, 2022
1 parent 18a8f38 commit 42154bd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions internal/builders/docker/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ func DryRunCmd(check func(error)) *cobra.Command {
Use: "dry-run [FLAGS]",
Short: "Generates and stores a JSON-formatted BuildDefinition based on the input arguments.",
Run: func(cmd *cobra.Command, args []string) {
// TODO(#1191): Parse the input arguments into an instance of BuildDefinition.
config, err := pkg.NewDockerBuildConfig(sourceRepo, gitCommitHash, builderImage, buildConfigPath)
check(err)
log.Printf("The config is: %v\n", config)

// TODO(#1191): Create an instance of BuildDefinition from config.
bd := &pkg.BuildDefinition{}
check(writeBuildDefinitionToFile(*bd, buildDefinitionPath))
},
Expand Down Expand Up @@ -86,7 +90,11 @@ func BuildCmd(check func(error)) *cobra.Command {
Use: "build [FLAGS]",
Short: "Builds the artifacts using the build config, source repo, and the builder image.",
Run: func(cmd *cobra.Command, args []string) {
// TODO(#1191): Set up build state and build the artifact.
config, err := pkg.NewDockerBuildConfig(sourceRepo, gitCommitHash, builderImage, buildConfigPath)
check(err)
log.Printf("The config is: %v\n", config)

// TODO(#1191): Set up build state using config, and build the artifact.
artifacts := "To be implemented"
log.Printf("Generated artifacts are: %v\n", artifacts)
},
Expand Down

0 comments on commit 42154bd

Please sign in to comment.