Pipeline with tests and deployment

82 views
Skip to first unread message

Bert

unread,
Mar 1, 2017, 2:08:05 AM3/1/17
to Jenkins Users
Hello everyone,

We recently switched to the declarative pipeline approach. The current pipeline is very simple:
  1. Build
  2. Setup test server
  3. Run integration tests
  4. Post: Gather test results
No I would like to add a user input to decide whether to take it to the next stage: deploy it to acceptance test. The user providing that input should be able to check the test results of that job, so the junit step needs to move out of the post block, but it needs to remain unconditional/always.

How do I do that?
Related: are you aware of serious public deployment pipelines (using the declarative syntax) with multiple deployment stages and user inputs?

Thanks in advance,
Bert

Baptiste Mathus

unread,
Mar 1, 2017, 4:20:44 AM3/1/17
to jenkins...@googlegroups.com
For user input, you should be able to use the "input" step.

For real world public usage of Declarative, there's mainly one I've heard of (Declarative reached 1.0 less than one month ago), I've seen a tweet for a mozilla project but can't find it again.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/cd0d4cd6-df50-4e41-a0ce-8ab41786d53c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bert

unread,
Mar 1, 2017, 4:34:44 AM3/1/17
to Jenkins Users, m...@batmat.net
Thanks!
The input I figured out. Gathering the JUnit results (unconditionally) before asking for user input is where I'm stuck at.

Regards,
Bert


On Wednesday, March 1, 2017 at 10:20:44 AM UTC+1, Baptiste Mathus wrote:
For user input, you should be able to use the "input" step.

For real world public usage of Declarative, there's mainly one I've heard of (Declarative reached 1.0 less than one month ago), I've seen a tweet for a mozilla project but can't find it again.
2017-03-01 8:08 GMT+01:00 Bert <be...@famroos.nu>:
Hello everyone,

We recently switched to the declarative pipeline approach. The current pipeline is very simple:
  1. Build
  2. Setup test server
  3. Run integration tests
  4. Post: Gather test results
No I would like to add a user input to decide whether to take it to the next stage: deploy it to acceptance test. The user providing that input should be able to check the test results of that job, so the junit step needs to move out of the post block, but it needs to remain unconditional/always.

How do I do that?
Related: are you aware of serious public deployment pipelines (using the declarative syntax) with multiple deployment stages and user inputs?

Thanks in advance,
Bert

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Bert

unread,
Mar 1, 2017, 4:38:11 AM3/1/17
to Jenkins Users, m...@batmat.net
The Tweet you referred to is this one. The Jenkinsfile is here on GitHub.
Thanks for mentioning it.

Regards,
Bert


On Wednesday, March 1, 2017 at 10:20:44 AM UTC+1, Baptiste Mathus wrote:
For user input, you should be able to use the "input" step.

For real world public usage of Declarative, there's mainly one I've heard of (Declarative reached 1.0 less than one month ago), I've seen a tweet for a mozilla project but can't find it again.
2017-03-01 8:08 GMT+01:00 Bert <be...@famroos.nu>:
Hello everyone,

We recently switched to the declarative pipeline approach. The current pipeline is very simple:
  1. Build
  2. Setup test server
  3. Run integration tests
  4. Post: Gather test results
No I would like to add a user input to decide whether to take it to the next stage: deploy it to acceptance test. The user providing that input should be able to check the test results of that job, so the junit step needs to move out of the post block, but it needs to remain unconditional/always.

How do I do that?
Related: are you aware of serious public deployment pipelines (using the declarative syntax) with multiple deployment stages and user inputs?

Thanks in advance,
Bert

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Bert

unread,
Mar 2, 2017, 1:37:48 AM3/2/17
to Jenkins Users, m...@batmat.net
Unconditionally gathering the JUnit results was actually simple: just add a post block each test stage, see the Jenkinsfile here.

The input is a little harder. I know how to do it through a script, but I'd like to stay in the declarative model. See my follow on question here.

Regards,
Bert
Reply all
Reply to author
Forward
0 new messages