Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to using direct from maven dependencies where possible #387

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,22 @@ pipeline {
timestamps()
}
stages {
stage('initialize PGP') {
steps {
container('cdt') {
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'
}
}
}
}
stage('Code Formatting Checks') {
steps {
container('cdt') {
timeout(activity: true, time: 30) {
withEnv(['MAVEN_OPTS=-XX:MaxRAMPercentage=60.0']) {
sh 'MVN="/usr/share/maven/bin/mvn -Dmaven.repo.local=/home/jenkins/.m2/repository \
sh 'MVN="/jipp/tools/apache-maven/latest/bin/mvn -Dmaven.repo.local=/home/jenkins/.m2/repository \
--settings /home/jenkins/.m2/settings.xml" ./releng/scripts/check_code_cleanliness.sh'
}
}
Expand All @@ -25,8 +35,10 @@ pipeline {
container('cdt') {
timeout(activity: true, time: 20) {
withEnv(['MAVEN_OPTS=-XX:MaxRAMPercentage=60.0']) {
sh "/usr/share/maven/bin/mvn \
withCredentials([string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE')]) {
sh '''/jipp/tools/apache-maven/latest/bin/mvn \
clean verify -B -V \
-Dgpg.passphrase="${KEYRING_PASSPHRASE}" \
-Dmaven.test.failure.ignore=true \
-DexcludedGroups=flakyTest,slowTest \
-P baseline-compare-and-replace \
Expand All @@ -38,7 +50,8 @@ pipeline {
-Dcdt.tests.dsf.gdb.versions=gdb.10,gdbserver.10 \
-Dmaven.repo.local=/home/jenkins/.m2/repository \
--settings /home/jenkins/.m2/settings.xml \
"
'''
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Export-Package: org.eclipse.cdt.managedbuilder.core.tests,
org.eclipse.cdt.projectmodel.tests
Require-Bundle: org.eclipse.core.runtime,
org.junit,
org.junit.jupiter.api,
org.eclipse.core.resources,
org.eclipse.ui,
org.eclipse.ui.ide,
Expand All @@ -26,4 +25,6 @@ Require-Bundle: org.eclipse.core.runtime,
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: org.eclipse.cdt.managedbuilder.core.tests
Import-Package: com.google.gson
Import-Package: com.google.gson,
org.junit.jupiter.api;version="[5.9.3,6.0.0)",
org.junit.jupiter.api.function;version="[5.9.3,6.0.0)"
6 changes: 3 additions & 3 deletions cmake/org.eclipse.cdt.cmake.core.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.cdt.cmake.core.tests
Bundle-Version: 1.0.0.qualifier
Fragment-Host: org.eclipse.cdt.cmake.core;bundle-version="1.5.0"
Import-Package: org.assertj.core.api;version="[3.24.2,4.0.0)",
org.junit.jupiter.api;version="[5.9.3,6.0.0)"
Automatic-Module-Name: org.eclipse.cdt.cmake.core.tests
Bundle-Vendor: %Bundle-Vendor
Bundle-Copyright: %Bundle-Copyright
Require-Bundle: org.junit,
org.junit.jupiter.api,
org.assertj;bundle-version="3.14.0"
Require-Bundle: org.junit

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.eclipse.cdt.cmake.core.internal.properties.CMakePropertiesBean;
import org.eclipse.cdt.cmake.core.properties.CMakeGenerator;
import org.junit.Test;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor;

Expand Down Expand Up @@ -56,7 +57,7 @@ public void testSaveLoadEvolution_1() throws IOException {
extraArgs.add("arg2");
props.setExtraArguments(extraArgs);

Yaml yaml = new Yaml(new CustomClassLoaderConstructor(this.getClass().getClassLoader()));
Yaml yaml = new Yaml(new CustomClassLoaderConstructor(this.getClass().getClassLoader(), new LoaderOptions()));
String output = yaml.dump(props);

// try to load as evolved properties..
Expand Down
7 changes: 4 additions & 3 deletions cmake/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.cdt.core;bundle-version="5.12.0",
org.eclipse.tools.templates.freemarker;bundle-version="1.2.200",
com.google.gson,
org.eclipse.cdt.jsoncdb.core,
org.yaml.snakeyaml;bundle-version="[1.14.0,2.0.0)"
org.eclipse.cdt.jsoncdb.core
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.cdt.cmake.core,
org.eclipse.cdt.cmake.core.internal;x-friends:="org.eclipse.cdt.cmake.ui",
org.eclipse.cdt.cmake.core.properties
Automatic-Module-Name: org.eclipse.cdt.cmake.core
Bundle-Localization: plugin
Import-Package: org.eclipse.core.variables
Import-Package: org.eclipse.core.variables,
org.yaml.snakeyaml;version="[2.0.0,3.0.0)",
org.yaml.snakeyaml.constructor;version="[2.0.0,3.0.0)"
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.eclipse.cdt.cmake.core.properties.CMakeGenerator;
import org.eclipse.cdt.cmake.core.properties.ICMakeProperties;
import org.eclipse.cdt.cmake.core.properties.ICMakePropertiesController;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor;

Expand Down Expand Up @@ -66,8 +67,9 @@ public ICMakeProperties load() throws IOException {
CMakePropertiesBean props = null;
if (Files.exists(storageFile)) {
try (InputStream is = Files.newInputStream(storageFile)) {
props = new Yaml(new CustomClassLoaderConstructor(this.getClass().getClassLoader())).loadAs(is,
CMakePropertiesBean.class);
var classLoader = this.getClass().getClassLoader();
var clConstructor = new CustomClassLoaderConstructor(classLoader, new LoaderOptions());
props = new Yaml(clConstructor).loadAs(is, CMakePropertiesBean.class);
// props is null here if if no document was available in the file
}
}
Expand Down
10 changes: 10 additions & 0 deletions jenkins/pod-templates/cdt-full-pod-plus-eclipse-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ spec:
readOnly: true
- name: m2-repo
mountPath: /home/jenkins/.m2/repository
- name: "jenkins-home"
mountPath: "/home/jenkins"
readOnly: false
- name: tools
mountPath: /jipp/tools
- name: jnlp
resources:
requests:
Expand All @@ -37,3 +42,8 @@ spec:
path: settings.xml
- name: m2-repo
emptyDir: {}
- name: "jenkins-home"
emptyDir: {}
- name: tools
persistentVolumeClaim:
claimName: tools-claim-jiro-cdt
19 changes: 18 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
runs with. It may work with older versions, but this is not
tested or supported. -->
<required-maven-version>3.6.3</required-maven-version>
<tycho-version>3.0.3</tycho-version>
<tycho-version>3.0.5</tycho-version>
<cbi-plugins.version>1.3.4</cbi-plugins.version>
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
<cdt-site>http://ci.eclipse.org/cdt/job/cdt-master/lastSuccessfulBuild/artifact/releng/org.eclipse.cdt.repo/target/repository</cdt-site>
Expand Down Expand Up @@ -990,6 +990,23 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-gpg-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>pgpsigner</id>
<goals>
<goal>sign-p2-artifacts</goal>
</goals>
<configuration>
<keyname>4F23165B6AC51B15</keyname>
jonahgraham marked this conversation as resolved.
Show resolved Hide resolved
<skipIfJarsigned>false</skipIfJarsigned>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</pluginManagement>
Expand Down
2 changes: 1 addition & 1 deletion releng/CDT.setup
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
<repository
url="https://download.eclipse.org/tools/orbit/downloads/drops/R20201118194144/repository"/>
<repository
url="https://download.eclipse.org/tools/orbit/downloads/latest-R/"/>
url="https://download.eclipse.org/oomph/simrel-orbit/milestone/latest/"/>
<repository
url="https://download.eclipse.org/technology/swtbot/releases/latest"/>
<repository
Expand Down
15 changes: 15 additions & 0 deletions releng/org.eclipse.cdt.repo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,19 @@
<build>
<finalName>${project.artifactId}</finalName>
</build>

<profiles>
<profile>
<id>production</id>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-gpg-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Loading