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 回答