Re: "keep this build forever" via rest api?

2022-07-25 Thread LnT
Thanks a lot. This works.
*java -jar jenkins-cli.jar keep-build  *

On Friday, July 22, 2022 at 6:52:56 PM UTC+5:30 dheinric wrote:

> Am Freitag, dem 22.07.2022 um 05:00 -0700 schrieb LnT:
>
> I get gone with toggleLogKeep in My old Jenkins ver. 2.190.1 
> 
>  
> Now upgraded to Jenkins 2.332.3 
> 
> Stopped now with *ERROR 403 No valid crumb was included in the request*
> what could be the issue ?
>
>
> If you were using username/pw to access the REST API in your old Jenkins, 
> you might need to switch to username/api-token now. Or, even simpler, 
> switch to the built-in SSH server:
>
> % ssh -p  -i path/to/keyfile user@jenkins-host help keep-build
> java -jar jenkins-cli.jar keep-build NAME BUILD#
> Mark the build to keep the build forever.
>  NAME   : Item name
>  BUILD# : Build number
>
>
> HTH...
>
> Dirk
>
> -- 
>
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18 <+49%202226%201596618>
> *Email*: dhei...@opentext.com
> *Website*: www.recommind.de
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, 
> Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
> This e-mail may contain confidential and/or privileged information. If you 
> are not the intended recipient (or have received this e-mail in error) 
> please notify the sender immediately and destroy this e-mail. Any 
> unauthorized copying, disclosure or distribution of the material in this 
> e-mail is strictly forbidden
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
> Weitergabe dieser Mail sind nicht gestattet.
>

-- 
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/0f6e86f1-0ccd-4988-b13b-32090f48a68bn%40googlegroups.com.


Re: "keep this build forever" via rest api?

2022-07-22 Thread 'Dirk Heinrichs' via Jenkins Users
Am Freitag, dem 22.07.2022 um 05:00 -0700 schrieb LnT:

I get gone with toggleLogKeep in My old Jenkins ver. 
2.190.1
Now upgraded to Jenkins 
2.332.3
Stopped now with ERROR 403 No valid crumb was included in the request
what could be the issue ?

If you were using username/pw to access the REST API in your old Jenkins, you 
might need to switch to username/api-token now. Or, even simpler, switch to the 
built-in SSH server:


% ssh -p  -i path/to/keyfile user@jenkins-host 
help keep-build
java -jar jenkins-cli.jar keep-build NAME BUILD#
Mark the build to keep the build forever.
 NAME   : Item name
 BUILD# : Build number

HTH...

Dirk

--

Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Email: dhein...@opentext.com
Website: 
www.recommind.de
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, 
Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. 
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht 
gestattet.

-- 
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/17fef8d3f820570c2ca4c1696dbc3a5f25b4d350.camel%40opentext.com.


Re: "keep this build forever" via rest api?

2022-07-22 Thread LnT
Hello Team,
Thanks for the inputs.
I get gone with toggleLogKeep in My old Jenkins ver. 2.190.1 
 
Now upgraded to Jenkins 2.332.3 
Stopped now with *ERROR 403 No valid crumb was included in the request*
what could be the issue ?
Thanks in Advance.
*Regards,*
*LnT*

On Monday, February 4, 2013 at 1:06:08 PM UTC+5:30 Chris Withers wrote:

> Hi Bruno,
>
> On 02/02/2013 14:43, Bruno Cunha wrote:
> > The /toggleLogKeep URL in the job can do that.
> >
> > For example:
> > http://[url]/job/[JOB-NAME]/20/toggleLogKeep
> >
> > This URL will change the lock status of the build 20.
>
> Thanks for this, it's almost what I want.
>
> The problem with the above is that I need to check what state the build 
> is in before calling toggle.
>
> Is there any way, through the REST api, that I can *ensure* the build is 
> kept forever?
>
> cheers,
>
> Chris
>
> -- 
> Simplistix - Content Management, Batch Processing & Python Consulting
> - http://www.simplistix.co.uk
>

-- 
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/b97a0bcb-8a7b-42a3-86b0-fab7b93d0244n%40googlegroups.com.


Re: keep this build forever via rest api?

2013-02-04 Thread Chris Withers

Hi Bruno,

On 02/02/2013 14:43, Bruno Cunha wrote:

The /toggleLogKeep URL in the job can do that.

For example:
http://[url]/job/[JOB-NAME]/20/toggleLogKeep

This URL will change the lock status of the build 20.


Thanks for this, it's almost what I want.

The problem with the above is that I need to check what state the build 
is in before calling toggle.


Is there any way, through the REST api, that I can *ensure* the build is 
kept forever?


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk

--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: keep this build forever via rest api?

2013-02-02 Thread Bruno Cunha
Hello Chris.

The /toggleLogKeep URL in the job can do that.

For example:
http://[url]/job/[JOB-NAME]/20/toggleLogKeep

This URL will change the lock status of the build 20.


There's an interesting thing that you can use too: you can list all the
keep forever builds by using this URL:
http://
[url]/api/xml?depth=2xpath=/hudson/job/build[keepLog=%22true%22]/urlwrapper=forever


Hope this helps.

Regards,
Bruno Candido Volpato da Cunha

On Thu, Jan 31, 2013 at 6:30 PM, Chris Withers ch...@simplistix.co.ukwrote:

 Hi All,

 What url would I hit to make sure a build of a job is marked as keep
 forever?

 Chris

 --
 Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk

 --
 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.comjenkinsci-users%2bunsubscr...@googlegroups.com
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .




-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




keep this build forever via rest api?

2013-01-31 Thread Chris Withers

Hi All,

What url would I hit to make sure a build of a job is marked as keep 
forever?


Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk

--
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.
For more options, visit https://groups.google.com/groups/opt_out.