-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1245 from pivotal/fix-e2e
Fix e2e
- Loading branch information
Showing
4 changed files
with
78 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,14 +114,15 @@ func (c *config) makeGitBasicAuthSecret(secretName, namespace string) (*corev1.S | |
} | ||
|
||
// convert `github.com/org/repo` -> `https://github.com/org/repo.git` | ||
repo := fmt.Sprintf("https://%v.git", c.gitSourcePrivateRepo) | ||
repo := fmt.Sprintf("https://%v", c.gitSourcePrivateRepo) | ||
host := strings.Split(c.gitSourcePrivateRepo, "/")[0] | ||
|
||
return &corev1.Secret{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: secretName, | ||
Namespace: namespace, | ||
Annotations: map[string]string{ | ||
v1alpha2.GITSecretAnnotationPrefix: "https://github.com", | ||
v1alpha2.GITSecretAnnotationPrefix: fmt.Sprintf("https://%v", host), | ||
}, | ||
}, | ||
Data: map[string][]byte{ | ||
|
@@ -138,15 +139,16 @@ func (c *config) makeGitSSHAuthSecret(secretName, namespace string) (*corev1.Sec | |
} | ||
|
||
// convert `github.com/org/repo` -> `[email protected]:org/repo.git` | ||
repo := fmt.Sprintf("git@%v.git", c.gitSourcePrivateRepo) | ||
repo := fmt.Sprintf("git@%v", c.gitSourcePrivateRepo) | ||
repo = strings.Replace(repo, "/", ":", 1) | ||
host := strings.Split(c.gitSourcePrivateRepo, "/")[0] | ||
|
||
return &corev1.Secret{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: secretName, | ||
Namespace: namespace, | ||
Annotations: map[string]string{ | ||
v1alpha2.GITSecretAnnotationPrefix: "git@github.com", | ||
v1alpha2.GITSecretAnnotationPrefix: fmt.Sprintf("git@%v", host), | ||
}, | ||
}, | ||
Data: map[string][]byte{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters