modified some logic

This commit is contained in:
Timo 2021-05-04 14:12:35 +03:00
parent e9fd9be3fb
commit ec715880e0
3 changed files with 6 additions and 18 deletions

View File

@ -8,8 +8,6 @@ if [[ "${BRANCH_NAME}" == "master" ]]
then
./versions.sh minor
version=$(jq -r '.version' < package.json)
echo "Preparing release properties"
echo "APP_VERSION=${version}" > version.properties
fi
@ -19,7 +17,6 @@ then
version=$(jq -r '.version' < package.json)
fi
echo "Building version ${version}"
docker build -t "${imageName}":latest -f "${dockerfileLocation}" .
@ -29,10 +26,10 @@ then
echo "Publishing Images with version ${version}"
echo "${BAMBOO_DOWNLOAD_PASS} | docker login -u ${BAMBOO_DOWNLOAD_USER} --password-stdin nexus.iqser.com:5001"
docker push "${imageName}":latest
docker tag "${imageName}":latest "${imageName}":"${version}"
docker push "${imageName}":"${version}"
else
echo "Not on a relevant branch ${BRANCH_NAME} ... skipping."
fi

View File

@ -0,0 +1,5 @@
#!/bin/bash
version=$(jq -r '.version' < package.json)
echo "Preparing release properties for version ${version}"
echo "APP_VERSION=${version}" > version.properties

View File

@ -1,14 +0,0 @@
#!/bin/bash
if [[ "${BRANCH_NAME}" == "master" ]]
then
./versions.sh minor
echo "Updating minor version ... "
fi
if [[ "${BRANCH_NAME}" == release* ]]
then
./versions.sh patch
echo "Updating patch version ... "
fi