[JIRA] (JENKINS-55630) Support declarative pipelines

2019-10-07 Thread benjamin.musc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Benjamin Muschko closed an issue as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55630  
 
 
  Support declarative pipelines   
 

  
 
 
 
 

 
Change By: 
 Benjamin Muschko  
 
 
Status: 
 Open Closed  
 
 
Resolution: 
 Fixed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.196806.154767430.2545.1570457701497%40Atlassian.JIRA.


[JIRA] (JENKINS-55630) Support declarative pipelines

2019-10-07 Thread benjamin.musc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Benjamin Muschko commented on  JENKINS-55630  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Support declarative pipelines   
 

  
 
 
 
 

 
 Closing the issue as Go Modules solves the problem.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.196806.154767430.2543.1570457640225%40Atlassian.JIRA.


[JIRA] (JENKINS-55630) Support declarative pipelines

2019-01-22 Thread benjamin.musc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Benjamin Muschko commented on  JENKINS-55630  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Support declarative pipelines   
 

  
 
 
 
 

 
 FYI: I switched my project to Go modules. Go modules makes the setup much easier. You can just use a declarative pipeline definition.  
 

  
 
 
 
 

 
 
 

 
 
 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-55630) Support declarative pipelines

2019-01-17 Thread benjamin.musc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Benjamin Muschko commented on  JENKINS-55630  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Support declarative pipelines   
 

  
 
 
 
 

 
 Thanks for your response. I should have mentioned that I am using `dep` for package management. 

 

pipeline {
agent any
tools {
go 'go-1.11'
}
stages {
stage('Prepare') {
steps {
sh 'go version'
sh 'curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh'
sh 'dep ensure'
}
}
stage('Build') {
steps {
sh 'go build'
}
}
}
}
 

 When trying to run `dep ensure` I get the following error message: 

 

+ dep ensure
/Users/bmuschko/.jenkins/workspace/link-verifier is not within a known GOPATH/src
 

 That's why I came to the conclusion that I needed a custom workspace. Do you have another idea on how to work around the issue? Things are probably easier with `vgo` as your project source doesn't necessarily have to reside in `$GOPATH/src`.  
 

  
 
 
 
 

 
 
 

 
 
 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-55630) Support declarative pipelines

2019-01-17 Thread ch...@orr.me.uk (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Christopher Orr commented on  JENKINS-55630  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Support declarative pipelines   
 

  
 
 
 
 

 
 Can you show the Declarative Pipeline that you tried already and are having trouble with? The Go-related environment variables should already be exported during a Pipeline build, and so this Pipeline works fine to install Go and be able to run it: 

 

pipeline {
  agent any
  tools {
go '1.11'
  }
  stages {
stage('Build') {
  steps {
sh 'go version'
sh 'git clone https://github.com/bmuschko/link-verifier'
dir('link-verifier') {
  sh 'go build …'
}
  }
}
  }
}  

 Does that cover what you're trying to do?  
 

  
 
 
 
 

 
 
 

 
 
 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-55630) Support declarative pipelines

2019-01-16 Thread benjamin.musc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Benjamin Muschko updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55630  
 
 
  Support declarative pipelines   
 

  
 
 
 
 

 
Change By: 
 Benjamin Muschko  
 

  
 
 
 
 

 
 Currently, it only seems to be possible to create a scripted pipeline for Go projects with this plugin. I was struggling to find equivalent support for modeling a declarative pipeline. The issue I ran into:  # Accessing a tool in a declarative pipeline should work just fine. # Defining a custom workspace is not allowed in a declarative pipeline. # Setting the environment variables for different build stages is impractical. If possible those environment variables should already be preset. This is how I solved the issue right now, however, Jenkins seems to move away from scripted pipelines toward declarative ones. Let me know if this is already possible. < { code > } node {def goHome = tool('go-1.11')ws("${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}/src/github.com/bmuschko/link-verifier") {withEnv(["GOROOT=${goHome}", "GOPATH=${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}/", "PATH+GO=${goHome}/bin"]) {...}}  { code > }  
 

  
 
 
 
 

 
 
 

 
 
 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+un

[JIRA] (JENKINS-55630) Support declarative pipelines

2019-01-16 Thread benjamin.musc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Benjamin Muschko updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55630  
 
 
  Support declarative pipelines   
 

  
 
 
 
 

 
Change By: 
 Benjamin Muschko  
 

  
 
 
 
 

 
 Currently, it only seems to be possible to create a scripted pipeline for Go projects with this plugin. I was struggling to find equivalent support for modeling a declarative pipeline.   The  issue  issues  I ran into:    # Accessing a tool in a declarative pipeline should work just fine. # Defining a custom workspace is not allowed in a declarative pipeline. # Setting the environment variables for different build stages is impractical. If possible those environment variables should already be preset.   This is how I solved the issue right now, however, Jenkins seems to move away from scripted pipelines toward declarative ones. Let me know if this is already possible.{code}node {def goHome = tool('go-1.11')ws("${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}/src/github.com/bmuschko/link-verifier") {withEnv(["GOROOT=${goHome}", "GOPATH=${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}/", "PATH+GO=${goHome}/bin"]) {...}}{code}  
 

  
 
 
 
 

 
 
 

 
 
 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+

[JIRA] (JENKINS-55630) Support declarative pipelines

2019-01-16 Thread benjamin.musc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Benjamin Muschko updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55630  
 
 
  Support declarative pipelines   
 

  
 
 
 
 

 
Change By: 
 Benjamin Muschko  
 

  
 
 
 
 

 
 Currently, it only seems to be possible to create a scripted pipeline for Go projects with this plugin. I was struggling to find equivalent support for modeling a declarative pipeline. The issue I ran into:  # Accessing a tool in a declarative pipeline should work just fine. # Defining a custom workspace is not allowed in a declarative pipeline. # Setting the environment variables for different build stages is impractical. If possible those environment variables should already be preset. This is how I solved the issue right now, however, Jenkins seems to move away from scripted pipelines toward declarative ones. Let me know if this is already possible.     {{ node { }}  {{  def goHome = tool('go-1.11') }}   {{   ws("${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}/src/github.com/bmuschko/link-verifier") { }}  {{    withEnv(["GOROOT=${goHome}", "GOPATH=${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}/", "PATH+GO=${goHome}/bin"]) { }}  {{        ...  }}  {{     } }}  {{ } }}   
 

  
 
 
 
 

 
 
 

 
 
 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 ema

[JIRA] (JENKINS-55630) Support declarative pipelines

2019-01-16 Thread benjamin.musc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Benjamin Muschko created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55630  
 
 
  Support declarative pipelines   
 

  
 
 
 
 

 
Issue Type: 
  Improvement  
 
 
Assignee: 
 Christopher Orr  
 
 
Components: 
 golang-plugin  
 
 
Created: 
 2019-01-16 21:31  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Benjamin Muschko  
 

  
 
 
 
 

 
 Currently, it only seems to be possible to create a scripted pipeline for Go projects with this plugin. I was struggling to find equivalent support for modeling a declarative pipeline.   The issue I ran into:   
 
Accessing a tool in a declarative pipeline should work just fine. 
Defining a custom workspace is not allowed in a declarative pipeline. 
Setting the environment variables for different build stages is impractical. If possible those environment variables should already be preset. 
   This is how I solved the issue right now, however, Jenkins seems to move away from scripted pipelines toward declarative ones. Let me know if this is already possible.   node { {{ def goHome = tool('go-1.11')}} {{ ws("${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}/src/github.com/bmuschko/link-verifier") {}}    withEnv(["GOROOT=${goHome}", "GOPATH=${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}/", "PATH+GO=${goHome}/bin"]) {        ...  {{    }}} }