jenkinsci / leapwork-plugin

Leapwork Integration with Jenkins
https://www.leapwork.com/services/learning-center/integrations
MIT License
0 stars 7 forks source link

enhancement : Jenkins Plugin Upgrade #30

Closed Munishkumar92 closed 6 months ago

Munishkumar92 commented 7 months ago

Testing done

### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue
mawinter69 commented 6 months ago

I just did some changes to the pom removing all the unnecessary stuff and that builds without any problem locally You have no tests so I removed almost all the test dependencies

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>plugin</artifactId>
        <version>4.80</version>
        <relativePath />
    </parent>
    <groupId>io.jenkins.plugins</groupId>
    <artifactId>leapwork</artifactId>
    <version>${revision}${changelist}</version>
    <packaging>hpi</packaging>
    <properties>
        <revision>4.0.10</revision>
        <changelist>-SNAPSHOT</changelist>
        <gitHubRepo>jenkinsci/leapwork-plugin</gitHubRepo>
        <!-- Baseline Jenkins version you use to build the plugin. Users must have 
            this version or newer to run. -->
        <jenkins.version>2.440.1</jenkins.version>
        <gitHubRepo>jenkinsci/leapwork-plugin</gitHubRepo>
    </properties>
    <name>Leapwork</name>
    <url>https://github.com/${gitHubRepo}</url>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <!-- Pick up common dependencies for the selected LTS line: https://github.com/jenkinsci/bom#usage -->
                <groupId>io.jenkins.tools.bom</groupId>
                <artifactId>bom-2.440.x</artifactId>
                <version>2815.vf5d6f093b_23e</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>async-http-client</artifactId>
            <version>1.9.40</version>
        </dependency>
        <dependency>
            <groupId>io.jenkins.plugins</groupId>
            <artifactId>gson-api</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>3.0.0</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-nop</artifactId>
            <version>1.7.32</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>
    <!-- If you want this to appear on the plugin site page: -->
    <developers>
        <developer>

            <name>Leapwork DevOps</name>
            <email>prioritysupport@leapwork.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/${gitHubRepo}</connection>
        <developerConnection>scm:git:git@github.com:${gitHubRepo}.git</developerConnection>
        <url>https://github.com/${gitHubRepo}</url>
        <tag>leapwork-4.0.5</tag>
    </scm>

    <repositories>
        <repository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </pluginRepository>
    </pluginRepositories>
</project>
mawinter69 commented 6 months ago

I suggest you try out the pom that I posted. It works fine locally and will work fine on ci.jenkins.io

mawinter69 commented 6 months ago

your build fails on ci.jenkins.io because it is built with java8. But you need this to run with java11. You should first adjust the Jenkinsfile in a separate PR and merge it and then this PR should start working fine

buildPlugin(
  useContainerAgent: true,
  configurations: [
    [platform: 'linux', jdk: 11]
])
mawinter69 commented 6 months ago

you will need to do the change to the Jenkinsfile in a separate PR and merge it first. ci.jenkins.io is always taking the Jenkinsfile from the main branch to avoid that someone can just open a PR with a Jenkinsfile that tries to do harmful things. Once this is merged, revert to the pom.xml that I provided and this PR will build successfully.

Munishkumar92 commented 6 months ago

Will raise separate PR for the same