[JIRA] (JENKINS-48803) Powershell under linux have changed the command to pwsh
Title: Message Title Alexey Marin commented on JENKINS-48803 Re: Powershell under linux have changed the command to pwsh Discussing in this PR shows it's dangerous to use "isUnix()" to choose the binary. Plus, there are Windows Server distributions that only have pwsh.exe. What if the plugin actually exposed two commands? powershell 'gci .' //launches Windows PowerShell pwsh 'gci .' //launches PowerShell Core The only drawback I see is you won't be able to have a truly cross-platform pipeline unless you install PowerShell Core on all your Windows agents. Alternative solution: keep only one command and: if the system is detected as Unix, use `which pwsh` and then `which powershell` to check for the correct binary if the system is detected as Windows, use `where.exe pwsh` and then `where.exe powershell` to check for the correct binary Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-48803) Powershell under linux have changed the command to pwsh
Title: Message Title Alexey Marin edited a comment on JENKINS-48803 Re: Powershell under linux have changed the command to pwsh Discussing in this PR shows it's dangerous to use "isUnix()" to choose the binary. Plus, there are Windows Server distributions that only have pwsh.exe. What if the plugin actually exposed two commands?{code:java}powershell 'gci .' //launches Windows PowerShellpwsh 'gci .' //launches PowerShell Core{code}The only drawback I see is you won't be able to have a truly cross-platform pipeline unless you install PowerShell Core on all your Windows agents. Alternative solution: keep only one command and: * if the system is detected as Unix, use `which pwsh` and then `which powershell` to check for the correct binary * if the system is detected as Windows, use `where.exe pwsh .exe ` and then `where.exe powershell .exe ` to check for the correct binary Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54857) Allow durable task to run batch/shell/powershell files from the repo
Title: Message Title Alexey Marin created an issue Jenkins / JENKINS-54857 Allow durable task to run batch/shell/powershell files from the repo Issue Type: New Feature Assignee: Unassigned Components: durable-task-plugin Created: 2018-11-26 10:53 Environment: Durable Task Plugin: 1.28 Priority: Minor Reporter: Alexey Marin Right now if you extract your shell script into a file that is distributed with your source code (for example, to use it for semi-automated deployment), you have to invoke it using some weird incantations (https://stackoverflow.com/questions/38143485/how-do-i-make-jenkins-2-0-execute-a-sh-command-in-the-same-directory-as-the-chec): sh "chmod +x -R ${env.WORKSPACE}/../${env.JOB_NAME}@script" sh "${env.WORKSPACE}/../${env.JOB_NAME}@script/script.sh" It would be much more convenient if there was a named parameter you could use to invoke one of your scripts directly: sh file: "somepath/deploy.sh" bat file: "somepath/deploy.bat" powershell file: "somepath/deploy.ps1" By default it should look for files in the checked out repo, but you could pass an absolute path too:
[JIRA] (JENKINS-53734) Declarative pipeline - Support for parallel stages inside sequential stages
Title: Message Title Alexey Marin commented on JENKINS-53734 Re: Declarative pipeline - Support for parallel stages inside sequential stages I agree that this will be very useful. I use sequential stages to lock a single resource (DB) for multiple stages (as suggested in JENKINS-43336) For example, a pipeline like this one is currently impossible: pipeline { agent any stages { stage ('Non-production') { options { lock 'DB1' } stages { stage ('Deploy') { steps { echo 'Deploy' } } stage ('Test') { parallel { stage ('Unit testing') { steps { echo 'Unit' } } stage ('E2E testing') { steps { echo 'E2E' } } } } } } stage ('Production') { stages { stage ('Deploy') { steps { echo 'Deploy' } } } } } } Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54401) NPE when parsing scm git revision date on PR branches
Title: Message Title Alexey Marin commented on JENKINS-54401 Re: NPE when parsing scm git revision date on PR branches I'm on vacation this week. If other people confirm the fix is working, feel free to close the ticket as resolved. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54401) java.lang.NullPointerException when parsing target revision date
Title: Message Title Alexey Marin edited a comment on JENKINS-54401 Re: java.lang.NullPointerException when parsing target revision date @ [~ nfalco ] The PR is from the same repo, no forks involved. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54401) java.lang.NullPointerException when parsing target revision date
Title: Message Title Alexey Marin commented on JENKINS-54401 Re: java.lang.NullPointerException when parsing target revision date @nfalco The PR is from the same repo, no forks involved. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54401) java.lang.NullPointerException when parsing target revision date
Title: Message Title Alexey Marin commented on JENKINS-54401 Re: java.lang.NullPointerException when parsing target revision date No problem, as soon as I get back to the office in the morning, but I have no idea what "source job configuration trait" is. I take it it's some part of the multibranch pipeline configuration? Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54401) java.lang.NullPointerException when parsing target revision date
Title: Message Title Alexey Marin created an issue Jenkins / JENKINS-54401 java.lang.NullPointerException when parsing target revision date Issue Type: Bug Assignee: Unassigned Components: bitbucket-branch-source-plugin Created: 2018-11-01 15:39 Environment: Jenkins ver. 2.138.2 Bitbucket branch source 2.2.14 Atlassian Bitbucket v5.6.2 Priority: Major Reporter: Alexey Marin After upgrading Jenkins and all plugins I ran into an error when scanning my multibranch pipeline. The PR was found, but its job failed with Branch indexing java.lang.NullPointerException at com.fasterxml.jackson.databind.util.ISO8601Utils.parseInt(ISO8601Utils.java:329) at com.fasterxml.jackson.databind.util.ISO8601Utils.parse(ISO8601Utils.java:161) at com.fasterxml.jackson.databind.util.ISO8601DateFormat.parse(ISO8601DateFormat.java:52) at com.cloudbees.jenkins.plugins.bitbucket.BitbucketGitSCMRevision.(BitbucketGitSCMRevision.java:60) at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:843) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:583) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:95) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:303) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE