Set the version number for version rollback when building mirrored Ali cloud k8s

Construction jenkins build process of configuration parameters 

 

Construction of execution shell, the version number of parameters passed in the script

 

Mirroring script to push versioned repository Ali cloud images

#!/bin/bash

#获取参数
while getopts "n:" opt; do
    case $opt in
        n)
            version=$OPTARG
            ;;
        \?)
            ;;
    esac
done

******

******

sudo docker tag fashion*****prod registry-vpc.cn-hangzhou.aliyuncs.com/z*****tem/fash****od:$version

sudo docker push  registry-vpc.cn-hangzhou.aliyuncs.com/z******stem/fas*****d:$version

  

View Ali cloud images warehouses have been saved with the version number of the mirror

 

Mirroring rollback need, in the application selection latest version rollback version number change and update rollback implementation code

Guess you like

Origin www.cnblogs.com/weifeng1463/p/11133238.html