diff --git a/Jenkinsfile b/Jenkinsfile index 6147541ff4e..8d8a1e354f3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -65,8 +65,12 @@ pipeline { steps { xvnc(useXauthority: true) { sh """ - ./full-build.sh --tp=${selectedTargetPlatform()} \ - ${javaVersion() == 17 ? '' : '--toolchains releng/toolchains.xml -Pstrict-release-jdk'} + mvn -f org.eclipse.xtext.full.releng --batch-mode clean deploy \ + ${javaVersion() == 17 ? '' : '--toolchains releng/toolchains.xml -Pstrict-release-jdk'} \ + -PuseJenkinsSnapshots \ + -Dtarget-platform-classifier=xtext-${selectedTargetPlatform()} \ + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ + -DaltDeploymentRepository=local::file:./build/maven-repository """ } }// END steps diff --git a/full-build.sh b/full-build.sh deleted file mode 100755 index 8abfbe4e5ec..00000000000 --- a/full-build.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash - -MVN_ARGS=(\ - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ - -Dit-archetype-tests-skip=true \ -) - -# args parsing inspired by https://gist.github.com/jehiah/855086 -while [ "$1" != "" ]; do - PARAM=`echo $1 | awk -F= '{print $1}'` - VALUE=`echo $1 | awk -F= '{print $2}'` - case $PARAM in - -h | --help) - echo "Perform Maven build for xtext-xtend" - echo "" - echo "./1-maven-build.sh" - echo -e "\t-h --help" - echo -e "\t--no-tests Skip test execution" - echo -e "\t--local-repository= Use local Maven repository" - echo -e "\t--tp=$TARGET_PLATFORM (valid values: r202203,r202206,...,latest)" - echo "" - exit - ;; - --no-tests) - MVN_ARGS+=(-DskipTests=true) - ;; - --local-repository) - MVN_ARGS+=" -Dmaven.repo.local=$VALUE" - ;; - --tp) - MVN_ARGS+=" -Dtarget-platform-classifier=xtext-$VALUE" - ;; - *) - # append any additionally passed arg - if [ -z "$VALUE" ]; then - MVN_ARGS+=($PARAM) - else - MVN_ARGS+=($PARAM=$VALUE) - fi - ;; - esac - shift -done - -MVN_ARGS+=(-PuseJenkinsSnapshots) - -echo mvn -B -f org.eclipse.xtext.full.releng ${MVN_ARGS[@]} $@ - -#echo "Using target platform '$TARGET_PLATFORM'" -mvn -B \ - -f org.eclipse.xtext.full.releng \ - clean deploy \ - -DaltDeploymentRepository=local::default::file:./build/maven-repository \ - ${MVN_ARGS[@]} \ - $@ diff --git a/full-deploy.sh b/full-deploy.sh deleted file mode 100755 index ad193175649..00000000000 --- a/full-deploy.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash - -MVN_ARGS=(\ - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ - -Dit-archetype-tests-skip=true \ -) - -# args parsing inspired by https://gist.github.com/jehiah/855086 -while [ "$1" != "" ]; do - PARAM=`echo $1 | awk -F= '{print $1}'` - VALUE=`echo $1 | awk -F= '{print $2}'` - case $PARAM in - -h | --help) - echo "Perform Maven build for xtext-xtend" - echo "" - echo "./1-maven-build.sh" - echo -e "\t-h --help" - echo -e "\t--no-tests Skip test execution" - echo -e "\t--local-repository= Use local Maven repository" - echo -e "\t--tp=$TARGET_PLATFORM (valid values: r202203,r202206,...,latest)" - echo "" - exit - ;; - --no-tests) - MVN_ARGS+=(-DskipTests=true) - ;; - --local-repository) - MVN_ARGS+=" -Dmaven.repo.local=$VALUE" - ;; - --tp) - MVN_ARGS+=" -Dtarget-platform-classifier=xtext-$VALUE" - ;; - *) - # append any additionally passed arg - if [ -z "$VALUE" ]; then - MVN_ARGS+=($PARAM) - else - MVN_ARGS+=($PARAM=$VALUE) - fi - ;; - esac - shift -done - -MVN_ARGS+=(-PuseJenkinsSnapshots) - -echo mvn -B -f org.eclipse.xtext.full.releng ${MVN_ARGS[@]} $@ - -mvn -B \ - -f org.eclipse.xtext.full.releng \ - clean deploy \ - ${MVN_ARGS[@]} \ - $@ diff --git a/jenkins/deploy/Jenkinsfile b/jenkins/deploy/Jenkinsfile index 8308853ce45..68612ce0405 100644 --- a/jenkins/deploy/Jenkinsfile +++ b/jenkins/deploy/Jenkinsfile @@ -51,10 +51,14 @@ pipeline { steps { withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) { sh 'gpg --batch --import "${KEYRING}"' - sh 'for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u); do echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done' + sh 'for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u); do echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done' } sshagent(['projects-storage.eclipse.org-bot-ssh']) { - sh "./full-deploy.sh -Peclipse-sign,sonatype-oss-release,${params.DEPLOYMENT_TYPE == 'nightly' ? 'release-snapshot' : 'release-milestone'}" + sh """ + mvn -f org.eclipse.xtext.full.releng --batch-mode clean deploy \ + -PuseJenkinsSnapshots,eclipse-sign,sonatype-oss-release,${params.DEPLOYMENT_TYPE == 'nightly' ? 'release-snapshot' : 'release-milestone'} \ + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn + """ } } } diff --git a/jenkins/other-experiments/Jenkinsfile-p2-deploy-nightly b/jenkins/other-experiments/Jenkinsfile-p2-deploy-nightly index 396abd9207f..47b45efd1e4 100644 --- a/jenkins/other-experiments/Jenkinsfile-p2-deploy-nightly +++ b/jenkins/other-experiments/Jenkinsfile-p2-deploy-nightly @@ -14,7 +14,12 @@ pipeline { stages { stage('Maven Tycho Build and Sign') { steps { - sh './tycho-sign.sh' + sh ''' + mvn -f org.eclipse.xtext.p2.releng --batch-mode package\ + -PuseJenkinsSnapshots,eclipse-sign \ + -Dmaven.repo.local=.m2/repository \ + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn + ''' } } stage('Copy to download area') { diff --git a/maven-build.sh b/maven-build.sh deleted file mode 100755 index db059b0a681..00000000000 --- a/maven-build.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -MVN_ARGS=(\ - --fae \ - -Dmaven.test.failure.ignore=true \ - -Declipse.p2.mirrors=false \ - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ - -Dit-archetype-tests-skip=true \ -) - -# args parsing inspired by https://gist.github.com/jehiah/855086 -while [ "$1" != "" ]; do - PARAM=`echo $1 | awk -F= '{print $1}'` - VALUE=`echo $1 | awk -F= '{print $2}'` - case $PARAM in - -h | --help) - echo "Perform Maven build" - echo "" - echo "./1-maven-build.sh" - echo -e "\t-h --help" - echo -e "\t--no-tests Skip test execution" - echo -e "\t--local-repository= Use local Maven repository" - echo "" - exit - ;; - --no-tests) - MVN_ARGS+=(-DskipTests=true) - ;; - --local-repository) - MVN_ARGS+=" -Dmaven.repo.local=$VALUE" - ;; - --tp) - MVN_ARGS+=" -Dtarget-platform-classifier=xtext-$VALUE" - ;; - *) - # append any additionally passed arg - if [ -z "$VALUE" ]; then - MVN_ARGS+=($PARAM) - else - MVN_ARGS+=($PARAM=$VALUE) - fi - ;; - esac - shift -done - -MVN_ARGS+=(-PuseJenkinsSnapshots) -# MVN_ARGS+=(-Pjavadoc) - -echo mvn -B -f org.eclipse.xtext.maven.releng ${MVN_ARGS[@]} $@ - -mvn -B \ - -f org.eclipse.xtext.maven.releng \ - clean deploy \ - -DaltDeploymentRepository=local::default::file:./build/maven-repository \ - ${MVN_ARGS[@]} \ - $@ diff --git a/releng/xtext--build.launch b/releng/xtext--build.launch new file mode 100644 index 00000000000..944feb0c26a --- /dev/null +++ b/releng/xtext--build.launch @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tycho-sign.sh b/tycho-sign.sh deleted file mode 100755 index 13613992b51..00000000000 --- a/tycho-sign.sh +++ /dev/null @@ -1,11 +0,0 @@ -# THIS SIGNS, SKIPPING TESTS - -mvn \ - -f org.eclipse.xtext.p2.releng \ - package \ - -P useJenkinsSnapshots \ - -P eclipse-sign \ - --batch-mode \ - -Dmaven.repo.local=.m2/repository \ - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ - $@ \ No newline at end of file diff --git a/tycho-test.sh b/tycho-test.sh deleted file mode 100755 index 26835aad429..00000000000 --- a/tycho-test.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash - -# Use TARGET_PLATFORM from environment and 'r202203' as default. -# Overridable by 'tp' command-line arg -if [ -z "$TARGET_PLATFORM" ]; then - TARGET_PLATFORM=r202203 -fi - -MVN_ARGS=(\ - --fae \ - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ -) - -# args parsing inspired by https://gist.github.com/jehiah/855086 -while [ "$1" != "" ]; do - PARAM=`echo $1 | awk -F= '{print $1}'` - VALUE=`echo $1 | awk -F= '{print $2}'` - case $PARAM in - -h | --help) - echo "Perform Maven build for xtext-xtend" - echo "" - echo "./1-maven-build.sh" - echo -e "\t-h --help" - echo -e "\t--no-tests Skip test execution" - echo -e "\t--local-repository= Use local Maven repository" - echo -e "\t--tp=$TARGET_PLATFORM (valid values: r202203,r202206,...,latest)" - echo "" - exit - ;; - --no-tests) - MVN_ARGS+=(-DskipTests=true) - ;; - --local-repository) - MVN_ARGS+=" -Dmaven.repo.local=$VALUE" - ;; - --tp) - MVN_ARGS+=" -Dtarget-platform-classifier=xtext-$VALUE" - ;; - *) - # append any additionally passed arg - if [ -z "$VALUE" ]; then - MVN_ARGS+=($PARAM) - else - MVN_ARGS+=($PARAM=$VALUE) - fi - ;; - esac - shift -done - -MVN_ARGS+=(-PuseJenkinsSnapshots) - -echo mvn -B -f org.eclipse.xtext.p2.releng ${MVN_ARGS[@]} $@ - -#echo "Using target platform '$TARGET_PLATFORM'" -mvn -B \ - -f org.eclipse.xtext.p2.releng \ - clean verify \ - ${MVN_ARGS[@]} \ - $@