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

Deploy PDE artifacts to maven #936

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
14 changes: 13 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
def deployBranch = 'master'

pipeline {
options {
timeout(time: 40, unit: 'MINUTES')
Expand All @@ -12,12 +14,15 @@ pipeline {
maven 'apache-maven-latest'
jdk 'temurin-jdk17-latest'
}
environment {
MVN_GOALS = getMavenGoals()
}
stages {
stage('Build') {
steps {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh '''
mvn clean verify --batch-mode -Dmaven.repo.local=$WORKSPACE/.m2/repository \
mvn clean ${MVN_GOALS} --batch-mode -Dmaven.repo.local=$WORKSPACE/.m2/repository \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you convert this text-block to a GString block (i.e. by replacing leading and trailing ''' by """) you can probably inline the function call and save the indirection through the environment variable.

Suggested change
mvn clean ${MVN_GOALS} --batch-mode -Dmaven.repo.local=$WORKSPACE/.m2/repository \
mvn clean ${getMavenGoals()} --batch-mode -Dmaven.repo.local=$WORKSPACE/.m2/repository \

-Pbree-libs \
-Papi-check \
-Pjavadoc \
Expand All @@ -39,3 +44,10 @@ pipeline {
}
}
}

def getMavenGoals() {
//if(env.BRANCH_NAME == deployBranch) {
return "deploy -DdeployAtEnd=true"
//}
// return "verify"
}
22 changes: 22 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@
<module>features</module>
<module>org.eclipse.pde.doc.user</module>
</modules>

<distributionManagement>
<repository>
<id>repo.eclipse.org</id>
<name>PDE - Releases</name>
<url>https://repo.eclipse.org/content/repositories/pde/</url>
</repository>
<snapshotRepository>
<id>repo.eclipse.org</id>
<name>PDE - Snapshots</name>
<url>https://repo.eclipse.org/content/repositories/pde-snapshots/</url>
</snapshotRepository>
</distributionManagement>

<!--
To build individual bundles, we specify a repository where to find parent pom,
Expand Down Expand Up @@ -103,7 +116,16 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version>
</plugin>
Comment on lines +119 to +123
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this unnecessary with eclipse-platform/eclipse.platform.releng.aggregator#1582?

Suggested change
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version>
</plugin>

</plugins>
<pluginManagement>
<plugins>
</plugins>
</pluginManagement>
Comment on lines +125 to +128
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks unnecessary.

Suggested change
<pluginManagement>
<plugins>
</plugins>
</pluginManagement>

</build>
</profile>
</profiles>
Expand Down
Loading