0

I need to make Python 2.7 the default version of Python for running a Jenkins build server. I'm trying to use python_version to do this, but Python 2.6 remains the default version. I'm probably missing something really simple. Any suggestions?

dotcloud.yml

jenkins:
  type: custom
  buildscript: jenkins/builder
  ports:
    www: http
  config:
    python_version: v2.7
  processes: 
    sshagent: ssh-agent /bin/bash
    jenkins: ~/run
db:
  type: postgresql

builder

#!/bin/bash                                                                                                                                                                                                                                   
if [ -f ~/jenkins.war ]
then
    echo 'Found jenkins installation.'
else
    echo 'Installing jenkins.'
    wget -O ~/jenkins.war http://mirrors.jenkins-ci.org/war/latest/jenkins.war
fi
echo 'Installing dotCloud scaffolding.'
cp -a jenkins/. ~

echo 'Setting up SSH.'
mkdir -p ~/.ssh
cp jenkins_id ~/.ssh/id_rsa
chmod 0600 ~/.ssh/id_rsa
ssh-keygen -R bitbucket.org
ssh-keyscan -H bitbucket.org >> ~/.ssh/known_hosts
4

1 に答える 1

0

ビルドファイルで問題が解決しなかった理由はまだ--python=/usr/bin/python2.7わかりませんが、Jenkinsビルドスクリプトでvirtualenvのオプションを使用することで問題を回避できました。

于 2013-02-25T03:52:51.297 に答える