diff --git a/.copyrightconfig b/.copyrightconfig index f683475d..aad2578d 100644 --- a/.copyrightconfig +++ b/.copyrightconfig @@ -11,4 +11,4 @@ startyear: 2015 # - Dotfiles already skipped automatically # Enable by removing the leading '# ' from the next line and editing values. # filesexcluded: third_party/*, docs/generated/*.md, assets/*.png, scripts/temp_*.py, vendor/lib.js -filesexcluded: .github/*, README.md, Jenkinsfile, package.json, package-lock.json, test-app/*, *.md +filesexcluded: .github/*, README.md, Jenkinsfile, package.json, package-lock.json, test-app/*, *.md, docker-compose.yaml diff --git a/test-app/.env b/.env similarity index 100% rename from test-app/.env rename to .env diff --git a/.gitignore b/.gitignore index 190c5e44..3fddd55d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,11 +7,12 @@ tmp .settings .vscode .DS_Store + +docker test-app/build test-app/.gradle test-app/gradle-local.properties test-app/docker test-app/containerLogs - test-complete-app/build test-complete-app/.gradle \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eafe5a77..9b0057b8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,6 @@ instance available for testing. If you are able to use Docker, run the following: - cd test-app docker-compose up -d --build This will create a container with the MarkLogic service. The MarkLogic service will take a minute or two to initialize. @@ -31,6 +30,7 @@ username and password are in the docker-compose.yaml file in the /test-app direc Once the container is finished initializing, you need to deploy the test application to the MarkLogic service. While still in the test-app directory run the following gradle command. + cd test-app ./gradlew -i mlDeploy Once the deploy has completed successfully, use "cd .." to return to the root directory of the project. diff --git a/Jenkinsfile b/Jenkinsfile index 1b3556f8..83e12633 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ def runDockerCompose(String markLogicDockerImage) { sudo /usr/local/sbin/mladmin remove docker-compose down -v || true sudo /usr/local/sbin/mladmin cleandata - cd node-client-api/test-app + cd node-client-api MARKLOGIC_LOGS_VOLUME=/tmp MARKLOGIC_IMAGE=''' + markLogicDockerImage + ''' docker-compose up -d --build sleep 60s; ''' @@ -38,7 +38,7 @@ def runDockerCompose(String markLogicDockerImage) { def teardownAfterTests() { updateWorkspacePermissions() sh label: 'teardown-docker', script: '''#!/bin/bash - cd node-client-api/test-app + cd node-client-api docker-compose down -v || true ''' cleanupDocker() @@ -89,7 +89,7 @@ def runE2ETests() { ../node_modules/.bin/mocha -R xunit --timeout 60000 -R xunit "nodejs-ds-transactions.js" --reporter mocha-junit-reporter --reporter-options mochaFile=$WORKSPACE/ds-transactions-results.js.xml || true ../node_modules/.bin/mocha -R xunit --timeout 60000 -R xunit "nodejs-ds-dynamic.js" --reporter mocha-junit-reporter --reporter-options mochaFile=$WORKSPACE/ds-dynamic-results.xml || true ''' - junit '**/*.xml' + junit '**/*.xml' } pipeline { @@ -118,13 +118,13 @@ pipeline { stages { - stage('runtests-11.3.2') { + stage('pull-request-tests') { agent { label 'nodeclientpool' } steps { runAuditReport() - runDockerCompose('progressofficial/marklogic-db:latest-11.3') + runDockerCompose('ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-12') runTests() - runE2ETests() + runE2ETests() } post { always { diff --git a/test-app/docker-compose.yaml b/docker-compose.yaml similarity index 100% rename from test-app/docker-compose.yaml rename to docker-compose.yaml