griddynamics / mpl

[IT-36925] Jenkins Shared Modular Pipeline Library
https://blog.griddynamics.com/developing-a-modular-pipeline-library-to-improve-devops-collaboration/
Apache License 2.0
156 stars 97 forks source link

Adding gradle support #75

Open Napo2k opened 3 years ago

Napo2k commented 3 years ago

When working into taking MPL into my current company, I made an effort to make it compatible with gradle - since we use gradle a lot more than maven This PR brings those changes back into mainline, hopefully without breaking maven support

Napo2k commented 3 years ago

In the CircleCI interface, is there a way that I can see what the exact command is being run? I can see

#!/bin/bash -eo pipefail
docker run -e "MPL_VERSION=${CIRCLE_SHA1}" -e "MPL_CLONE_URL=$(echo "${CIRCLE_REPOSITORY_URL}" | sed 's|git@github.com:|https://github.com/|')" --name jenkins --rm -it --volumes-from jenkins-home jenkinsbro-master

but I'd like to see the value of the variables :)

I'd also love to see how exactly is the test pipeline job configured...

From MPLPipelineTest.groovy

    def scm = new GitSCM(MODULE.clone_url)
    scm.branches = [new BranchSpec(MODULE.branch_spec ?: 'master')]
    scm.userRemoteConfigs = GitSCM.createRepoList(MODULE.clone_url, MODULE.credentials_id ?: '')

Is it using the right repo? :D

sparshev commented 3 years ago

And about hte build - yeah, looks like it not supports the fork repos for now, will check what to do to fix that.

sparshev commented 3 years ago

Hi @Napo2k , I fixed the issue with building from the fork - so please rebase your changes on top of master branch.

Napo2k commented 3 years ago

I will implement the changes when I have time FWIW: I copied the build.gradle I was using locally, so it might be "polluted" to a certain degree. Some dependencies I had to fix since it wasn't able to find some classes when compiling or running tests. Thanks a lot for your feedback!