Skip to content

Commit 3d5e3a0

Browse files
authored
Use git hash as image version (#5016)
1 parent cfba8bc commit 3d5e3a0

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

deploy/hps/server_env/cpu_version.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

deploy/hps/server_env/gpu_version.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

deploy/hps/server_env/scripts/remove_images.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
paddlex_version="$(cat ../../../paddlex/.version)"
44

55
for device_type in 'gpu' 'cpu'; do
6-
version="$(cat "${device_type}_version.txt")"
76
docker rmi \
87
"ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:paddlex${paddlex_version%.*}-${device_type}" \
9-
"ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:${version}-paddlex${paddlex_version}-${device_type}" \
8+
"ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:$(git rev-parse --short HEAD)-${device_type}" \
109
"ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:latest-${device_type}"
1110
done

deploy/hps/server_env/scripts/tag_and_push_images.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
paddlex_version="$(cat ../../../paddlex/.version)"
44

55
for device_type in 'gpu' 'cpu'; do
6-
version="$(cat "${device_type}_version.txt")"
76
docker push "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:latest-${device_type}"
8-
for tag in "${version}-paddlex${paddlex_version}-${device_type}" "paddlex${paddlex_version%.*}-${device_type}"; do
7+
for tag in "$(git rev-parse --short HEAD)-${device_type}" "paddlex${paddlex_version%.*}-${device_type}"; do
98
docker tag "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:latest-${device_type}" "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:${tag}"
109
docker push "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:${tag}"
1110
done

0 commit comments

Comments
 (0)