How to re-build task on Jenkins until build Failed? - jenkins-plugins

I found this plugin can allow us to automatically reschedule a build after a build failure. But my situation is not so. I have some random failure cases, and I added some logging stuff and re-run. I hope it can re-run forever until it catches the error. Can I make it?

Related

Mark Job as Unstable

I have setup a CI pipeline in Jenkins for my angular application. I have two simple jobs at the moment. Both my jobs share a common work space. The first job basically does build (npm install, bower install etc). It is working fine. The second job basically runs unit test(gulp test). I am using karma for test and phantom. So both jobs are running fine at the moment.
Eventually I will add more jobs for my integration test and code analysis etc. So basically each successful job will trigger the next one in the pipeline to run.
I was wondering is it possible to mark a job as unstable if something fails. For example in my second job where I run my unit testing, say that even one test case fails i would like to mark it unstable to that it doesn't trigger any further jobs. Is this possible to do and if so what is the most intelligent and efficient way to do it? And since i never had a test case fail i wouldn't know this but does JENKINS mark job unstable automatically if one test case fails ???
Does Jenkins mark [a build as] unstable automatically if one test case fails?
Yes. It will depend on the exact testing plugin you're using for Jenkins, but I imagine all of them should implement this correctly.
I would like to mark [a build] unstable to that it doesn't trigger any further [downstream] jobs
It sounds like you're already using the "Build other projects" post-build action. There you just need to make sure that the default "Trigger only if build is stable" option is selected.
Then, if any tests fail, the build will be unstable, and a downstream build will not be triggered.

Cron not working automatically for Drupal 7

I configured cron in Drupal 7 for every 1 hour to delete "watchdog" table data. However, it is not working fine as expected when done automatically, even though it is working fine manually. What could be the problem with cron running automatically for specified intervals of time? Please, kindly help me with any alternate options, if possible.
Good morning.
Maybe one of your installed modules has a bad implementation of hook_cron(). An error in this hook would provoke the whole cron process to fail. You can use Cron Debug module to check which of the modules is failing during the cron execution. After that, you may consider disabling the module, or checking what is going wrong and fixing it.
Hope it helps.

Parametrized job using build pipeline plugin on Jenkins

I've been using build pipeline plugin with Jenkins (v1.534) for a long time now and recently I've tried to create a pipeline with the same job (using different parameters) twice and it seems not possible. It looks like this:
Job A (param env=dev) -> Job B -> Job A (param env=qa)
Is this possible using build pipeline plugin (v1.4)?
You can try the Jenkins FLOW plugin... https://wiki.jenkins-ci.org/display/JENKINS/FLOW+Plugin
I think this is only possible if you have Job B automatically setup to trigger job A again, not manual build step.
Job B will automatically trigger downstream via the parameter trigger job plugin. This works fine if you use the automatic build downstream, but the manual hold feature post build job is not smart enough yet to continue on.
Jenkins also has massive failing in plucking upstream variables into downstream jobs, like if jobs are run out of order on a pipeline.
At my work, I duplicate jobs and chain them Build->Deploy to Dev->Deploy to QA->Deploy....XXX and so forth.

Using Google Appengine Taskqueue in different deploying version

When submitting a task from an version, the task ends up in different version for execution. How do I make the task executing in the same deploying version?
Note:
I tried 'target' in queue.xml, the result is the same. Tasks will be executed in random different version. It is not always the same.
What's wrong with my setup?
[UPDATE]
<queue>
<name>shopinionMessage</name>
<rate>10/s</rate>
<retry-parameters>
<task-retry-limit>60</task-retry-limit>
<min-backoff-seconds>1</min-backoff-seconds>
<max-backoff-seconds>30</max-backoff-seconds>
<max-doublings>0</max-doublings>
</retry-parameters>
<target>2</target>
</queue>
https://developers.google.com/appengine/docs/java/config/queue#target says that target is
A string naming a module/version, a frontend version, or a backend, on which to execute this task.
Do you have modules perhaps? If yes, you should try my-version.my-module as target; unfortunately you won't have any luck with that either as of now: https://code.google.com/p/googleappengine/issues/detail?id=10954
By the way, without a target it shouldn't be random regarding where the task is executed:
If target is unspecified, then tasks are invoked on the same version of the application where they were enqueued. So, if you enqueued a task from the default application version without specifying a target on the queue, the task is invoked in the default application version. Note that if the default application version changes between the time that the task is enqueued and the time that it executes, then the task will run in the new default version.

Heroku db:push silently hangs on remote connection

I'm trying to get spree deployed onto Heroku, but using heroku db:push is failing. There are no error messages and I don't know where it would keep logs of this: There's no information at the heroku logs. Taps just asks if I want to confirm the action and then nothing. Blackness, for hours. I one time got it to spit out a "SequelConnectionError - Interrupt" after cancelling the task in Git bash. I've been looking for days on the search engines and heroku support without success. Seems like it's finding my local stuff just fine, but hangs off into an infinite loop when trying to connect remotely. I looked in wireshark but couldn't see anything out of the ordinary, though there was lots of noise.
Wondering if:
Anyone knows where taps/sequel/heroku task would keep logs? 'heroku logs' was dry of any attempts to push database.
If this is a recent error? I tried rolling taps back but some dependency wanted it at newest version.
Thanks,
Cameorn Carroll

Resources