Re: Latest GitHub Branch Source not scanning with credentials?

2019-08-21 Thread Mark Waite
To bring this thread to closure, we discovered in a diagnostic session that
I had defined the credentials domain to be restricted to hosts named '
github.com'.  That precludes use of the 'api.github.com' host which is
needed for the API calls from the GitHub Branch Source plugin.

Define credential domains correctly, and the problem is resolved.

On Tue, Aug 20, 2019 at 7:40 AM Mark Waite 
wrote:

> The root issue seems to be the credentials being defined in the parent
> folder instead of being defined at the root.  I have several credentials
> defined in that folder and they were working previously as far as I can
> tell.  However, I'll need to do more searching to understand which change
> first introduced the behavior.
>
> On Mon, Aug 19, 2019 at 1:38 PM Mark Waite 
> wrote:
>
>>
>>
>> On Mon, Aug 19, 2019 at 9:13 AM Devin Nusbaum 
>> wrote:
>>
>>> If I understand correctly, the problem is that in the non-working case,
>>> branch indexing ends up using anonymous credentials instead of the ones you
>>> specified (and thus timing out due to rate limits), rather than failing
>>> with an explicit error message?
>>>
>>
>> Mostly correct.  Branch indexing uses anonymous credentials instead of
>> the ones I specified.  That takes a very long time due to rate limits.
>>
>> It is a public repository, so it will not fail with an error message when
>> not using credentials, it just takes a very long time because it exhausts
>> the anonymous rate limits very quickly.
>>
>>
>>>
>>> I don’t think it should matter, but just in case, what versions of
>>> workflow-cps-global-lib are you running in the working and non-working
>>> cases?
>>>
>>>
>> Working and non-working cases are both using workflow-cps-global-lib 2.15.
>>
>> I'll spend more time today investigating further in an attempt to
>> identify the most relevant differences between the working and the
>> non-working cases.
>>
>> Mark Waite
>>
>>
>>> On Aug 17, 2019, at 12:54, Mark Waite  wrote:
>>>
>>> I've updated to GitHub Branch Source 2.5.6 and seem to have a GitHub
>>> multibranch Pipeline job that refuses to use my credentials when scanning
>>> the repository.  The repository is a public repository, but I want it to
>>> scan the repository with my credentials so that I can use the larger GitHub
>>> API rate limits that are allowed by authenticated access.
>>>
>>> I see a job configuration change from "Repository Scan - Deprecated
>>> Visualization" to "Repository HTTPS URL" and I see the addition of the
>>> "Validate" button in the user interface to check my credentials.  I've
>>> validated the credentials using the "Validate" button, both for the job
>>> itself and for the Pipeline shared library that is defined in the job.
>>> I've created a new GitHub personal access token with 'repo' permission, and
>>> still can't persuade the pipeline scanner to use the credential.  The
>>> credentials I'm using are assigned to the parent folder of the multibranch
>>> Pipeline job.
>>>
>>> I have another machine which is able to scan with credentials and GitHub
>>> branch source using the same repository.  Some of the differences between
>>> the working and the non-working cases include:
>>>
>>>- Working - Pipeline shared library is defined at root, not working
>>>when defined in the multibranch Pipeline job
>>>- Working - Credentials are defined globally, not working when
>>>defined in the parent folder of the multibranch Pipeline job
>>>- Working - Git plugin 4.0 beta release, not working when using git
>>>plugin 3.11.0
>>>
>>> I suspect there are many more differences between the working and the
>>> non-working cases, but wanted to identify those few in case someone has
>>> more insights to offer.
>>>
>>> Has anyone else seen a similar behavior?
>>>
>>> Any pointers of things I should investigate (other than varying the
>>> parameters which are different between working and non-working cases, I'll
>>> certainly do that)?
>>>
>>> Job configuration screen looks like this (apologies for the wide
>>> screen..):
>>>
>>> 
>>>
>>>
>>>
>>> --
>>> 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/d5bb65d3-7ec7-45ee-bfa6-fbf8d99bd6cc%40googlegroups.com
>>> 
>>> .
>>> 
>>>
>>>
>>> --
>>> 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/C67B3A88-4A6

node js project with multiple repos

2019-08-21 Thread Geetha Sundaram

As we have multiple repos with inter connecting, 

1. First,  have to clone the container repo(main), it is stable, don't want 
to clone for every builds. - its one time setup

2. after run npm run initialize-project and npm install on container repo, 
it will create the projects under container , the projects are nothing but 
other repos. developers will commit the code to project repos. 

How can I trigger the build when commit to second repo




-- 
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/1fcdb5ce-04ac-46d7-b4e9-b137a247fb15%40googlegroups.com.


Re: how do I modify one option in scm.getUserRemoteConfigs without having to manually set all the options?

2019-08-21 Thread Mark Waite
I think you can assign the original to a new variable, then modify only the
precise portions that need to be changed.

Like this:

// Narrow the respec to only this branch
def branch = 'JENKINS-59016'
def myRemoteConfigs = scm.userRemoteConfigs
myRemoteConfigs[0].refspec =
"+refs/heads/${branch}:refs/remotes/origin/${branch}"

Then use the new variable as the value as in:

   userRemoteConfigs: myRemoteConfigs

Mark Waite

On Wed, Aug 21, 2019 at 2:56 PM red 888  wrote:

> in my jenkins pipeline i have this:
>
>
> checkout([$class: 'GitSCM',
>   branches: [[name: "${env.BRANCH_NAME}"]],
>   doGenerateSubmoduleConfigurations: false,
>   extensions: [
>   [$class: 'SubmoduleOption',
>disableSubmodules: false,
>parentCredentials: true,
>recursiveSubmodules: true,
>reference: '',
>trackingSubmodules: true],
>   [$class: 'CloneOption', timeout: config.timeout],
>   [$class: 'CheckoutOption', timeout: config.timeout],
>   [$class: 'GitLFSPull']
>   ],
>   submoduleCfg : [],
>   userRemoteConfigs: [[
>   //scm.userRemoteConfigs,
>   refspec: '+refs/tags/*:refs/remotes/origin/tags/*'
>   ]]
> ])
>
>
> I just want to modify the refspec and use the rest of the defaults in
> scm.userRemoteConfigs. How can I do that without having to manually set all
> of them because Im no longer just passing in scm.userRemoteConfigs
>
>
> Im trying to get jenkins to trigger a build when it sees a new tag (like
> it does with new branches) right now it indexes and gets the new tag but
> doesn't run a build
>
> --
> 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/7e5c1679-a40c-4364-b149-282008953df5%40googlegroups.com
> 
> .
>


-- 
Thanks!
Mark Waite

-- 
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/CAO49JtHDWP490_1YbKVUgX0ZkYxOV60A9SCQPkdgioitn70k3w%40mail.gmail.com.


Moving to kubernetes 1.13.10 stopped all my build pipelines, need help

2019-08-21 Thread Anoop Sidhu
slave pods are created and destoyed right away

INFO: Template for label worker-c51af0d3-a76a-4439-a27e-27cb1e7a0347: 
Kubernetes Pod Template
Aug 22, 2019 2:23:01 AM 
org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher launch
INFO: Created Pod: 
development/worker-c51af0d3-a76a-4439-a27e-27cb1e7a0347-qwkww-mk35s
Aug 22, 2019 2:23:01 AM 
io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$1 onFailure
WARNING: Exec Failure: HTTP 403, Status: 403 -
java.net.ProtocolException: Expected HTTP 101 response but was '403 
Forbidden'
at 
okhttp3.internal.ws.RealWebSocket.checkResponse(RealWebSocket.java:229)
at 
okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:196)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Aug 22, 2019 2:23:01 AM 
org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher launch

-- 
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/2677abd1-2eda-4c71-8d9b-0c2b1e96b34a%40googlegroups.com.


Re: Jenkins: user is missing the Overall/Read permission - Issue

2019-08-21 Thread Mark Waite
Doesn't it resolve the issue if you check the "Read" box in the "Overall"
column for the user "manual"?

Mark Waite

On Wed, Aug 21, 2019 at 7:15 PM 'joe khese' via Jenkins Users <
jenkinsci-users@googlegroups.com> wrote:

> Hello
>
> did you get the solution to this error? I'm currently battling with the
> same error
>
> On Saturday, 3 March 2018 15:07:07 UTC+1, Poovaraj Thangamariappan wrote:
>>
>> Hello,
>>
>> I have created  *manual* user in Manger User and I have configured in  
>> Matrix-based
>> security. It is showing Manual user is missing the Overall/Read
>> permission'while login into jenkins.
>>
>> Pleaes find thebelow screenshot and config.xml file. Please help me to
>> fix this issue.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Regards,
>> Poovaraj
>>
>>
>> --
> 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/53b42b7e-cf04-4aec-a028-0752d4cddd28%40googlegroups.com
> 
> .
>


-- 
Thanks!
Mark Waite

-- 
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/CAO49JtFAYrLWEyWEeRq5gxk%3DQABWZi4wZjUt_dQJyUco5hSGuA%40mail.gmail.com.


Re: Jenkins: user is missing the Overall/Read permission - Issue

2019-08-21 Thread 'joe khese' via Jenkins Users
Hello

did you get the solution to this error? I'm currently battling with the 
same error

On Saturday, 3 March 2018 15:07:07 UTC+1, Poovaraj Thangamariappan wrote:
>
> Hello,
>
> I have created  *manual* user in Manger User and I have configured in  
> Matrix-based 
> security. It is showing Manual user is missing the Overall/Read 
> permission'while login into jenkins.
>
> Pleaes find thebelow screenshot and config.xml file. Please help me to fix 
> this issue.
>
>
>
>
>
>
>
>
>
>
>
> Regards,
> Poovaraj
>
>
>

-- 
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/53b42b7e-cf04-4aec-a028-0752d4cddd28%40googlegroups.com.


Jenkins cant find dependent file

2019-08-21 Thread Pietto Vasco
I am trying to create a jenkins job to build ami using packer. 

My packer json has 1 dependent file.  When I run my build it fails with:

Running as SYSTEM

Building in workspace C:\Program Files (x86)\Jenkins\workspace\packer build

[packer build] $ cmd /c call C:\Windows\TEMP\jenkins6534957738706036538.bat

 

C:\Program Files (x86)\Jenkins\workspace\packer build>packer build 
C:\Users\Administrator\Documents\vaec-amiauto\vaec-encryptedcrispamiwithoutupdate.json

amazon-ebs output will be in this color.

 

1 error(s) occurred:

 

* user_data_file not found: ec2-userdata.ps1

 

C:\Program Files (x86)\Jenkins\workspace\packer build>exit 1

Build step 'Execute Windows batch command' marked build as failure

Finished: FAILURE



This file is stored locally in the same directory as packer. When running 
packer without jenkins, works fine.


Where do I specify the path for jenkins to look for this dependent file?


-- 
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/4e55d123-52b1-43f8-99f0-d601afe232b9%40googlegroups.com.


Where do you set the Task Role ARN field on the Amazon EC2 Container Service?

2019-08-21 Thread Norman Khine
Hello,
I have reached 
https://ec2spotworkshops.com/amazon-ec2-spot-cicd-workshop/lab4.html#reconfigure-jenkins-to-use-build-agents-running-in-containers
 
section of this guide, but I am having an issue with the UI, in that i have 
this, https://imgur.com/EPTdS8S

Where as in the guide, point 11. advises to click on `Advanced` again and 
set the Task Role ARN field?

I am running Jenkins ver. 2.176.2 

These are the current pluggins that I have installed:

JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin 
(jquery-detached): 1.2.1
Gradle Plugin (gradle): 1.33
Folders Plugin (cloudbees-folder): 6.9
Workspace Cleanup Plugin (ws-cleanup): 0.37
Durable Task Plugin (durable-task): 1.30
Plain Credentials Plugin (plain-credentials): 1.5
Pipeline: Stage View Plugin (pipeline-stage-view): 2.12
Slack Upload Plugin (slack-uploader): 1.7
EC2 Fleet Jenkins Plugin (ec2-fleet): 1.10.2
GitHub plugin (github): 1.29.4
bouncycastle API Plugin (bouncycastle-api): 2.17
Pipeline: Job (workflow-job): 2.33
Pipeline: Model API (pipeline-model-api): 1.3.9
Pipeline: Step API (workflow-step-api): 2.20
Timestamper (timestamper): 1.10
Nested View Plugin (nested-view): 1.17
MapDB API Plugin (mapdb-api): 1.0.9.0
Pipeline (workflow-aggregator): 2.6
LDAP Plugin (ldap): 1.20
Pipeline: Declarative Agent API (pipeline-model-declarative-agent): 1.1.1
Docker Commons Plugin (docker-commons): 1.15
Authentication Tokens API Plugin (authentication-tokens): 1.3
Pipeline: Declarative Extension Points API (pipeline-model-extensions): 1.3.9
Pipeline: Stage Tags Metadata (pipeline-stage-tags-metadata): 1.3.9
Pipeline: Multibranch (workflow-multibranch): 2.21
Amazon Web Services SDK (aws-java-sdk): 1.11.594
Apache HttpComponents Client 4.x API Plugin 
(apache-httpcomponents-client-4-api): 4.5.5-3.0
SSH Credentials Plugin (ssh-credentials): 1.17.1
Matrix Project Plugin (matrix-project): 1.14
SSH Slaves plugin (ssh-slaves): 1.30.1
Variant Plugin (variant): 1.3
Sidebar Link (sidebar-link): 1.11.0
Lockable Resources plugin (lockable-resources): 2.5
Pipeline: Supporting APIs (workflow-support): 3.3
Branch API Plugin (branch-api): 2.5.4
Display URL API (display-url-api): 2.3.2
PAM Authentication plugin (pam-auth): 1.5.1
JavaScript GUI Lib: Moment.js bundle plugin (momentjs): 1.1.1
JavaScript GUI Lib: ACE Editor bundle plugin (ace-editor): 1.1
Pipeline: Nodes and Processes (workflow-durable-task-step): 2.33
Pipeline: Shared Groovy Libraries (workflow-cps-global-lib): 2.15
Subversion Plug-in (subversion): 2.12.2
Pipeline: Stage Step (pipeline-stage-step): 2.3
Token Macro Plugin (token-macro): 2.8
Docker Pipeline (docker-workflow): 1.19
Git client plugin (git-client): 2.8.0
GIT server Plugin (git-server): 1.8
JSch dependency plugin (jsch): 0.1.55.1
Structs Plugin (structs): 1.20
Pipeline: REST API Plugin (pipeline-rest-api): 2.12
Git plugin (git): 3.12.0
Matrix Authorization Strategy Plugin (matrix-auth): 2.4.2
Node Iterator API Plugin (node-iterator-api): 1.5.0
Build Timeout (build-timeout): 1.19
JavaScript GUI Lib: Handlebars bundle plugin (handlebars): 1.1.1
OWASP Markup Formatter Plugin (antisamy-markup-formatter): 1.5
Oracle Java SE Development Kit Installer Plugin (jdk-tool): 1.3
Pipeline: SCM Step (workflow-scm-step): 2.9
Pipeline: Milestone Step (pipeline-milestone-step): 1.3.1
GitHub Branch Source Plugin (github-branch-source): 2.5.6
Pipeline: Build Step (pipeline-build-step): 2.9
Pipeline: Input Step (pipeline-input-step): 2.10
Trilead API Plugin (trilead-api): 1.0.3
Pipeline: API (workflow-api): 2.36
Jackson 2 API Plugin (jackson2-api): 2.9.9.1
Amazon EC2 Container Service plugin with autoscaling capabilities 
(scalable-amazon-ecs): 1.0
GitHub API Plugin (github-api): 1.95
Custom View Tabs Plugin (custom-view-tabs): 1.3
Script Security Plugin (script-security): 1.62
Mailer Plugin (mailer): 1.24
Pipeline: GitHub Groovy Libraries (pipeline-github-lib): 1.0
Amazon EC2 plugin (ec2): 1.45
SCM API Plugin (scm-api): 2.6.3
Pipeline: Declarative (pipeline-model-definition): 1.3.9
JUnit Plugin (junit): 1.28
Email Extension Plugin (email-ext): 2.66
packer (packer): 1.5
CloudBees AWS Credentials Plugin (aws-credentials): 1.27
Pipeline Graph Analysis Plugin (pipeline-graph-analysis): 1.10
Pipeline: Basic Steps (workflow-basic-steps): 2.18
Credentials Binding Plugin (credentials-binding): 1.20
Resource Disposer Plugin (resource-disposer): 0.13
Slack Notification Plugin (slack): 2.32
Command Agent Launcher Plugin (command-launcher): 1.3
Credentials Plugin (credentials): 2.2.1
Amazon Elastic Container Service plugin (amazon-ecs): 1.22
Pipeline: Groovy (workflow-cps): 2.73

Any advice is much appreciated


-- 
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/a9437530

Re: Converting to pipeline questions

2019-08-21 Thread Louis Elston
Installed Eclipse and https://marketplace.eclipse.org/content/jenkins-editor, 
and can edit Declarative scripts (regular pipeline job, not Blue Ocean 
MultiBranch job).  Storing the Jenkinsfile in SCM, but naming it different 
(ex: Jenkinsfile9-2), so this way if anyone does create a MultiBranch 
pipeline later, it will not be picked up and executed.  Also put code in 
script to not execute if the branch parameter passed in is not the correct 
branch...

pipeline {
agent any
parameters {
string(defaultValue: '9.2', description: 'Branch to build', name: 
'BUILD_BRANCH')
}
stages { 
  stage('Run if the correct branch was selected') {
when {
  expression {params.BUILD_BRANCH == "9.2"}
}
stages {
  stage('9-2 Build') {
steps { 
script {
  if (env.BUILD_BRANCH == '9.2') {
echo 'Branch is 9.2'
  } else {
echo BUILD_BRANCH
echo "Branch is ${env.BUILD_BRANCH}"
  }
}
}
  }   
  stage('Test') {
steps {
  echo '9-2 Testing..'
}
  } 
  stage('9.2 Deploy') {
steps {
  echo 'Deploying'
}
  }  
  }
}   
  }
}


On Friday, August 16, 2019 at 12:05:45 PM UTC-4, Louis Elston wrote:
>
> Currently (in the classic\non pipeline jobs), when a product version is 
> released, we disable that job (ex productversionv1), and copy the job to 
> productversionv2 and set the job parameters for the correct branch to use.  
> Occasionally we do need to do a fix in v1, so it is just a matter of 
> enabling the job, running it, and disabling it again. Quick, simple, easy 
> to do.  Both v1 and v2 jobs are always available.
>
>  
>
> #4 “change the definition of the multibranch pipeline”.  That means that 
> for the scenario 
>
>  above, that I must modify the job configuration a few times.  Once to run 
> v1, then to set back to run v2, and no option to have them both available 
> to run separately.
>
>  
>
> The reason that I wanted to use Blue Ocean is for the pipeline editor, I 
> did not want to have to get any deeper than I needed to in Groovy (although 
> I believe that it will not be possible to eliminate its use).
>
>  
>
> I am not seeing Blue Ocean MultiBranch job as the way to go (and you can 
> only do MultiBranch in Blue Ocean).  I am even hesitant to store the 
> Jenkinsfile\script in SCM (scripted or declarative).  While currently I am 
> the only person touching the build system, who knows what the future 
> holds.  The next person to maintain the build system may create a 
> MultiBranch job that will then pick up and execute all the Jenkinsfiles in 
> the separate versioned branches, thus creating builds that are unwanted and 
> updating those older version branches.  Thus, I am considering storing the 
> pipeline script in the config.xml file instead of a Jenkinsfile.
>
>  
>
> If anyone has any other suggestions…I am listening.  Thanks.
>
> On Thursday, August 15, 2019 at 8:56:55 PM UTC-4, Mark Waite wrote:
>>
>>
>>
>> On Thu, Aug 15, 2019 at 12:20 PM Louis Elston  
>> wrote:
>>
>>> In Blue Ocean, if you create a new pipeline, and there is a Jenkinsfile 
>>> in any branch in that repository, when you select “Create Pipeline”, it 
>>> will execute the Jenkinsfile in each of those branches.  At this point, 
>>> there is no ability to Configure anything.  Yes, if you then configure that 
>>> new job you can restrict it to only execute on a particular branch.  This 
>>> does not solve my problem.  Lets say that in ProductVersion1 branch there 
>>> was a Jenkinsfile.  We are now Working on Version 2 of the product, and now 
>>> have ProductVersion2 branch, which also has a JenkinsFile.  If I create a 
>>> new Blue Ocean pipeline job (which initially cannot be configured to only 
>>> execute on the new branch), then I am also going to execute a build of the 
>>> previous branch (which I do not want to do because that version of the 
>>> product has been released).  How to handle this, is it done in the script, 
>>> in that I would need to edit the Jenkinsfiles in both branches before 
>>> creating the new job?
>>>
>>
>> Would it work for you if you took the following steps?
>>
>>1. Use Blue Ocean to create the first Pipeline on the branch that is 
>>the current product version.  Blue Ocean will create a multibranch 
>> pipeline 
>>job that will build all branches that contain a Jenkinsfile.  At this 
>>point, there is only one branch, so only one job will be created
>>2. Edit the multibranch Pipeline job that Blue Ocean created, add the 
>>filter to specifically limit that job to only build the precise branch 
>> that 
>>is the currently active development branch
>>3. When the time comes in the future that you are ready to add a 
>>Jenkinsfile on a new, independent branch of the same repository, add it 
>>from Blue Ocean or copy it from one branch to another with Git 
>> operations.  
>>Commit to the new branch, knowing that the new branch won't be built 
>>b

how do I modify one option in scm.getUserRemoteConfigs without having to manually set all the options?

2019-08-21 Thread red 888


in my jenkins pipeline i have this:


checkout([$class: 'GitSCM',
  branches: [[name: "${env.BRANCH_NAME}"]],
  doGenerateSubmoduleConfigurations: false,
  extensions: [
  [$class: 'SubmoduleOption',
   disableSubmodules: false,
   parentCredentials: true,
   recursiveSubmodules: true,
   reference: '',
   trackingSubmodules: true],
  [$class: 'CloneOption', timeout: config.timeout],
  [$class: 'CheckoutOption', timeout: config.timeout],
  [$class: 'GitLFSPull']
  ],
  submoduleCfg : [],
  userRemoteConfigs: [[
  //scm.userRemoteConfigs,
  refspec: '+refs/tags/*:refs/remotes/origin/tags/*'
  ]]
])


I just want to modify the refspec and use the rest of the defaults in 
scm.userRemoteConfigs. How can I do that without having to manually set all 
of them because Im no longer just passing in scm.userRemoteConfigs


Im trying to get jenkins to trigger a build when it sees a new tag (like it 
does with new branches) right now it indexes and gets the new tag but 
doesn't run a build

-- 
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/7e5c1679-a40c-4364-b149-282008953df5%40googlegroups.com.


Re: Why does my pipeline have 2 workspaces?

2019-08-21 Thread Giles
On Wednesday, 21 August 2019 11:43:35 UTC-4, John Lussmyer wrote:
>
> I've noticed that my single pipeline ends up with 2 separate workspaces 
> each time it runs.
> What is the one ending in @script for?
>
> --
> CasaDelGato Sensible Email package: 
> https://sourceforge.net/projects/sensibleemail/
>

I'll second the question.

Our jobs end up with anywhere from 1-5 folders each, coming in a mix of 
variants:

jobname@libs
jobname@script
jobname@tmp
jobname@script@tmp
jobname@2
jobname@2@tmp

It's a lot of clutter I'd rather not see, but I assume they serve some 
purpose.  It would be nice to hear what that purpose is ...

-- 
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/268ba0fb-3e4e-4329-a840-8d8cef52f52d%40googlegroups.com.


Why does my pipeline have 2 workspaces?

2019-08-21 Thread John Lussmyer
I've noticed that my single pipeline ends up with 2 separate workspaces
each time it runs.
What is the one ending in @script for?

-- 
--
CasaDelGato Sensible Email package:
https://sourceforge.net/projects/sensibleemail/

-- 
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/CADFKdfRTZ38Omxq_gZYb8grttSz8KtfdO6qQ7U7hvxxUCqMYdQ%40mail.gmail.com.


Re: JUnit Results not parsing in Jenkinsfile-based Pipeline Build

2019-08-21 Thread Jan Monterrubio
I’ve found success debugging through the plug-ins by using a combination of:

- the Jenkins Test harness
- the plugin as a dependency
- using the Jenkins rule to run a job and hit the plugins breakpoint.

Here’s some resources that might help:

https://github.com/jenkinsci/jenkins-test-harness
https://github.com/jenkinsci/gradle-jpi-plugin
https://jenkins.io/doc/developer/testing/

I’d start with a fresh gradle project and add the jpi and test harness and
get that working and then adding the dependencies.

The jpi plugin should let you use plugins as dependencies (and your ide
might be able to download the sources for you to debug.

On Tue, Aug 20, 2019 at 19:25 Matt Hollingsworth 
wrote:

> Hi Ullrich,
>
> Thanks for the suggestion! I tried that, and still saw the problem.
> Speficially, I did this:
>
> stage (“Unit tests”) {
>   sh “runtests.sh”
>   sh “cat build/pytest.xml”
>   junit testResults: “**/build/pytest.xml"
> }
>
> Are there instructions anywhere for how to setup a dev environment for
> plugins? I’m happy to debug this myself, I’m just not sure exactly where to
> start.
>
>
> Best,
> Matt
> On Aug 18, 2019, 1:52 PM -0700, Ullrich Hafner ,
> wrote:
>
> Shoudn’t the command use ’testResults’ as parameter name?
>
> junit testResults: '**/build/pytest.xml'
>
>
>
> Am 18.08.2019 um 06:42 schrieb Matt Hollingsworth :
>
> Hi everyone,
>
> I ran into a weird issue that I thought you might be able to help
> troubleshoot. I'm using Jenkinsfile-based Pipelines with python, and I use
> pytest to produce JUnit-compatible reports after the tests are run. The
> problem is that I get an error when I try to parse the results with the
> junit step: "No test report files were found. Configuration error?" Here
> are the relevant parts of the Jenkinsfile:
>
> stage("Unit tests") {
>   steps {
> sh "runtests.sh" // This produces build/pytest.xml
> sh "cat build/pytest.xml"
> junit 'build/pytest.xml'
>   }
> }
>
> The sh’s cat command runs properly and prints out a properly formatted
> junit xml file--I can parse it with junit-viewer, for example. But I still
> get the error. Any idea what's going on, or how I could debug this properly?
>
> Thanks for the help!
>
> Best,
> Matt
>
> --
> 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/8e1eae66-4c8b-4de0-9d9e-e0474a7ab93c%40googlegroups.com
> 
> .
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/Rw49YOnH-nk/unsubscribe.
> To unsubscribe from this group and all its topics, 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/D0E7E558-57F6-4B92-8724-3D7156A5EA96%40gmail.com
> 
> .
>
> --
> 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/e978431c-ab29-4df5-8e0b-d4adbfcf1e85%40Spark
> 
> .
>

-- 
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/CADgiF9KCkHCTkgEMBR-R_LB49k2Ug5g8Yv0kiYvpNkKS7HcyWA%40mail.gmail.com.


Re: how to configure same wildcard ssl certificate for 2 applications in same server

2019-08-21 Thread Simon Richter
Hi,

> can we install jenkins and codebeamer in one server and configure both 
> application with a domain wildcard ssl certificate ?
> We have already configured codebeamer with ssl. Can we install and 
> congfigure ssl for Jenkins in same server?

There are lots of different possible setups. Presumably you want to use
different hostnames since you are asking about wildcard certificates.

Doing SSL inside Jenkins is a fairly unusual setup these days. It is
difficult to configure, and most people have some reverse proxy setup
anyway because getting Jenkins to listen on a privileged port without
running it as root is another system administration nightmare. That's why
there are so few tutorials about that. :]

So the typical setup is to run Jenkins inside a VM or container, or have it
listen on 127.0.0.1 only, and then use nginx or Apache to terminate SSL and
forward traffic to Jenkins. The manual for that should come with lots of
tutorials for setting up proxies with wildcard certificates, IP based
switching or Server Name Indication (SNI), depending on your preferences.

   Simon

-- 
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/20190821123732.GA3406%40psi5.com.