summaryrefslogtreecommitdiff
path: root/contrib/imgts
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2020-09-21 11:38:11 -0400
committerChris Evich <cevich@redhat.com>2020-10-01 14:27:32 -0400
commit7c9c159e931109edd84747cfa219917412a55076 (patch)
tree0b5d9c8c9a84cd906adf468eac32c36d9a740518 /contrib/imgts
parent5d22eb02f95f28a87ed263afe28b7ff4bf2f6fee (diff)
downloadpodman-7c9c159e931109edd84747cfa219917412a55076.tar.gz
podman-7c9c159e931109edd84747cfa219917412a55076.tar.bz2
podman-7c9c159e931109edd84747cfa219917412a55076.zip
Migrate container images to automation_images
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/imgts')
-rw-r--r--contrib/imgts/Dockerfile20
-rw-r--r--contrib/imgts/README.md11
-rwxr-xr-xcontrib/imgts/entrypoint.sh23
-rw-r--r--contrib/imgts/google-cloud-sdk.repo8
-rw-r--r--contrib/imgts/lib_entrypoint.sh49
5 files changed, 0 insertions, 111 deletions
diff --git a/contrib/imgts/Dockerfile b/contrib/imgts/Dockerfile
deleted file mode 100644
index deaadb899..000000000
--- a/contrib/imgts/Dockerfile
+++ /dev/null
@@ -1,20 +0,0 @@
-FROM centos:7
-
-# Only needed for installing build-time dependencies
-COPY /contrib/imgts/google-cloud-sdk.repo /etc/yum.repos.d/google-cloud-sdk.repo
-RUN yum -y update && \
- yum -y install epel-release && \
- yum -y install google-cloud-sdk && \
- yum clean all
-
-ENV GCPJSON="__unknown__" \
- GCPNAME="__unknown__" \
- GCPPROJECT="__unknown__" \
- IMGNAMES="__unknown__" \
- BUILDID="__unknown__" \
- REPOREF="__unknown__"
-
-COPY ["/contrib/imgts/entrypoint.sh", "/contrib/imgts/lib_entrypoint.sh", "/usr/local/bin/"]
-RUN chmod 755 /usr/local/bin/entrypoint.sh
-
-ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
diff --git a/contrib/imgts/README.md b/contrib/imgts/README.md
deleted file mode 100644
index ad5ed4172..000000000
--- a/contrib/imgts/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-![PODMAN logo](../../logo/podman-logo-source.svg)
-
-A container image for tracking automation metadata.
-Currently this is used to update last-used timestamps on
-VM images.
-
-Example build (from repository root):
-
-```bash
-sudo podman build -t $IMAGE_NAME -f contrib/imgts/Dockerfile .
-```
diff --git a/contrib/imgts/entrypoint.sh b/contrib/imgts/entrypoint.sh
deleted file mode 100755
index b089e1e9b..000000000
--- a/contrib/imgts/entrypoint.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-source /usr/local/bin/lib_entrypoint.sh
-
-req_env_var GCPJSON GCPNAME GCPPROJECT IMGNAMES BUILDID REPOREF
-
-gcloud_init
-
-ARGS="
- --update-labels=last-used=$(date +%s)
- --update-labels=build-id=$BUILDID
- --update-labels=repo-ref=$REPOREF
- --update-labels=project=$GCPPROJECT
-"
-
-for image in $IMGNAMES
-do
- $GCLOUD compute images update "$image" $ARGS &
-done
-
-wait || echo "Warning: No \$IMGNAMES were specified."
diff --git a/contrib/imgts/google-cloud-sdk.repo b/contrib/imgts/google-cloud-sdk.repo
deleted file mode 100644
index 45b1e43bb..000000000
--- a/contrib/imgts/google-cloud-sdk.repo
+++ /dev/null
@@ -1,8 +0,0 @@
-[google-cloud-sdk]
-name=Google Cloud SDK
-baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
-enabled=1
-gpgcheck=1
-repo_gpgcheck=1
-gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
- https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
diff --git a/contrib/imgts/lib_entrypoint.sh b/contrib/imgts/lib_entrypoint.sh
deleted file mode 100644
index 6eb5cdc2f..000000000
--- a/contrib/imgts/lib_entrypoint.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-RED="\e[1;36;41m"
-YEL="\e[1;33;44m"
-NOR="\e[0m"
-SENTINEL="__unknown__" # default set in dockerfile
-# Disable all input prompts
-# https://cloud.google.com/sdk/docs/scripting-gcloud
-GCLOUD="gcloud --quiet"
-
-die() {
- EXIT=$1
- PFX=$2
- shift 2
- MSG="$@"
- echo -e "${RED}${PFX}:${NOR} ${YEL}$MSG${NOR}"
- [[ "$EXIT" -eq "0" ]] || exit "$EXIT"
-}
-
-# Pass in a list of one or more envariable names; exit non-zero with
-# helpful error message if any value is empty
-req_env_var() {
- for i; do
- if [[ -z "${!i}" ]]
- then
- die 1 FATAL entrypoint.sh requires \$$i to be non-empty.
- elif [[ "${!i}" == "$SENTINEL" ]]
- then
- die 2 FATAL entrypoint.sh requires \$$i to be explicitly set.
- fi
- done
-}
-
-gcloud_init() {
- set +xe
- if [[ -n "$1" ]] && [[ -r "$1" ]]
- then
- TMPF="$1"
- else
- TMPF=$(mktemp -p '' .$(uuidgen)_XXXX.json)
- trap "rm -f $TMPF &> /dev/null" EXIT
- echo "$GCPJSON" > $TMPF
- fi
- $GCLOUD auth activate-service-account --project="$GCPPROJECT" --key-file="$TMPF" || \
- die 5 FATAL auth
- rm -f $TMPF &> /dev/null || true # ignore any read-only error
-}