how to execute a shell script post build step in Jenkins

0 votes
I am new to Jenkins. I am trying to run a dummy project on Jenkins and it requires Jenkins to run a shell script post build action. How to do this?
Jun 24, 2019 in Jenkins by Arvind
• 3,040 points
28,562 views

2 answers to this question.

0 votes
When you configure your jenkins job there is a section where you can specify post build actions. If this plugin is not visible then you need to download it. After that you can specify the script or the contents of the script. Click on apply and run the job.
answered Jun 25, 2019 by Neel
• 3,020 points
0 votes

You could use the Post Build Task Plugin in order to do this.

When you install this plugin, your project configuration page gets additional "Post build task" option as illustrated below:

This should do!

answered Jul 31, 2019 by Sirajul
• 59,230 points
How can achieve the same using DSL script?
Hi@Dilip,

You can use Groovy language and write down your requirement. You can check the Groovy syntax from the below link.

https://www.tutorialspoint.com/groovy/groovy_basic_syntax.htm

Related Questions In Jenkins

+1 vote
3 answers

How to auto build a job in jenkins if there is any change in code on Github repository?

To automatically run build on code commit, follow ...READ MORE

answered Jul 31, 2019 in Jenkins by Sirajul
• 59,230 points
76,202 views
0 votes
1 answer

How to fix a broken build for my project in jenkins?

The user needs to open the console ...READ MORE

answered Oct 11, 2019 in Jenkins by Sirajul
• 59,230 points
8,025 views
0 votes
1 answer

How to run a script as root in Jenkins?

Hi@akhtar, You need to run the script with ...READ MORE

answered Oct 26, 2020 in Jenkins by MD
• 95,440 points
7,467 views
+2 votes
5 answers
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,520 views
+2 votes
1 answer
+2 votes
1 answer

How to run a job in Jekins by a different user ?

To run a job by a specific ...READ MORE

answered Jun 17, 2019 in Jenkins by Neel
• 3,020 points
26,752 views
0 votes
1 answer

How to run selenium script with TestNG on Jenkins?

You can build this project in Jenkins ...READ MORE

answered Jun 19, 2019 in Jenkins by Neel
• 3,020 points
3,771 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP