Re: Build project inside docker

2017-02-20 Thread Ruchir Brahmbhatt
the repository structure is like that and makefile is  within that folder.

On Sunday, 19 February 2017 14:42:29 UTC+5:30, Indra Gunawan (ingunawa) 
wrote:
>
> What is usr/local/src/freeswitch?  You missed “/” before usr.
>
>  
>
> *From: *> on behalf of Ruchir 
> Brahmbhatt >
> *Reply-To: *"jenkins...@googlegroups.com " <
> jenkins...@googlegroups.com >
> *Date: *Saturday, February 18, 2017 at 2:26 AM
> *To: *Jenkins Users >
> *Subject: *Build project inside docker
>
>  
>
> Hi, 
>
>  
>
> I'm trying to build a project inside docker container so that all 
> dependencies required for project are available and doesn't require 
> installation in jenkins system. Below is my Jenkinsfile.
>
>  
>
> node{
>
> stage ('Build'){
>
>  checkout scm
>
>  docker.image('bettervoice/freeswitch-container:1.6.9').inside {
>
> sh 'cd usr/local/src/freeswitch-1.4.26'
>
> sh './rebootstrap'
>
> sh './configure'
>
> sh 'make'
>
> }
>
>   }
>
> }
>
>  
>
> But I get error as below.
>
> [st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A]
>  Running shell script
>
> + usr/local/src/freeswitch-1.4.26/rebootstrap
>
> /var/lib/jenkins/workspace/st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A@tmp/durable-776c465c/script.sh:
>  2: 
> /var/lib/jenkins/workspace/st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A@tmp/durable-776c465c/script.sh:
>  usr/local/src/freeswitch-1.4.26/rebootstrap: not found
>
>  
>
> Any hints on what is wrong with the 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-use...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/fbaf0dbb-20e8-4413-b157-a56161167fb9%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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/52f74542-9e6d-4a28-845c-0168d1067eee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Build project inside docker

2017-02-19 Thread Indra Gunawan (ingunawa)
What is usr/local/src/freeswitch?  You missed “/” before usr.

From:  on behalf of Ruchir Brahmbhatt 

Reply-To: "jenkinsci-users@googlegroups.com" 
Date: Saturday, February 18, 2017 at 2:26 AM
To: Jenkins Users 
Subject: Build project inside docker

Hi,

I'm trying to build a project inside docker container so that all dependencies 
required for project are available and doesn't require installation in jenkins 
system. Below is my Jenkinsfile.


node{

stage ('Build'){

 checkout scm

 docker.image('bettervoice/freeswitch-container:1.6.9').inside {

sh 'cd usr/local/src/freeswitch-1.4.26'

sh './rebootstrap'

sh './configure'

sh 'make'

}

  }

}



But I get error as below.

[st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A]
 Running shell script

+ usr/local/src/freeswitch-1.4.26/rebootstrap

/var/lib/jenkins/workspace/st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A@tmp/durable-776c465c/script.sh:
 2: 
/var/lib/jenkins/workspace/st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A@tmp/durable-776c465c/script.sh:
 usr/local/src/freeswitch-1.4.26/rebootstrap: not found



Any hints on what is wrong with the 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/fbaf0dbb-20e8-4413-b157-a56161167fb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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/A5F4F6A6-3D21-4D56-B317-BF0224079464%40cisco.com.
For more options, visit https://groups.google.com/d/optout.


Re: Build project inside docker

2017-02-18 Thread Damien Coraboeuf
The `cd` in the first shell step will change the directory only in the 
first shell step.

You should group shell steps together:

sh '''\

cd usr/local/src/freeswitch-1.4.26

./rebootstrap

./configure
make

'''

Additionally, should not you use cd /usr/local/src/freeswitch-1.4.26 and 
not cd usr/local/src/freeswitch-1.4.26?

Best regards,
Damien.

On Saturday, 18 February 2017 11:26:17 UTC+1, Ruchir Brahmbhatt wrote:
>
> Hi,
>
> I'm trying to build a project inside docker container so that all 
> dependencies required for project are available and doesn't require 
> installation in jenkins system. Below is my Jenkinsfile.
>
> node{stage ('Build'){ checkout scm 
> docker.image('bettervoice/freeswitch-container:1.6.9').inside {
> sh 'cd usr/local/src/freeswitch-1.4.26'
>
> sh './rebootstrap'
>
> sh './configure' sh 'make' } } }
>
>
> But I get error as below.
>
> [st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A]
>  Running shell script
> + usr/local/src/freeswitch-1.4.26/rebootstrap
> /var/lib/jenkins/workspace/st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A@tmp/durable-776c465c/script.sh:
>  2: 
> /var/lib/jenkins/workspace/st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A@tmp/durable-776c465c/script.sh:
>  usr/local/src/freeswitch-1.4.26/rebootstrap: not found
>
>
> Any hints on what is wrong with the 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/732ba5c5-41d2-41e5-ba15-451d44d998e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.