Skip to content

Commit

Permalink
run jenkins maven build in memory constrained pod
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Minter committed Dec 18, 2017
1 parent 549e0f0 commit e986a9e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/extended/builds/pipeline.go
Expand Up @@ -14,6 +14,8 @@ import (
g "github.com/onsi/ginkgo"
o "github.com/onsi/gomega"

v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

buildapi "github.com/openshift/origin/pkg/build/apis/build"
Expand Down Expand Up @@ -151,6 +153,25 @@ var _ = g.Describe("[Feature:Builds][Slow] openshift pipeline build", func() {
g.By("waiting for builder service account")
err := exutil.WaitForBuilderAccount(oc.KubeClient().Core().ServiceAccounts(oc.Namespace()))
o.Expect(err).NotTo(o.HaveOccurred())

// additionally ensure that the build works in a memory constrained
// environment
_, err = oc.AdminKubeClient().Core().LimitRanges(oc.Namespace()).Create(&v1.LimitRange{
ObjectMeta: metav1.ObjectMeta{
Name: "limitrange",
},
Spec: v1.LimitRangeSpec{
Limits: []v1.LimitRangeItem{
{
Type: v1.LimitTypeContainer,
Default: v1.ResourceList{
v1.ResourceMemory: resource.MustParse("512Mi"),
},
},
},
},
})
o.Expect(err).NotTo(o.HaveOccurred())
})

g.AfterEach(func() {
Expand Down

0 comments on commit e986a9e

Please sign in to comment.