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

add command skaffold inspect build-env modify googleCloudBuild #5935

Merged
merged 3 commits into from
Jun 7, 2021

Conversation

gsquared94
Copy link
Contributor

@gsquared94 gsquared94 commented Jun 3, 2021

Related: #5758
Description

add command skaffold inspect build-env modify googleCloudBuild to modify the build environment definitions of profiles and default pipelines.

User facing changes (remove if N/A)

❯ skaffold inspect build-env modify googleCloudBuild --help
Modify an existing GoogleCloudBuild build environment definition.
Without the '--profile' flag, the default pipeline's build environment
definition is modified. With the '--profile' flag it'll modify the build
environment definition for all profile pipelines that match the given profile
name. 
In these respective scenarios, it will fail if the build env definition for the
default pipeline or the named profile is not GoogleCloudBuild. To create a new
build environment definition use 'skaffold inspect build-env add' command
instead. 
Use the '--module' filter to specify the individual module to target. Otherwise,
it'll be applied to all modules defined in the target file. Also, with the
'--profile' flag if the target config imports other configs as dependencies,
then it'll modify profiles that match the given name in all imported configs

Examples:
  # Modify an existing profile named 'gcb' targeting the builder
'googleCloudBuild' against the GCP project ID '1234'.
  skaffold inspect build-env modify googleCloudBuild --profile gcb --projectID
1234 -f skaffold.yaml

Options:
      --concurrency=-1: number of artifacts to build concurrently. 0 means
"no-limit"
      --diskSizeGb=0: Disk size of the VM that runs the build
      --machineType='': Type of VM that runs the build
      --projectId='': ID of the Cloud Platform Project.
      --timeout='': Build timeout (in seconds)

Usage:
  skaffold inspect build-env modify googleCloudBuild [flags] [options]

Use "skaffold options" for a list of global command-line options (applies to all
commands).

@gsquared94 gsquared94 requested a review from a team as a code owner June 3, 2021 16:35
@gsquared94 gsquared94 requested a review from MarlonGamez June 3, 2021 16:35
@google-cla google-cla bot added the cla: yes label Jun 3, 2021
@codecov
Copy link

codecov bot commented Jun 3, 2021

Codecov Report

Merging #5935 (986c86b) into master (20e00dc) will increase coverage by 0.09%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5935      +/-   ##
==========================================
+ Coverage   70.57%   70.66%   +0.09%     
==========================================
  Files         457      458       +1     
  Lines       17534    17609      +75     
==========================================
+ Hits        12374    12443      +69     
- Misses       4246     4251       +5     
- Partials      914      915       +1     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/inspect_modules.go 87.50% <0.00%> (ø)
cmd/skaffold/app/cmd/inspect_profiles.go 92.30% <0.00%> (ø)
pkg/skaffold/inspect/types.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_build_env.go 59.85% <78.78%> (+4.02%) ⬆️
pkg/skaffold/inspect/buildEnv/modify_gcb.go 81.25% <81.25%> (ø)
pkg/skaffold/inspect/errors.go 56.09% <85.18%> (+56.09%) ⬆️
cmd/skaffold/app/cmd/inspect.go 100.00% <100.00%> (ø)
pkg/skaffold/docker/image.go 79.53% <0.00%> (+1.39%) ⬆️
pkg/skaffold/inspect/buildEnv/add_gcb.go 78.72% <0.00%> (+4.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 20e00dc...986c86b. Read the comment docs.

Copy link
Contributor

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

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

I feel, just having this command is not sufficient.
We also need to provide a way for IDEs to detect if googleCloudBuild profile exists.

$skaffold inspect build-env list googleCloudBuild
gcb-dev
gcb-prod
gcb-staging

$skaffold inspect build-env modify googleCloudBuild -p gcb.

However, we can do this in another PR

@gsquared94
Copy link
Contributor Author

gsquared94 commented Jun 3, 2021

I feel, just having this command is not sufficient.
We also need to provide a way for IDEs to detect if googleCloudBuild profile exists.

$skaffold inspect build-env list googleCloudBuild
gcb-dev
gcb-prod
gcb-staging

$skaffold inspect build-env modify googleCloudBuild -p gcb.

However, we can do this in another PR

We have that in:

 skaffold inspect profiles list --build-env googleCloudBuild

@gsquared94 gsquared94 enabled auto-merge (squash) June 4, 2021 12:57
pkg/skaffold/inspect/errors.go Outdated Show resolved Hide resolved
proto/enums/enums.proto Outdated Show resolved Hide resolved
proto/enums/enums.proto Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants