1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

[releng] Migrate check_mvn_plugin_versions to Jenkinsfile use

Change-Id: I380166082841b1ba509839f49b523a2c2de23c8c
This commit is contained in:
Jonah Graham 2019-11-07 17:13:44 -05:00
parent 06c518f3aa
commit 794ff1046c

View file

@ -1,6 +1,6 @@
#!/bin/bash
###############################################################################
# Copyright (c) 2015, 2017 Ericsson, EfficiOS Inc. and others
# Copyright (c) 2015, 2019 Ericsson, EfficiOS Inc. and others
#
#
# This program and the accompanying materials
@ -16,12 +16,19 @@
# Marc-André Laperle - Copied to CDT
###############################################################################
set -u # run with unset flag error so that missing parameters cause build failure
set -e # error out on any failed commands
set -x # echo all commands used for debugging purposes
# Point ourselves to the script's directory (so it can be run "out-of-tree")
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
output=`mvn versions:display-plugin-updates -U -f $DIR/../../pom.xml`
output="$(mktemp /tmp/check_mvn_plugin_versions.output.XXXXXX)"
${MVN:-mvn} versions:display-plugin-updates -P build-standalone-debugger-rcp -U -B -f $DIR/../../pom.xml | tee $output
#filter only updates and show unique
summary=`echo "${output}" | grep "\\->" | sort | uniq`
# XXX: Jonah added the exclusion for sonar-maven-plugin as Eclipse's SonarQube installation is not new enough
# XXX: see https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven#AnalyzingwithSonarQubeScannerforMaven-Compatibility
summary=`cat $output | grep "\\->" | grep -v "org.codehaus.mojo:sonar-maven-plugin" | sort | uniq`
echo -e "Summary:\n${summary}"
#remove empty lines and count lines