Skip to content

Commit e4e7660

Browse files
authored
Merge pull request #267 from marklogic/develop
Merge develop into master
2 parents 854adbf + 4e74100 commit e4e7660

File tree

6 files changed

+29
-12
lines changed

6 files changed

+29
-12
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,15 @@ are all synonyms):
256256

257257
./gradlew shadowJar
258258

259-
This will produce an assembly jar at `./flux-cli/build/libs/marklogic-flux-1.1.0-all.jar`.
259+
This will produce an assembly jar at `./flux-cli/build/libs/marklogic-flux-1.1-SNAPSHOT-all.jar`.
260260

261261
You can now run any CLI command via spark-submit. This is an example of previewing an import of files - change the value
262262
of `--path`, as an absolute path is needed, and of course change the value of `--master` to match that of your Spark
263263
cluster:
264264

265265
```
266266
$SPARK_HOME/bin/spark-submit --class com.marklogic.flux.spark.Submit \
267-
--master spark://NYWHYC3G0W:7077 flux-cli/build/libs/marklogic-flux-1.1.0-all.jar \
267+
--master spark://NYWHYC3G0W:7077 flux-cli/build/libs/marklogic-flux-1.1-SNAPSHOT-all.jar \
268268
import-files --path /Users/rudin/workspace/flux/flux-cli/src/test/resources/mixed-files \
269269
--connection-string "admin:admin@localhost:8000" \
270270
--preview 5 --preview-drop content
@@ -281,7 +281,7 @@ to something you can access):
281281
$SPARK_HOME/bin/spark-submit --class com.marklogic.flux.spark.Submit \
282282
--packages org.apache.hadoop:hadoop-aws:3.3.4,org.apache.hadoop:hadoop-client:3.3.4 \
283283
--master spark://NYWHYC3G0W:7077 \
284-
flux-cli/build/libs/marklogic-flux-1.1.0-all.jar \
284+
flux-cli/build/libs/marklogic-flux-1.1-SNAPSHOT-all.jar \
285285
import-files --path "s3a://changeme/" \
286286
--connection-string "admin:admin@localhost:8000" \
287287
--s3-add-credentials \

Jenkinsfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ def runtests(){
33
cd $WORKSPACE/flux;
44
sudo /usr/local/sbin/mladmin stop;
55
sudo /usr/local/sbin/mladmin remove;
6+
mkdir -p $WORKSPACE/flux/docker/sonarqube;
67
docker-compose up -d --build;
78
sleep 30s;
89
'''
@@ -38,10 +39,20 @@ def postCleanup(){
3839
cd $WORKSPACE/flux;
3940
sudo /usr/local/sbin/mladmin delete $WORKSPACE/flux/docker/marklogic/logs/;
4041
docker exec -i --privileged --user root flux-caddy-load-balancer-1 /bin/sh -c "chmod -R 777 /data" || true;
42+
docker exec -i --privileged --user root flux-sonarqube-1 /bin/sh -c "chmod -R 777 /opt/sonarqube" || true;
4143
docker-compose rm -fsv || true;
4244
echo "y" | docker volume prune --filter all=1 || true;
4345
'''
4446
}
47+
def runSonarScan(String javaVersion){
48+
sh label:'test', script: '''#!/bin/bash
49+
export JAVA_HOME=$'''+javaVersion+'''
50+
export GRADLE_USER_HOME=$WORKSPACE/$GRADLE_DIR
51+
export PATH=$GRADLE_USER_HOME:$JAVA_HOME/bin:$PATH
52+
cd flux
53+
./gradlew sonar -Dsonar.projectKey='ML-DevExp-marklogic-flux' -Dsonar.projectName='ML-DevExp-marklogic-flux' || true
54+
'''
55+
}
4556
pipeline{
4657
agent none
4758
options {
@@ -50,15 +61,22 @@ pipeline{
5061
}
5162
environment{
5263
JAVA_HOME_DIR="/home/builder/java/jdk-11.0.2"
64+
JAVA17_HOME_DIR="/home/builder/java/jdk-17.0.2"
5365
GRADLE_DIR =".gradle"
5466
DMC_USER = credentials('MLBUILD_USER')
5567
DMC_PASSWORD = credentials('MLBUILD_PASSWORD')
5668
}
5769
stages{
5870
stage('tests'){
71+
environment{
72+
scannerHome = tool 'SONAR_Progress'
73+
}
5974
agent{ label 'devExpLinuxPool'}
6075
steps{
6176
runtests()
77+
withSonarQubeEnv('SONAR_Progress') {
78+
runSonarScan('JAVA17_HOME_DIR')
79+
}
6280
}
6381
post{
6482
always{

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ subprojects {
1010

1111
repositories {
1212
mavenCentral()
13-
// mavenLocal()
14-
// maven {
15-
// url "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"
16-
// }
13+
mavenLocal()
14+
maven {
15+
url "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"
16+
}
1717
}
1818

1919
test {

docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
- 8007:8007
1616

1717
marklogic:
18-
image: "progressofficial/marklogic-db:latest"
18+
image: "progressofficial/marklogic-db:11.3.0-ubi"
1919
platform: linux/amd64
2020
environment:
2121
- MARKLOGIC_INIT=true
@@ -63,13 +63,12 @@ services:
6363
volumes:
6464
- sonarqube_data:/opt/sonarqube/data
6565
- sonarqube_extensions:/opt/sonarqube/extensions
66-
- sonarqube_logs:/opt/sonarqube/logs
66+
- ./docker/sonarqube/logs:/opt/sonarqube/logs
6767
ports:
6868
- "9000:9000"
6969

7070
volumes:
7171
sonarqube_data:
7272
sonarqube_extensions:
73-
sonarqube_logs:
7473
postgresql:
7574
postgresql_data:

flux-cli/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies {
1717
// The rocksdbjni dependency weighs in at 50mb and so far does not appear necessary for our use of Spark.
1818
exclude module: "rocksdbjni"
1919
}
20-
implementation "com.marklogic:marklogic-spark-connector:2.4.0"
20+
implementation "com.marklogic:marklogic-spark-connector:2.4.1"
2121
implementation "info.picocli:picocli:4.7.6"
2222

2323
// Spark 3.4.3 depends on Hadoop 3.3.4, which depends on AWS SDK 1.12.262. As of August 2024, all public releases of

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=1.1.0
1+
version=1.1.1
22

33
# Define these on the command line to publish to OSSRH
44
# See https://central.sonatype.org/publish/publish-gradle/#credentials for more information

0 commit comments

Comments
 (0)