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

ci: support http on in-cluster git server #316

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.build
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ build-git-server:

# NOTE: when updating the git-server version, update
# e2e/nomostest/git-server.go to reflect the version change
E2E_TEST_IMAGE_HTTP_GIT_SERVER_TAG := v1.0.0
E2E_TEST_IMAGE_HTTP_GIT_SERVER_TAG := v1.1.0
E2E_TEST_IMAGE_HTTP_GIT_SERVER := gcr.io/stolos-dev/http-git-server:$(E2E_TEST_IMAGE_HTTP_GIT_SERVER_TAG)
# Builds the container used by e2e tests to test git over HTTPS.
build-http-git-server:
Expand Down
8 changes: 6 additions & 2 deletions e2e/nomostest/git-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const testGitNamespace = "config-management-system-test"
const testGitServer = "test-git-server"
const testGitServerImage = "gcr.io/stolos-dev/git-server:v1.0.0"
const testGitHTTPServer = "http-git-server"
const testGitHTTPServerImage = "gcr.io/stolos-dev/http-git-server:v1.0.0"
const testGitHTTPServerImage = "gcr.io/stolos-dev/http-git-server:v1.1.0"

func testGitServerSelector() map[string]string {
// Note that maps are copied by reference into objects.
Expand Down Expand Up @@ -202,6 +202,7 @@ func gitService() *corev1.Service {
)
service.Spec.Selector = testGitServerSelector()
service.Spec.Ports = []corev1.ServicePort{{Name: "ssh", Port: 22},
{Name: "http", Port: 80},
{Name: "https", Port: 443}}
return service
}
Expand Down Expand Up @@ -243,7 +244,10 @@ func gitDeployment() *appsv1.Deployment {
{
Name: testGitHTTPServer,
Image: testGitHTTPServerImage,
Ports: []corev1.ContainerPort{{ContainerPort: 443}},
Ports: []corev1.ContainerPort{
{ContainerPort: 80},
{ContainerPort: 443},
},
VolumeMounts: []corev1.VolumeMount{
{Name: "repos", MountPath: "/git-server/repos"},
{Name: "ssl-cert", MountPath: "/etc/nginx/ssl"},
Expand Down
1 change: 1 addition & 0 deletions test/docker/http-git-server/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ events {}

http {
server {
listen 80;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/nginx/ssl/server.crt;
Expand Down