Loading
<p style="font-size: 125%;"> This pipeline builds <a href="https://git.eclipse.org/c/justj/justj.git/tree/releng/org.eclipse.justj.releng/jdeps/Jenkinsfile"> <img style="height: 2ex;" src="https://www.eclipse.org/justj/justj_title.svg"/>.git/releng/org.eclipse.justj.releng/jdeps/Jenkinsfile </a> to produce a jdeps report under <a href="https://download.eclipse.org/justj/jdeps/">https://download.eclipse.org/justj/jdeps/</a>. </p>
Loading...
10
Testing...
1
URL
Enter the URL of a simple repository or a product *.tar.gz to analyze all the modules dependencies of that repository or product.
Jenkins please retry a build
.*\[skip\W+ci\].*
H/5 * * * *
5
JENKINS_URL
TOKEN_NAME
pipeline { agent { label 'migration' } options { buildDiscarder(logRotator(numToKeepStr: '10')) disableConcurrentBuilds() } tools { maven 'apache-maven-latest' jdk 'openjdk-jdk14-latest' } parameters { string( name: 'URL', defaultValue: '', description: ''' Enter the URL of a simple repository or a product *.tar.gz to analyze all the modules dependencies of that repository or product. ''') } environment { JUSTJ_STORAGE_LOCATION = '/home/data/httpd/download.eclipse.org/justj' } stages { stage('Download Jars') { steps { script { if (params.URL != "" && !params.URL.startsWith("https://download.eclipse.org/")) { error("Only repositories or products located at https://download.eclipse.org/ are supported.") } else { env.REPORT_BASE_LOCATION = "jdeps-test" if (params.URL == "") { echo "Only rebuilding the index." } else { env.LOCATION = "/home/data/httpd/" + params.URL.replace("https:/", "") env.REPORT_LOCATION = params.URL.replace("https://download.eclipse.org/", "") echo "Using repository ${env.LOCATION}" } sh ''' mkdir -p org/eclipse/justj/codegen/templates/jdeps/ cd org/eclipse/justj/codegen/templates/jdeps/ curl -O https://git.eclipse.org/c/justj/justj.tools.git/plain/plugins/org.eclipse.justj.codegen/src/org/eclipse/justj/codegen/templates/jdeps/JdepsIndex.java cd - javac org/eclipse/justj/codegen/templates/jdeps/JdepsIndex.java ''' sshagent(['projects-storage.eclipse.org-bot-ssh']) { script { if (params.URL != "") { sh ''' if [[ "$LOCATION" == *.tar.gz ]]; then rsync -avsh "genie.justj@projects-storage.eclipse.org:$LOCATION" . tar -xf $(basename $LOCATION) mv */plugins plugins rm plugins/*.source_* || true else mkdir plugins rsync -avsh --exclude '*.source_*' "genie.justj@projects-storage.eclipse.org:$LOCATION/plugins/*.jar" plugins/ fi cd plugins for plugin in *.jar; do jdeps --ignore-missing-deps --multi-release 14 --print-module-deps $plugin > $plugin-out-deps 2> $plugin-error-deps || true if [[ $(wc -w < $plugin-error-deps) == 0 ]]; then rm $plugin-error-deps else cat $plugin-error-deps fi cat $plugin-out-deps done java -cp .. org.eclipse.justj.codegen.templates.jdeps.JdepsIndex . $URL ssh genie.justj@projects-storage.eclipse.org "mkdir -p $JUSTJ_STORAGE_LOCATION/$REPORT_BASE_LOCATION/$REPORT_LOCATION" scp index.html justj.modules genie.justj@projects-storage.eclipse.org:$JUSTJ_STORAGE_LOCATION/$REPORT_BASE_LOCATION/$REPORT_LOCATION ''' } } // Build the index. sh ''' mkdir -p $REPORT_BASE_LOCATION cd $REPORT_BASE_LOCATION rsync -avsh "genie.justj@projects-storage.eclipse.org:$JUSTJ_STORAGE_LOCATION/$REPORT_BASE_LOCATION/" . java -cp .. org.eclipse.justj.codegen.templates.jdeps.JdepsIndex -index . rsync -avsh . "genie.justj@projects-storage.eclipse.org:$JUSTJ_STORAGE_LOCATION/$REPORT_BASE_LOCATION" ''' script { if (params.URL != "") { dir('plugins') { archiveArtifacts '*-deps,index.html,justj.modules' } } else { dir(env.REPORT_BASE_LOCATION) { archiveArtifacts 'index.html,justj.modules' } } } } } } } } } }