Skip to content

Commit 3792669

Browse files
authored
Merge pull request #281 from marklogic/release/2.0.0
Release 2.0.0
2 parents c2bb142 + 7f1f4c2 commit 3792669

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+4557
-1359
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.vscode
2-
test/test_results
2+
test/test_results
3+
.DS_Store

CONTRIBUTING.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Contributing to MarkLogic-kubernetes
2+
3+
Thank you for your interest in contributing to this project! We welcome contributions from the community to make this project better.
4+
5+
- [Found an Issue](#found-an-issue)
6+
- [Want a Feature](#want-a-feature)
7+
- [Getting Started](#getting-started)
8+
- [PR management](#pr-management)
9+
10+
## Found an Issue?
11+
12+
If you find a bug in the source code or a mistake in the documentation, you can help us by submitting an issue
13+
to our [GitHub Issue Tracker][Issue Tracker]. If you'd like to submit a feature enhancement, please first create an
14+
issue with your proposed idea so that we can start a discussion about the problem you want to solve and what the best
15+
solution would be.
16+
17+
## Want a Feature?
18+
19+
You can request a new feature by submitting an issue to our [GitHub Issue Tracker][Issue Tracker]. If you
20+
would like to implement a new feature then first create a new issue and discuss it with one of our
21+
project maintainers.
22+
23+
## Getting Started
24+
25+
To get started with contributing, please follow these steps:
26+
27+
1. Fork the repository and clone it to your local machine.
28+
2. Install the necessary dependencies.
29+
3. Create a new branch for your changes.
30+
4. Make your desired changes to the codebase.
31+
5. Test your changes thoroughly.
32+
6. Tests can be done using the test framework. See [test folder](./test/) and [Makefile](makefile)
33+
34+
## PR management
35+
36+
Created PR will not be merge as is.
37+
The MarkLogic kubernetes team will use the PRs for "inspiration" but not merge the changes in directly. They may rewrite the code as they like, incorporating the submitted changes into their own code.
38+
39+
**Important:** Please open an issue in the [Issue Tracker][] and get your proposed changes pre-approved by at least one of the project maintainers before you start coding. Nothing is more frustrating than seeing your hard work go to waste because your vision does not align with that of the project maintainers.
40+
41+
[Issue Tracker]: https://github.com/marklogic/marklogic-kubernetes/issues

Jenkinsfile

+25-29
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ void resultNotification(message) {
104104
} else {
105105
emailList = params.emailList
106106
}
107-
jira_link = "https://project.marklogic.com/jira/browse/${JIRA_ID}"
108-
email_body = "<b>Jenkins pipeline for</b> ${env.JOB_NAME} <br><b>Build Number: </b>${env.BUILD_NUMBER} <br><br><b>Lint Output: </b><br><pre><code>${LINT_OUTPUT}</code></pre><br><br><b>Scan Output: </b><br><pre><code>${SCAN_OUTPUT}</code></pre><br><br><b>Build URL: </b><br>${env.BUILD_URL}"
109-
jira_email_body = "${email_body} <br><br><b>Jira URL: </b><br>${jira_link}"
107+
jira_link = "https://progresssoftware.atlassian.net/browse/${JIRA_ID}"
108+
email_body = "<b>Jenkins pipeline for</b> ${env.JOB_NAME} <br><b>Build Number: </b>${env.BUILD_NUMBER} <br><br><b>Lint Output: </b><br><pre><code>${LINT_OUTPUT}</code></pre><br><br><b>Scan Output: </b><br><pre><code>${SCAN_OUTPUT}</code></pre><br><br><b>Build URL: </b><br><a href='${env.BUILD_URL}'>${env.BUILD_URL}</a>"
109+
jira_email_body = "${email_body} <br><br><b>Jira URL: </b><br><a href='${jira_link}'>${jira_link}</a>"
110110

111111
if (JIRA_ID) {
112112
def comment = [ body: "Jenkins pipeline build result: ${message}" ]
@@ -146,17 +146,6 @@ void publishTestResults() {
146146
archiveArtifacts artifacts: '**/test/test_results/*.xml', allowEmptyArchive: true
147147
}
148148

149-
String getVersionDiv(mlVersion) {
150-
switch (mlVersion) {
151-
case '10.0':
152-
return '-'
153-
case '9.0':
154-
return '-'
155-
default:
156-
return '.'
157-
}
158-
}
159-
160149
pipeline {
161150
agent {
162151
label {
@@ -169,29 +158,25 @@ pipeline {
169158
skipStagesAfterUnstable()
170159
}
171160
triggers {
172-
parameterizedCron( env.BRANCH_NAME == 'develop' ? '''00 04 * * * % IMAGE_SCAN=true''' : '')
161+
parameterizedCron( env.BRANCH_NAME == 'develop' ? '''00 04 * * * % IMAGE_SCAN=true;HELM_UPGRADE_TESTS=true;HC_TESTS=true''' : '')
173162
}
174163
environment {
175-
//timeStamp = sh(returnStdout: true, script: "date +%Y%m%d -d '-5 hours'").trim()
176-
timeStamp = 'nightly'
177164
dockerRegistry = 'ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com'
178-
dockerRepository = "${dockerRegistry}/marklogic/marklogic-server-centos"
179-
dockerVerDivider = getVersionDiv(params.ML_VERSION)
180-
prevDockerVerDivider = getVersionDiv(params.PREV_ML_VERSION)
181-
dockerVersion = "${ML_VERSION}${dockerVerDivider}${timeStamp}-centos-${dockerReleaseVer}"
182-
prevDockerVersion = "${PREV_ML_VERSION}${prevDockerVerDivider}${timeStamp}-centos-${prevDockerReleaseVer}"
165+
dockerRepository = "${dockerRegistry}/marklogic/marklogic-server-${params.dockerImageType}"
183166
}
184167

185168
parameters {
186-
string(name: 'emailList', defaultValue: emailList, description: 'List of email for build notification', trim: true)
187-
choice(name: 'ML_VERSION', choices: '11.2\n12.0\n10.0', description: 'MarkLogic version. used to pick appropriate docker image')
169+
choice(name: 'dockerImageType', choices: 'ubi-rootless\nubi\ncentos', description: 'Platform type for Docker image')
170+
string(name: 'dockerVersion', defaultValue: 'latest-11', description: 'Docker tag to use for tests. (e.g. 11.2.nightly-ubi-rootless-1.1.2) Has to correspond with dockerImageType.', trim: true)
171+
string(name: 'prevDockerVersion', defaultValue: 'latest-10', description: 'Previous Docker version for MarkLogic upgrade tests. (e.g. 10.0-10.2-centos-1.1.2) Has to correspond with dockerImageType.', trim: true)
172+
choice(name: 'K8_VERSION', choices: 'v1.28.10\nv1.29.5\nv1.27.14\nv1.26.15\nv1.25.16\nv1.24.17', description: 'Test Kubernetes version.')
188173
booleanParam(name: 'KUBERNETES_TESTS', defaultValue: true, description: 'Run kubernetes tests')
174+
string(name: 'KUBERNETES_TEST_SELECTION', defaultValue: '...', description: 'Pick one test to run. (e.g. tls_test.go) ... will run all tests.', trim: true)
189175
booleanParam(name: 'HC_TESTS', defaultValue: false, description: 'Run Hub Central E2E UI tests (takes about 3 hours)')
190176
booleanParam(name: 'IMAGE_SCAN', defaultValue: false, description: 'Find and scan dependent Docker images for security vulnerabilities')
191-
string(name: 'dockerReleaseVer', defaultValue: '1.1.2', description: 'Current Docker version. (e.g. 1.0.1)', trim: true)
192-
choice(name: 'PREV_ML_VERSION', choices: '10.0\n9.0\n11.2', description: 'Previous MarkLogic version for MarkLogic upgrade tests')
193-
string(name: 'prevDockerReleaseVer', defaultValue: '1.1.2', description: 'Previous Docker version for MarkLogic upgrade tests. (e.g. 1.0.1)', trim: true)
194-
choice(name: 'K8_VERSION', choices: 'v1.25.8\nv1.26.3\nv1.24.12\nv1.23.17', description: 'Test Kubernetes version. (e.g. v1.25.8)')
177+
booleanParam(name: 'HELM_UPGRADE_TESTS', defaultValue: false, description: 'Run Helm upgrade in E2E tests (runs nightly on develop)')
178+
string(name: 'InitialChartVersion', defaultValue: '1.1.2', description: 'Helm Chart Version to use for upgrade tests. (e.g. 1.1.2)', trim: true)
179+
string(name: 'emailList', defaultValue: emailList, description: 'List of email for build notification', trim: true)
195180
}
196181

197182
stages {
@@ -222,7 +207,17 @@ pipeline {
222207
}
223208
steps {
224209
sh """
225-
export MINIKUBE_HOME=/space; export KUBECONFIG=/space/.kube-config; export GOPATH=/space/go; make test dockerImage=${dockerRepository}:${dockerVersion} prevDockerImage=${dockerRepository}:${prevDockerVersion} kubernetesVersion=${params.K8_VERSION} saveOutput=true minikubeMemory=20gb
210+
export MINIKUBE_HOME=/space; export KUBECONFIG=/space/.kube-config; export GOPATH=/space/go; make test dockerImage=${dockerRepository}:${dockerVersion} prevDockerImage=${dockerRepository}:${prevDockerVersion} kubernetesVersion=${params.K8_VERSION} saveOutput=true minikubeMemory=20gb testSelection=${params.KUBERNETES_TEST_SELECTION}
211+
"""
212+
}
213+
}
214+
stage('Kubernetes-Run-Upgrade-Tests') {
215+
when {
216+
expression { return params.HELM_UPGRADE_TESTS }
217+
}
218+
steps {
219+
sh """
220+
export MINIKUBE_HOME=/space; export KUBECONFIG=/space/.kube-config; export GOPATH=/space/go; export upgradeTest=true; export initialChartVersion=${params.InitialChartVersion}; make upgrade-test dockerImage=${dockerRepository}:${dockerVersion} prevDockerImage=${dockerRepository}:${prevDockerVersion} kubernetesVersion=${params.K8_VERSION} saveOutput=true minikubeMemory=20gb
226221
"""
227222
}
228223
}
@@ -244,6 +239,7 @@ pipeline {
244239
sh '''
245240
sudo sysctl -w vm.nr_hugepages=0
246241
export MINIKUBE_HOME=/space; export KUBECONFIG=/space/.kube-config; export GOPATH=/space/go; minikube delete --all --purge
242+
docker rm -f $(docker ps -a -q) || true
247243
docker system prune --force --filter "until=720h"
248244
docker volume prune --force
249245
docker image prune --force --all

NOTICE.txt

+59-25
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,39 @@ The MarkLogic® Kubernetes Helm Chart container image utilizes the RedHat UBI co
1515
This document provides notices information for the third-party components used by MarkLogic® Kubernetes Helm Chart.
1616

1717
Third Party Components
18-
K8s.io/api v0.29.1 (Apache-2.0)
19-
gjson v1.14.3 (MIT)
20-
go-http-digest-auth-client v0.6.0 (BSD-2-Clause)
21-
terratest v0.46.11 (Apache-2.0)
22-
testify v1.8.4 (MIT)
18+
19+
Curl v8.8.0 (MIT)
20+
gjson v1.14.3 (MIT)
21+
go-http-digest-auth-client v0.6.0 (BSD-2-Clause)
2322
haproxy helm charts vhaproxy-1.18.0 (Apache-2.0)
23+
K8s.io/api v0.29.1 (Apache-2.0)
24+
MarkLogic® Docker Container Image v2.0 (Apache-2.0)
25+
req v3.42.0 (MIT)
26+
terratest v0.46.11 (Apache-2.0)
27+
testify v1.8.4 (MIT)
2428

2529
Common Licenses
26-
Apache License 2.0 (Apache-2.0)
30+
31+
Apache License 2.0 (Apache-2.0)
2732

2833
-------------------------------------------------------------------------
2934

30-
The following software may be included in this project (last updated February 9, 2024):
35+
The following software may be included in this project (last updated July 24, 2024):
3136

32-
K8s.io/api v0.29.1 (Apache-2.0)
37+
Curl v8.8.0
3338

34-
https://pkg.go.dev/k8s.io/api
39+
https://curl.se/download/
3540

36-
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
41+
COPYRIGHT AND PERMISSION NOTICE
42+
43+
Copyright (c) 1996 - 2024, Daniel Stenberg, <[email protected]>, and many
44+
contributors, see the THANKS file. All rights reserved.
45+
46+
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
47+
48+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49+
50+
Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
3751

3852
gjson v1.14.3 (MIT)
3953

@@ -52,29 +66,30 @@ Redistribution and use in source and binary forms, with or without modification,
5266
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
5367
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5468

55-
terratest v0.44.1 (Apache-2.0)
69+
Haproxy helm charts vhaproxy-1.18.0 (Apache-2.0)
5670

57-
https://pkg.go.dev/github.com/gruntwork-io/terratest
71+
https://github.com/haproxytech/helm-charts
5872

59-
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
73+
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
6074

61-
testify v1.8.1 (MIT)
6275

63-
https://pkg.go.dev/github.com/stretchr/testify
76+
K8s.io/api v0.29.1 (Apache-2.0)
6477

65-
MIT License
78+
https://pkg.go.dev/k8s.io/api
6679

67-
Copyright (c) 2012-2020
80+
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
6881

69-
Mat Ryer, Tyler Bunnell and contributors.
7082

71-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
83+
MarkLogic® Docker Container Image v2.0 (Apache-2.0)
7284

73-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
85+
https://github.com/marklogic/marklogic-docker
86+
87+
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
7488

75-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
89+
See its NOTICE.txt file here https://github.com/marklogic/marklogic-docker/blob/master/NOTICE.txt
7690

77-
v3 v3.42.0 (MIT)
91+
92+
req v3.42.0 (MIT)
7893

7994
https://pkg.go.dev/github.com/imroc/req/v3
8095

@@ -88,12 +103,29 @@ The above copyright notice and this permission notice shall be included in all c
88103

89104
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
90105

91-
Haproxy helm charts vhaproxy-0.29.1 (Apache-2.0)
92106

93-
https://github.com/haproxytech/helm-charts
107+
terratest v0.46.11 (Apache-2.0)
94108

95-
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
109+
https://pkg.go.dev/github.com/gruntwork-io/terratest
110+
111+
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
112+
113+
114+
testify v1.8.4 (MIT)
115+
116+
https://pkg.go.dev/github.com/stretchr/testify
117+
118+
MIT License
119+
120+
Copyright (c) 2012-2020
96121

122+
Mat Ryer, Tyler Bunnell and contributors.
123+
124+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
125+
126+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
127+
128+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
97129

98130
-----------------------------------------
99131
Common Licenses
@@ -176,3 +208,5 @@ distributed under the License is distributed on an "AS IS" BASIS,
176208
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
177209
See the License for the specific language governing permissions and
178210
limitations under the License.
211+
212+
====================

0 commit comments

Comments
 (0)