I have created pipeline job which run stages in parallel.
build job: 'dir_agents/build_agent_centos_final_premium', parameters: [string(name: 'tag', value: 'master')]
def sanity = [:]
if(ManagerBuild=="true"){
build["ManagerBuild"] = {
stage ("ManagerBuild") {
stage ("manager amqpinflux") {
echo "Amqpinflux centos-final-6.5 build"
echo workspace
retry(3) {
}
}
stage ("manager restservice") {
echo "Restservice centos-final-6.5 build"
retry(3) {
}
}
stage ("manager mgmtworker") {
echo "Mgmtworker centos-final-6.5 build"
retry(3) {
}
}
}
}
}
if(AgentBuild=="true"){
build["AgentBuild"] = {
stage ("AgentBuild") {
stage ("agent centos6.5") {
echo "Agent centos-final-6.5 build"
retry(3) {
}
}
stage ("agent centos7") {
echo "Agent centos-core-7 build"
retry(3) {
}
}
stage ("agent redhat6.5") {
echo "Agent redhat-santiago-6 build"
retry(3) {
}
}
stage ("agent redhat7.1") {
echo "Agent redhat-maipo-7.1 build"
retry(3) {
}
}
stage ("agent ubuntu12.04") {
echo "Agent ubuntu-precise-12.04 build"
retry(3) {
}
}
stage ("agent ubuntu14.04") {
echo "Agent ubuntu-trusty-14.04 build"
retry(3) {
}
}
stage ("agent ubuntu1216.04") {
echo "Agent ubuntu-xenial-16.04 build"
retry(3) {
}
}
stage ("agent windows") {
echo "Agent windows build"
retry(3) {
}
}
}
}
}
if(CliBuild=="true"){
build["CliBuild"] = {
stage ("CliBuild") {
stage ("cli centos6.5") {
echo "Cli centos-final-6.5 build"
echo env.branch
retry(3) {
}
}
stage ("Cli debian7") {
echo "Cli debian-wheezy-7 build"
retry(3) {
}
}
stage ("cli windows") {
echo "Cli windows build"
retry(3) {
}
}
}
}
}
if(ManagerImages=="true"){
sanity["ManagerImages"] = {
stage ("ManagerImages") {
echo "Manager Images creator"
echo env.branch
retry(3) {
}
}
}
}
if(VagrantBox=="true"){
sanity["VagrantBox"] = {
stage ("VagrantBox") {
echo "VagrantBox creator"
retry(3) {
}
}
}
}
node ('master') {
workspace = pwd()
echo workspace
if(CreateTags=="true"){
stage ("CreateTags") {
echo "Updates versions and creates core tags"
retry(3) {
build job: 'dir_agents/build_agent_centos_final_premium', parameters: [string(name: 'tag', value: 'master')]
}
}
}
parallel build
if(ManagerSingleTar=="true"){
stage ("ManagerSingleTar") {
echo "Manager single tar build"
retry(3) {
}
}
}
parallel sanity
}