removed version increment
This commit is contained in:
parent
6601d9d743
commit
5b41b636c1
53
deploy.sh
53
deploy.sh
@ -87,35 +87,34 @@ fi
|
||||
|
||||
# increment minor version at each deploy
|
||||
# get Chart verion
|
||||
chart_version=$(grep appVersion helm/Chart.yaml | cut -d '"' -f2)
|
||||
#chart_version=$(grep appVersion helm/Chart.yaml | cut -d '"' -f2)
|
||||
# get Chart major version
|
||||
chart_major_version=$(echo $chart_version | cut -d'.' -f1)
|
||||
#chart_major_version=$(echo $chart_version | cut -d'.' -f1)
|
||||
# get Chart minor verison
|
||||
chart_minor_version=$(echo $chart_version | cut -d'.' -f2)
|
||||
#chart_minor_version=$(echo $chart_version | cut -d'.' -f2)
|
||||
# increment minor version
|
||||
let "chart_minor_version++"
|
||||
#let "chart_minor_version++"
|
||||
# set new version
|
||||
chart_new_version=$chart_major_version.$chart_minor_version
|
||||
#chart_new_version=$chart_major_version.$chart_minor_version
|
||||
|
||||
# replace in .env, .env.dist and Chart the version
|
||||
env_file=(.env .env.dist ./docker/php-fpm/.env ./docker/php-fpm/.env.dist ./helm/Chart.yaml)
|
||||
for f in ${env_file[@]}; do
|
||||
case $f in
|
||||
.env|.env.dist)
|
||||
#sed -e "s|DOCKER_IMAGE_VERSION=\"$chart_version\"|DOCKER_IMAGE_VERSION=\"$chart_new_version\"|" < $f
|
||||
sed -i "s|DOCKER_IMAGE_VERSION=\"$chart_version\"|DOCKER_IMAGE_VERSION=\"$chart_new_version\"|" $f
|
||||
;;
|
||||
./docker/php-fpm/.env|./docker/php-fpm/.env.dist)
|
||||
#sed -e "s|SITE_VERSION=\"$chart_version\"|SITE_VERSION=\"$chart_new_version\"|" < $f
|
||||
sed -i "s|SITE_VERSION=\"$chart_version\"|SITE_VERSION=\"$chart_new_version\"|" $f
|
||||
;;
|
||||
./helm/Chart.yaml)
|
||||
#sed -e "s|appVersion: \"$chart_version\"|appVersion: \"$chart_new_version\"|" < $f
|
||||
sed -i "s|appVersion: \"$chart_version\"|appVersion: \"$chart_new_version\"|" $f
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
#env_file=(.env .env.dist ./docker/php-fpm/.env ./docker/php-fpm/.env.dist ./helm/Chart.yaml)
|
||||
#for f in ${env_file[@]}; do
|
||||
# case $f in
|
||||
# .env|.env.dist)
|
||||
# #sed -e "s|DOCKER_IMAGE_VERSION=\"$chart_version\"|DOCKER_IMAGE_VERSION=\"$chart_new_version\"|" < $f
|
||||
# sed -i "s|DOCKER_IMAGE_VERSION=\"$chart_version\"|DOCKER_IMAGE_VERSION=\"$chart_new_version\"|" $f
|
||||
# ;;
|
||||
# ./docker/php-fpm/.env|./docker/php-fpm/.env.dist)
|
||||
# #sed -e "s|SITE_VERSION=\"$chart_version\"|SITE_VERSION=\"$chart_new_version\"|" < $f
|
||||
# sed -i "s|SITE_VERSION=\"$chart_version\"|SITE_VERSION=\"$chart_new_version\"|" $f
|
||||
# ;;
|
||||
# ./helm/Chart.yaml)
|
||||
# #sed -e "s|appVersion: \"$chart_version\"|appVersion: \"$chart_new_version\"|" < $f
|
||||
# sed -i "s|appVersion: \"$chart_version\"|appVersion: \"$chart_new_version\"|" $f
|
||||
# ;;
|
||||
# esac
|
||||
#done
|
||||
|
||||
echo $chart_version
|
||||
echo $chart_new_version
|
||||
@ -123,8 +122,8 @@ echo $ns
|
||||
echo $kube_sys
|
||||
|
||||
# git commit
|
||||
git add .env.dist docker/php-fpm/.env.dist helm/Chart.yaml
|
||||
git commit -m "deploy version $chart_new_version"
|
||||
#git add .env.dist docker/php-fpm/.env.dist helm/Chart.yaml
|
||||
#git commit -m "deploy version $chart_new_version"
|
||||
|
||||
# build image and push in repo
|
||||
./docker.sh install
|
||||
@ -137,6 +136,6 @@ ln -s $HOME/.kube/$kube_sys $HOME/.kube/config
|
||||
|
||||
#helm template --set kube=$kube_sys ./helm --values=./helm/values-configs.yaml --values=./helm/values-secrets.yaml --namespace $ns --create-namespace
|
||||
# deploy Chart
|
||||
helm upgrade $ns --set kube=$kube_sys ./helm --install --atomic --cleanup-on-fail --values=./helm/values-configs.yaml --values=./helm/values-secrets.yaml --namespace $ns --create-namespace
|
||||
#helm upgrade $ns --set kube=$kube_sys ./helm --install --atomic --cleanup-on-fail --values=./helm/values-configs.yaml --values=./helm/values-secrets.yaml --namespace $ns --create-namespace
|
||||
|
||||
kubectl create job -n $NS --from=cronjob/cronjob-mariadb-backupdb dbbackup-$(date +%Y-%m-%d-%H-%M-%S)
|
||||
#kubectl create job -n $NS --from=cronjob/cronjob-mariadb-backupdb dbbackup-$(date +%Y-%m-%d-%H-%M-%S)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user