在子目录级别设置和构建Jenkins项目

时间:2017-05-22 16:11:30

标签: jenkins

我最近使用Bitbucket安装并配置了Jenkins,以便构建和测试子目录中的Bitbucket项目。我想在目录中测试项目而不是Bitbucket的主分支,因为我想从小开始,并确保不会影响其他项目。我想知道是否有任何方法可以从Bitbucket的子目录而不是Master Branch在Jenkins中构建项目。例如,我想只构建子目录2;

    // Create the score label
func createLabel() {

    let behindLabelNode = SKSpriteNode()

        behindLabelNode.color = SKColor.black
        behindLabelNode.alpha = 0.5
        behindLabelNode.zPosition = 4
        behindLabelNode.position = CGPoint(x: 0, y: (self.frame.size.height / 2.5))
        behindLabelNode.size = CGSize(width: 200, height: 120)
        self.addChild(behindLabelNode)
    } else {
        behindLabelNode.color = SKColor.black
        behindLabelNode.alpha = 0.5
        behindLabelNode.zPosition = 4
        behindLabelNode.position = CGPoint(x: 0, y: (self.frame.size.height / 2.5))
        behindLabelNode.size = CGSize(width: 120, height: 120)
        self.addChild(behindLabelNode)
    }


    scoreLabel = SKLabelNode(fontNamed: "Lockergnome")
    scoreLabel.zPosition = 6
    scoreLabel.position = CGPoint(x: 0, y: (self.frame.size.height) / 2.8)
    scoreLabel.fontSize = 120
    scoreLabel.fontColor = SKColor(red: 255.0/255.0, green: 255.0/255.0, blue: 255.0/255.0, alpha: 1.0)
    scoreLabel.text = "0"
    self.addChild(scoreLabel)

}

1 个答案:

答案 0 :(得分:0)

您可以使用: “其他行为”->“稀疏结帐路径”

但是您需要具有最新版本的Git,至少要高于1.7.10