-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish_images.sh
executable file
·98 lines (78 loc) · 4.1 KB
/
publish_images.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
STORK_VERSION=23.9.0
KUBE_VERSION=v1.25.1
GCR_REPO=portworx-public
DEPLOYER_MINOR_VERSION=2.6
DEPLOYER_PATCH_VERSION=2.6.0
BASE_DEST_PATH=gcr.io/${GCR_REPO}
PRODUCT_NAME=px-backup
SCHEMA_VERSION=2.6.0
echo "Using the following versions:"
echo " PX: ${PX_VERSION}"
echo " stork: ${STORK_VERSION}"
echo " Kubernetes: ${KUBE_VERSION}"
echo ""
echo "Pushing to ${BASE_DEST_PATH}/${PRODUCT_NAME}"
publish_image () {
source_path=$1
image_tag=$2
destination_image=$3
echo "======================================================================"
echo "Pulling ${source_path} and tagging with the following: "
echo " ${BASE_DEST_PATH}/${destination_image}:${DEPLOYER_MINOR_VERSION}"
echo " ${BASE_DEST_PATH}/${destination_image}:${DEPLOYER_PATCH_VERSION}"
echo " ${BASE_DEST_PATH}/${destination_image}:${image_tag}"
echo "======================================================================"
tag_and_push $source_path ${BASE_DEST_PATH}/${destination_image}:${DEPLOYER_MINOR_VERSION}
tag_and_push $source_path ${BASE_DEST_PATH}/${destination_image}:${DEPLOYER_PATCH_VERSION}
tag_and_push $source_path ${BASE_DEST_PATH}/${destination_image}:${image_tag}
}
tag_and_push () {
docker pull $1
docker tag $1 $2
docker push $2
}
STORK_SOURCE=openstorage/stork:${STORK_VERSION}
publish_image ${STORK_SOURCE} ${STORK_VERSION} ${PRODUCT_NAME}/stork
SCHEDULER_SOURCE=k8s.gcr.io/kube-scheduler-amd64:${KUBE_VERSION}
publish_image ${SCHEDULER_SOURCE} ${KUBE_VERSION} ${PRODUCT_NAME}/kube-scheduler-amd64
CONTROLLER_MANAGER_SOURCE=k8s.gcr.io/kube-controller-manager-amd64:${KUBE_VERSION}
publish_image ${CONTROLLER_MANAGER_SOURCE} ${KUBE_VERSION} ${PRODUCT_NAME}/kube-controller-manager-amd64
PXCENTRAL_ONPREM_API_TAG=2.6.0
PXCENTRAL_ONPREM_API=portworx/pxcentral-onprem-api:${PXCENTRAL_ONPREM_API_TAG}
publish_image ${PXCENTRAL_ONPREM_API} ${PXCENTRAL_ONPREM_API_TAG} ${PRODUCT_NAME}/pxcentral-onprem-api
PXCENTRAL_ONPREM_UI_FRONTEND_TAG=2.6.0
PXCENTRAL_ONPREM_UI_FRONTEND=portworx/pxcentral-onprem-ui-frontend:${PXCENTRAL_ONPREM_UI_FRONTEND_TAG}
publish_image ${PXCENTRAL_ONPREM_UI_FRONTEND} ${PXCENTRAL_ONPREM_UI_FRONTEND_TAG} ${PRODUCT_NAME}/pxcentral-onprem-ui-frontend
PXCENTRAL_ONPREM_UI_BACKEND_TAG=2.6.0
PXCENTRAL_ONPREM_UI_BACKEND=portworx/pxcentral-onprem-ui-backend:${PXCENTRAL_ONPREM_UI_BACKEND_TAG}
publish_image ${PXCENTRAL_ONPREM_UI_BACKEND} ${PXCENTRAL_ONPREM_UI_BACKEND_TAG} ${PRODUCT_NAME}/pxcentral-onprem-ui-backend
PXCENTRAL_ONPREM_UI_LHBACKEND_TAG=2.6.0
PXCENTRAL_ONPREM_UI_LHBACKEND=portworx/pxcentral-onprem-ui-lhbackend:${PXCENTRAL_ONPREM_UI_LHBACKEND_TAG}
publish_image ${PXCENTRAL_ONPREM_UI_LHBACKEND} ${PXCENTRAL_ONPREM_UI_LHBACKEND_TAG} ${PRODUCT_NAME}/pxcentral-onprem-ui-lhbackend
PXCENTRAL_ONPREM_POST_SETUP_TAG=2.6.0
PXCENTRAL_ONPREM_POST_SETUP=portworx/pxcentral-onprem-post-setup:${PXCENTRAL_ONPREM_POST_SETUP_TAG}
publish_image ${PXCENTRAL_ONPREM_POST_SETUP} ${PXCENTRAL_ONPREM_POST_SETUP_TAG} ${PRODUCT_NAME}/pxcentral-onprem-post-setup
POSTGRESQL_TAG=11.19.0-debian-11-r1
POSTGRESQL=portworx/postgresql:${POSTGRESQL_TAG}
publish_image ${POSTGRESQL} ${POSTGRESQL_TAG} ${PRODUCT_NAME}/postgresql
KEYCLOAK_TAG=21.1.1
KEYCLOAK=portworx/keycloak:${KEYCLOAK_TAG}
publish_image ${KEYCLOAK} ${KEYCLOAK_TAG} ${PRODUCT_NAME}/keycloak
KEYCLOAK_LOGIN_THEME_TAG=2.2.0
KEYCLOAK_LOGIN_THEME=portworx/keycloak-login-theme:${KEYCLOAK_LOGIN_THEME_TAG}
publish_image ${KEYCLOAK_LOGIN_THEME} ${KEYCLOAK_LOGIN_THEME_TAG} ${PRODUCT_NAME}/keycloak-login-theme
BUSYBOX_TAG=1.31
BUSYBOX=portworx/busybox:${BUSYBOX_TAG}
publish_image ${BUSYBOX} ${BUSYBOX_TAG} ${PRODUCT_NAME}/busybox
MYSQL_TAG=5.7.41
MYSQL=portworx/mysql:${MYSQL_TAG}
publish_image ${MYSQL} ${MYSQL_TAG} ${PRODUCT_NAME}/mysql
PX_BACKUP_TAG=2.6.0
PX_BACKUP=portworx/px-backup:${PX_BACKUP_TAG}
publish_image ${PX_BACKUP} ${PX_BACKUP_TAG} ${PRODUCT_NAME}/px-backup
KOPIAEXECUTOR_TAG=1.2.9
KOPIAEXECUTOR=portworx/kopiaexecutor:${KOPIAEXECUTOR_TAG}
publish_image ${KOPIAEXECUTOR} ${KOPIAEXECUTOR_TAG} ${PRODUCT_NAME}/kopiaexecutor
MONGODB_TAG=5.0.20-debian-11-r13
MONGODB=portworx/mongodb:${MONGODB_TAG}
publish_image ${MONGODB} ${MONGODB_TAG} ${PRODUCT_NAME}/mongodb