Skip to content

Commit 1985168

Browse files
Merge pull request #38 from marklogic/feature/CLD-613
CLD-613: Stabilize Jenkins Pipeline
2 parents a883985 + a48e8a1 commit 1985168

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

Jenkinsfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,10 @@ pipeline {
155155
skipStagesAfterUnstable()
156156
}
157157
triggers {
158-
parameterizedCron( env.BRANCH_NAME == 'develop' ? '''00 03 * * * % ML_SERVER_BRANCH=develop-10.0
159-
00 04 * * * % ML_SERVER_BRANCH=develop''' : '')
158+
parameterizedCron( env.BRANCH_NAME == 'develop' ? '''00 04 * * *''' : '')
160159
}
161160
environment {
162-
timeStamp = sh(returnStdout: true, script: 'date +%Y%m%d').trim()
161+
timeStamp = sh(returnStdout: true, script: "date +%Y%m%d -d '-5 hours'").trim()
163162
dockerRegistry = 'ml-docker-dev.marklogic.com'
164163
dockerRepository = "${dockerRegistry}/marklogic/marklogic-server-centos"
165164
dockerVersion = "${ML_VERSION}-${timeStamp}-centos-1.0.0"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ go 1.17
55
require (
66
github.com/gruntwork-io/terratest v0.40.6
77
github.com/stretchr/testify v1.7.0
8+
github.com/tidwall/gjson v1.14.3
89
github.com/xinsnake/go-http-digest-auth-client v0.6.0
910
k8s.io/api v0.23.0
1011
)
@@ -43,7 +44,6 @@ require (
4344
github.com/pquerna/otp v1.2.0 // indirect
4445
github.com/russross/blackfriday/v2 v2.1.0 // indirect
4546
github.com/spf13/pflag v1.0.5 // indirect
46-
github.com/tidwall/gjson v1.14.3 // indirect
4747
github.com/tidwall/match v1.1.1 // indirect
4848
github.com/tidwall/pretty v1.2.0 // indirect
4949
github.com/urfave/cli v1.22.2 // indirect

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,12 @@ github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG
758758
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
759759
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
760760
github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
761+
github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw=
762+
github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
763+
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
764+
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
765+
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
766+
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
761767
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
762768
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
763769
github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w=

makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ lint:
8181
## Options:
8282
## * [dockerImage] optional. default is marklogicdb/marklogic-db:latest. Example: dockerImage=marklogic-centos/marklogic-server-centos:10-internal
8383
## * [saveOutput] optional. Save the output to a xml file. Example: saveOutput=true
84-
## * [jenkins] optional. Jenkins specific enviroment setting, Example: jenkins=true
85-
8684
.PHONY: e2e-test
8785
e2e-test: prepare
8886
@echo "=====Installing minikube cluster"
@@ -92,7 +90,7 @@ e2e-test: prepare
9290
minikube image load $(dockerImage)
9391

9492
@echo "=====Running e2e tests"
95-
cd test; $(if $(saveOutput),gotestsum --junitfile test_results/e2e-tests.xml ./e2e/... -count=1 -timeout 30m, go test -v -count=1 ./e2e/...)
93+
$(if $(saveOutput),gotestsum --junitfile test_results/e2e-tests.xml ./test/e2e/... -count=1 -timeout 30m, go test -v -count=1 ./test/e2e/...)
9694

9795
@echo "=====Delete minikube cluster"
9896
minikube delete
@@ -105,7 +103,7 @@ e2e-test: prepare
105103
.PHONY: template-test
106104
template-test: prepare
107105
@echo "=====Running template tests"
108-
cd test; $(if $(saveOutput),gotestsum --junitfile test_results/testplate-tests.xml ./template/... -count=1, go test -v -count=1 ./test/template/...)
106+
$(if $(saveOutput),gotestsum --junitfile test_results/testplate-tests.xml ./test/template/... -count=1, go test -v -count=1 ./test/template/...)
109107

110108
#***************************************************************************
111109
# test

test/e2e/separate_nodes_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ func TestSeparateEDnode(t *testing.T) {
6868
t.Logf("====Installing Helm Chart" + dnodeReleaseName)
6969
helm.Install(t, options, helmChartPath, dnodeReleaseName)
7070

71-
podName := dnodeReleaseName + "-marklogic-0"
71+
dnodePodName := dnodeReleaseName + "-marklogic-0"
7272

7373
// wait until the pod is in Ready status
74-
k8s.WaitUntilPodAvailable(t, kubectlOptions, podName, 10, 20*time.Second)
74+
k8s.WaitUntilPodAvailable(t, kubectlOptions, dnodePodName, 10, 20*time.Second)
7575

7676
time.Sleep(10 * time.Second)
7777
tunnel := k8s.NewTunnel(
78-
kubectlOptions, k8s.ResourceTypePod, podName, 8002, 8002)
78+
kubectlOptions, k8s.ResourceTypePod, dnodePodName, 8002, 8002)
7979
defer tunnel.Close()
8080
tunnel.ForwardPort(t)
8181
hostsEndpoint := fmt.Sprintf("http://%s/manage/v2/hosts?format=json", tunnel.Endpoint())
@@ -121,7 +121,7 @@ func TestSeparateEDnode(t *testing.T) {
121121
enodePodName0 := enodeReleaseName + "-marklogic-0"
122122

123123
// wait until the first enode pod is in Ready status
124-
k8s.WaitUntilPodAvailable(t, kubectlOptions, enodePodName0, 15, 20*time.Second)
124+
k8s.WaitUntilPodAvailable(t, kubectlOptions, enodePodName0, 45, 20*time.Second)
125125

126126
groupEndpoint := fmt.Sprintf("http://%s/manage/v2/groups", tunnel.Endpoint())
127127
t.Logf(`Endpoint: %s`, groupEndpoint)
@@ -146,7 +146,7 @@ func TestSeparateEDnode(t *testing.T) {
146146
enodePodName1 := enodeReleaseName + "-marklogic-1"
147147

148148
// wait until the second enode pod is in Ready status
149-
k8s.WaitUntilPodAvailable(t, kubectlOptions, enodePodName1, 15, 20*time.Second)
149+
k8s.WaitUntilPodAvailable(t, kubectlOptions, enodePodName1, 45, 20*time.Second)
150150

151151
enodeEndpoint := fmt.Sprintf("http://%s/manage/v2/groups/enode?format=json", tunnel.Endpoint())
152152
t.Logf(`Endpoint: %s`, enodeEndpoint)

0 commit comments

Comments
 (0)