How to check inside Jenkins pipeline script if Ansible play-book succeeded or failed.

2020-03-31 Thread Shifa Shaikh
Below is my Jenkins pipeline script. I wish to call ex("ansible-failed") function whenever the ansible-playbook test.yml fails and thereby abort the pipeline. Below is my pipeline script. def ex(param) {echo "ABORT due to:" + param} pipeline{ stages{ stage

Re: How can I fix "Unreadable data" errors?

2020-03-31 Thread JonathanRRogers
I usually discard the unreadable data. Such data were usually added by a plugin that has since been uninstalled or upgraded. Don't discard data if you're not sure about its importance. This article outlines the options: https://support.cloudbees.com/hc/en-us/articles/218191768-Unreadable-Data On

How to parallelize builds across many agents that reside on different machines?

2020-03-31 Thread xcjvhv
Hi all, So I have the following requirements for the CI of our big monolith and I'd like to know if and how this is best achieved with Jenkins. - We have many different machines that we want to utilize as workers - Each machine will host many workers (as many as its cores, actually) - A single r

Re: Conditional pipeline not working

2020-03-31 Thread Gianluca
Hi, environment variables like "env.BRANCH_NAME" are not part of Jenkins core itself ... they are injected by additional plugins. So, yes, you have to use "Multibranch" project type ... because it's that project that will inject that environment variables from what I know. Look at the section "A

Re: Conditional pipeline not working

2020-03-31 Thread Ramadoni
Hi, I'm using freestyle project type, it should be "Multibranch" project type? Yes, i'm sure that my project is configured to checkout "master" branch. > git show-ref --tags -d # timeout=10 > Checking out Revision a57c28b1efb0749a9b89b72b540557e226b116bd (origin/master) > > git config core.spar

Re: Conditional pipeline not working

2020-03-31 Thread Gianluca
Hi, we are using if (env.BRANCH_NAME == 'master') in our pipeline and works great... so, if you tried with the line above ... this means that there is an error on how the pipeline is configured and run. Are you using Multibranch project type? Are you sure your project is configured to checkout

Re: Conditional pipeline not working

2020-03-31 Thread kurusetra
Hi, Already changed from 'origin/master' to 'master' but still no luck, pipeline still build the 'dev' image dan deploy to namespace 'dev', even i commit in 'master' branch... Yes i'm using github.com for codes repository... Thanks Kurusetra On Tuesday, March 31, 2020 at 9:00:40 PM UTC+7, Gian

Re: Conditional pipeline not working

2020-03-31 Thread Gianluca
We use similar conditionals ... and I think your error is in the branch name: env.BRANCH_NAME == 'origin/master' that should be instead: env.BRANCH_NAME == 'master' Because, if I'm guessing right, you are using Git ... and then the first part is the remote name, not the branch: / :-) So, in

How can I fix "Unreadable data" errors?

2020-03-31 Thread Gianluca
Hi, I'd like to understand what am I suppose to do to fix the errors showing into the "Unreadable data" section of the "Manage Old Data" page of Jenkins admin. Type: org.jenkinsci.plugins.workflow.job.WorkflowRun Name: Osirium-main scripts pipelines » Cluster Joins » PR-3315 #13 Error: CannotRes

Conditional pipeline not working

2020-03-31 Thread kurusetra
Hi, I just created jenkinsfile for deploy sample application to my k8s, but the deployment always build "dev" image and deploy to dev namespace in k8s. i tried to commit in master branch but still build "dev" image dan deploy to "dev" namespace in k8s. Please advice... whats wrong with my pipe

Re: Pipeline Authentication Error

2020-03-31 Thread Alex M
That worked, thank you! The `git clone` command I copied from my Dockerfile seemed to require ssh but this one does not. On Monday, March 30, 2020 at 12:44:12 PM UTC-4, Sat wrote: > > > > below worked for me, i never tried ssh: > git@repourl/reponame.git > > > > On Monday, March 30, 2020 at 5:34:

Re: "Push Notification" for Jenkins

2020-03-31 Thread Mark Waite
Yes, that's the best push notification unless your git server provides Web hooks which can provide the same capability. Git providers with supported web hooks: - GitHub - Bitbucket - Gitea - GitLab Others probably support them as well, but those I've seen mentioned in various places.

Jenkins on GCE - Deploying Google Cloud Function to different GCP project

2020-03-31 Thread 'Boris Teplitsky' via Jenkins Users
I have Jenkins installed on GCE VM (Debian) on project . I need to deploy a cloud function with source in Google cloud repository to project . I do it successfully from the shell of Jenkins VM. In order to deploy a function from pipeline I did follow: 1. Create a service a