Skip to content

Commit a635373

Browse files
committed
Move GitLocation into Git project source
Moves GitLocation in DockerfileImage Image component type under the Git struct to make clear that this field is intended only for use when specifying a git repo. (Files not regenerated for readability) Signed-off-by: Angel Misevski <[email protected]>
1 parent 13248b5 commit a635373

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

pkg/apis/workspaces/v1alpha2/component_image_dockerfile.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ type DockerfileImage struct {
2323
// it is recommended to always specify the `regsitryURL` when `Id` is used.
2424
// +optional
2525
RegistryUrl string `json:"registryUrl,omitempty"`
26-
27-
// Location of the Dockerfile in the Git repository when using git as Dockerfile src.
28-
// +optional
29-
GitLocation string `json:"gitLocation,omitempty"`
3026
}
3127

3228
// +union
@@ -48,7 +44,7 @@ type DockerfileLocation struct {
4844

4945
// Project's Git source
5046
// +optional
51-
Git *GitProjectSource `json:"git,omitempty"`
47+
Git *DockerfileGitProjectSource `json:"git,omitempty"`
5248
}
5349

5450
type Dockerfile struct {
@@ -66,3 +62,11 @@ type Dockerfile struct {
6662
// +optional
6763
RootRequired bool `json:"rootRequired,omitempty"`
6864
}
65+
66+
type DockerfileGitProjectSource struct {
67+
GitProjectSource `json:",inline"`
68+
69+
// Location of the Dockerfile in the Git repository when using git as Dockerfile src.
70+
// +optional
71+
GitLocation string `json:"gitLocation,omitempty"`
72+
}

0 commit comments

Comments
 (0)