Build project inside docker

閲覧: 24 回
最初の未読メッセージにスキップ

Ruchir Brahmbhatt

未読、
2017/02/18 5:26:172017/02/18
To: Jenkins Users
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?

Damien Coraboeuf

未読、
2017/02/18 12:48:292017/02/18
To: Jenkins Users
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.

Indra Gunawan (ingunawa)

未読、
2017/02/19 4:12:292017/02/19
To: jenkins...@googlegroups.com

What is usr/local/src/freeswitch?  You missed “/” before usr.

--
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.

Ruchir Brahmbhatt

未読、
2017/02/20 3:56:222017/02/20
To: Jenkins Users、ingu...@cisco.com
the repository structure is like that and makefile is  within that folder.
全員に返信
投稿者に返信
転送
新着メール 0 件