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

Error while executing candidate task. #196

Closed
hsharma86 opened this issue Sep 8, 2020 · 2 comments
Closed

Error while executing candidate task. #196

hsharma86 opened this issue Sep 8, 2020 · 2 comments

Comments

@hsharma86
Copy link

hsharma86 commented Sep 8, 2020

Hi

I am facing an issue now while executing the 'candidate' task with a Jenkins pipline. The issue is:

The jenkins job is running on a master node. While executing the job with the candidate task, I first have to give the access using chmod command to gradle wrapper script file('/gradlew') which resides in the root folder of project. I believe the plugin is considering this as a change to a file and asks it to be committed to execute candidate task.

The steps in my build script are:
stage('Build') {
steps {
script {
sh 'chmod +x gradlew'
sh './gradlew clean build candidate -x test'
}
}
}

The error thrown by plugin is:

  • What went wrong:
    An exception occurred applying plugin request [id: 'nebula.release', version: '13.0.0']

Failed to apply plugin 'nebula.release'.
> Final and candidate builds require all changes to be committed into Git.
Found unstaged changes:
[M] gradlew

Is there any way around it?.

@chali
Copy link
Member

chali commented Sep 8, 2020

You can do chmod +x gradlew and commit/push the change into the repository. That way you don't need to do it as part of your build every time and you will also solve the error.

@chali chali closed this as completed Sep 8, 2020
@hsharma86
Copy link
Author

Hi @chali

I already tried it, but then it gives the permission denied error:

+ ./gradlew clean build candidate -x test
/workspace/service@tmp/durable-f7fdd223/script.sh: line 1: ./gradlew: Permission denied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants