diff --git a/.gitignore b/.gitignore index 567609b1234a9b8806c5a05da6c866e480aa148d..1dd9d21664697f9214e6ce750511e887460502a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ build/ +test/ +local.build.properties diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d143cbbb1890aa2821e66d60a936b341346afd45..a22462e952139ac3d484484cbaef350a2eaa4ef6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,25 +1,58 @@ -image: frekele/ant +image: docker.gitlab.gwdg.de/fontane-notizbuecher/build:latest stages: - build + - test - deploy -ant: +build-develop: + except: + - master + - tags stage: build script: - - echo "starting ant build" - ant artifacts: paths: - build/*.xar +build-master: + only: + - master + stage: build + script: + - cp master.build.properties local.build.properties + - ant + artifacts: + paths: + - build/*.xar + +installation: + except: + - tags + stage: test + script: + - ant test + - bash test/eXist-db-*/bin/startup.sh | tee output.log & + # wait for eXist + - while [ $(curl --head --silent http://localhost:8080 | grep -c "200 OK") == 0 ]; do sleep 2s; done + # shutdown eXist + - bash test/eXist-db-*/bin/shutdown.sh + - ls -al /tmp; mv /tmp/tests-* . || true + artifacts: + paths: + - output.log + - test/eXist-db-*/webapp/WEB-INF/logs/expath-repo.log + reports: + junit: tests-*.xml + upload: + only: + - master + - develop + except: + - tags stage: deploy script: - FILENAME=$(ls build/*.xar) - curl -u ci:${EXIST_UPLOAD_PW} -X POST -F file=@${FILENAME} https://ci.de.dariah.eu/exist-upload - -trigger_build: - stage: deploy - script: - - "curl -X POST -F token=${GITLAB_TRIGGER_TOKEN} -F ref=develop https://gitlab.gwdg.de/api/v4/projects/2056/trigger/pipeline" diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index ccf3141dac4886c3de16d2d6a499aa5f79c6ddea..0000000000000000000000000000000000000000 --- a/Jenkinsfile +++ /dev/null @@ -1,23 +0,0 @@ -node { - - stage('Preparation') { - checkout scm - sh 'rm -f build/*.xar' - } - - stage('Build') { - sh 'ant' - } - - stage('Publish') { - archiveArtifacts artifacts: 'build/*.xar', onlyIfSuccessful: true - FILENAME = sh ( - script: "find build/ -name '*.xar' -exec basename {} \\;", - returnStdout: true - ).trim() - sh "curl -X POST -F 'file=@build/${FILENAME}' http://localhost:8181/exist/apps/receiver.xql" - } - stage('Server') { - build job: 'SADE_Server', wait: false - } -} diff --git a/build.properties b/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..8f152c6125be9e903b5fbbf32ff9ffcaa0195972 --- /dev/null +++ b/build.properties @@ -0,0 +1,8 @@ +project.name=http://textgrid.de/ns/SADE-develop +project.version=3.0.1 +project.title=Scalable Architecture for Digital Editions powered by TextGrid +project.abbrev=SADE-develop +project.processorversion=4.5.0 + +destfile=${build.dir}/${project.abbrev}-${project.version}.xar +test.dir=test diff --git a/build.xml b/build.xml index 4cbdffd0d0c627350dbd2f7bd081881abd8f7e31..3b58f794599558daa1add8139dc7d1c0db90d5f0 100644 --- a/build.xml +++ b/build.xml @@ -1,13 +1,43 @@ - - - - - - + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + diff --git a/expath-pkg.xml b/expath-pkg.xml index 85d1c5374a86feb78cf80d365991c17dcb4cd57b..c9bad85fd5b724f271d22bce0f6cb7f1393142b0 100644 --- a/expath-pkg.xml +++ b/expath-pkg.xml @@ -1,7 +1,13 @@ - + + Scalable Architecture for Digital Editions powered by TextGrid + - + diff --git a/expath-pkg.xml.tmpl b/expath-pkg.xml.tmpl new file mode 100644 index 0000000000000000000000000000000000000000..c602282d123236d44d139e565bb28837920e9482 --- /dev/null +++ b/expath-pkg.xml.tmpl @@ -0,0 +1,13 @@ + + + @project.title@ + + + + + + diff --git a/master.build.properties b/master.build.properties new file mode 100644 index 0000000000000000000000000000000000000000..5429506630c652d6783b6fac81989ac11e5a3a54 --- /dev/null +++ b/master.build.properties @@ -0,0 +1,2 @@ +project.abbrev=SADE +project.name=http://textgrid.de/ns/SADE