Pass the data thru variable using curl command

2019-01-20 Thread panneerrselvam natarajan
Hi All,

I am using Jenkins for API Testing in Pega Environment.  I can send and 
receive response thru PostMan and SOAPUI and working fine.

But I want to automate using Jenkins Pipeline.

Please do let me know, How do i send the data/variable thru CURL command in 
pipeline. I sent the data but not displayed any error message and not 
getting any response also

I am sending the data which include special charector along with Data. 
Please do let me know the format.

Regards
Panner

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ad16f4d1-c745-442a-90df-b2b73b73e03f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins slave autoscaling in container platform (ECS or any other docker platforms)

2019-01-20 Thread Bill WANG
It is popular solution to start up new Jenkins slave via ssh from Jenkins 
master, for example, via ssh slaves plugin. But this solution is too old 
and only for VM or ec2 instance (Hosts, virtual hosts or physical hosts)

Now we are in world of containers.

Another solution is to use jnlp (java web client), agent name and secrets 
have to be defined at Jenkins master first, then we can start a jar with 
the defined agent name and secrets. But the name and secrets can't be 
defined on-fly when a new Agent try to register itself. 

What I want to achieve: 

1. Jenkins master and slaves are all running in containers (in same vpc)
2. I don't mind scaling master currently, so run with one master is fine.
3. define number of slaves (desired capacity) in auto-scaling group, the 
containers of slave should be started and registered themselves to master 

What I did,

1. manually define several slaves, hard code the slave name and secrets, I 
can see these slaves successfully registered in master. But if more agents 
then defined are scaled up, the rest can't be registered, with error 

```
Jenkins_slave is already connected to this master. Rejecting this 
connection.
```

So any suggestions to implement this idea?

The problem I need resolve are:

1. Any ways to define slaves on-fly when a new slave container started (it 
will be better to clean it in master later if the container is gone, if 
possible)

If above way is too hard, I think about the work around: 

1. I can pre-define 10 or even 30+ slaves in Jenkins master, any easier way 
to initialise this automatically, (think about the jenkins master is set up 
as a new server) . Real slaves' max capacity should be equal or less than 
number of pre-define slaves.

2. save the slave names and secrets to secret managers (such as vault, ssm 
parameter store or aws secret manager, etc)

3. When a container of slaves start, look for the agent name 
(jenkins_slave_) with its secret one by one, if `jenkins_slave_1` 
has been registered by another slave container, move on to next 
`jenkins_slave_2` 
and next.

Need your feedback and helps.

Thanks




-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1ab19cfd-1907-4b2f-bce0-0f9ad05b8411%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can we achieve the same effect as Jenkins 1's "Deploy artifacts to Maven repository" with Jenkins 2's pipelines?

2019-01-20 Thread Aaron Digulla
Hi Cyrille,

My main goal is prevent partial uploads in release builds since that could 
cause a lot of manual effort to clean up in Nexus. I'm not that concerned 
with partial snapshot uploads since we try to avoid them (we work a lot 
with branches).

But being able to run some additional tests before the upload phase would 
be nice, too (for example, to verify that some resources are in the right 
place in a WAR; that has bugged us in the past and it would be nice to 
check with an error message explaining how to fix it).

The last goal would be chained multi-branch builds. Imagine you want to 
build Maven and then a Maven plugin. For the plugin, you need a new feature 
in Maven. So you create two branches with the same name in two projects. 
During the build, you want the plugin job to see a Maven repo (local or 
remote) which contains the branch of the Maven build - but no one else!

A step which allows to deploy artifacts to Nexus would be the basis for 
this work.

Regards,

A. Digulla


On Friday, January 18, 2019 at 11:54:17 AM UTC+1, Cyrille Le Clerc wrote:
>
> Hello Aaron, thanks David
>
> As David said, the "Deploy artifacts to Maven repository" feature of the 
> Maven Job type does not exist "as is" in the Pipeline Maven integration.
>
> The recommended solution is to use the "-DdeployAtEnd=true" feature of 
> Maven. See 
> https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#deployAtEnd
>  
> .
>
> Can you please describe more your need. Is it one of
>
>- Prevent partial upload of maven artifacts when a multi module 
>project fails
>- Introduce intermediate build steps between the completion of "mvn 
>verify" and the upload of the artifacts (the "deploy" part of the maven 
>build)
>- Have retires if the artifact repository is unvailable
>- Other
>
> Cyrille
>
>
>
>
> On Thursday, January 17, 2019 at 6:23:40 PM UTC+1, David Karlsen wrote:
>>
>> I use the option deployAtEnd in the maven plugin to achieve this 
>>
>> Den tor. 17. jan. 2019, 16:59 skrev Cyrille Le Clerc <
>> clec...@cloudbees.com>:
>>
>>> Hello AAron,
>>>
>>> This capability is niot av
>>>
>>> On Wednesday, January 16, 2019 at 5:16:22 PM UTC+1, Aaron Digulla wrote:

 Hello,

 For releases, I'd like to build and test all Maven modules and after 
 the build, deploy everything at once (otherwise, someone has to waste time 
 to clean up the mess in Nexus).

 In Jenkins 1, this was simple: Build with "mvn clean install" and add a 
 post-build job "Deploy artifacts to Maven repository".

 Jenkins 2 still maintains a list of all artifacts which need to be 
 deployed but I couldn't find the out how to recreate the old post-build 
 job.

 How do I do that?

 Regards,

>>> -- 
>>> 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.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/8813b207-d8f5-4718-9401-a130b475899b%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b8e5731b-3549-465f-a177-252f6c4fe6a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.