Deploying a Custom Bamboo Branch

I use Bamboo and have two branches: branch1 and branch2, as well as master.

When I create the master, the resulting artifact is deployed to the nexus repository, as expected. However, when I build any of the branches, they also deploy to nexus.

Ideally, I want only the master to be connected to the nexus.

Since the master and branches use the same step / task, how would you configure this?

+4
source share
3 answers

, . , maven, .. Mvn clean ${bamboo.variableName}. install, Bamboo . , , , .

+4

script, , . , maven script , :

echo "Starting build for branch:"
echo $bamboo_planRepository_branchName

if [ $bamboo_planRepository_branchName = "development" ] ; then
    echo "Executing mvn clean deploy -U"
    mvn clean deploy -U
else
    echo "Executing mvn clean install -U"
    mvn clean install -U
fi

$bamboo_planRepository_branchName - , Bamboo.

+1
source

Source: https://habr.com/ru/post/1570182/


All Articles