Add more info to the /etc/image_info

Change-Id: I956985410f55293c998e75c9fa8960e2b9106d45
This commit is contained in:
Vladimir Kozhukalov 2023-06-14 20:43:56 +03:00
parent e09a032257
commit 7c3c53c375
2 changed files with 12 additions and 0 deletions

View File

@ -35,6 +35,7 @@
name: registry
image: registry:2
state: started
restart_policy: "always"
published_ports:
- 172.17.0.1:5000:5000
become: True

View File

@ -6,6 +6,7 @@ INFO_DIR="/etc/image_info"
mkdir -p $INFO_DIR
PACKAGES_INFO="${INFO_DIR}/packages.txt"
PIP_INFO="${INFO_DIR}/pip.txt"
PROJECT_INFO="${INFO_DIR}/project.txt"
case ${distro} in
ubuntu)
@ -21,3 +22,13 @@ case ${distro} in
esac
pip freeze > $PIP_INFO
cat > ${PROJECT_INFO} <<EOF
PROJECT=${PROJECT}
PROJECT_REPO=${PROJECT_REPO}
PROJECT_REF=${PROJECT_REF}
PROJECT_RELEASE=${PROJECT_RELEASE}
EOF
pushd /tmp/${PROJECT}
echo "========"
git log -1 >> ${PROJECT_INFO}
popd