-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_to_dev.sh
More file actions
executable file
·22 lines (19 loc) · 1001 Bytes
/
deploy_to_dev.sh
File metadata and controls
executable file
·22 lines (19 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
echo "deploy_to_dev"
cd helm/${APP_PROJECT_NAME}/${APP_CHART_NAME}
EXPECT_CHART=`echo ${GITHUB_REPOSITORY} | awk -F "/" '{print $2}'`
TARGET_CHART=`yq r Chart.yaml name`
echo "verify the EXPECT_CHART:$EXPECT_CHART and TARGET_CHART:$TARGET_CHART"
if [ "$EXPECT_CHART" != "$TARGET_CHART" ];then
echo "TARGET_CHART $TARGET_CHART not same as EXPECT_CHART $EXPECT_CHART, please check"
exit 1
fi
echo "list current common*.image.repository"
yq r --printMode pv values.yaml "common*.image.repository"
echo "latest GITLAB_IMAGE_NAME is ${GITLAB_REGISTRY}/${GITHUB_REPOSITORY}"
yq w -i values.yaml "common*.image.repository" ${GITLAB_REGISTRY}/${GITHUB_REPOSITORY}
yq r --printMode pv values.yaml "common*.image.repository"
echo "list current common*.image.tag"
yq r --printMode pv values.yaml "common*.image.tag"
echo "latest GITLAB_IMAGE_TAG is sha-${GITHUB_SHA:0:7}"
yq w -i values.yaml "common*.image.tag" sha-${GITHUB_SHA:0:7}
yq r --printMode pv values.yaml "common*.image.tag"