From fbb1081ed50844883dab2713fbddbcafe0b2c7a6 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 3 Apr 2021 21:31:12 +0200 Subject: [PATCH] Remove two old scripts --- bin/app-version.sh | 42 ------------------------------------------ bin/image-versions.sh | 10 ---------- 2 files changed, 52 deletions(-) delete mode 100755 bin/app-version.sh delete mode 100755 bin/image-versions.sh diff --git a/bin/app-version.sh b/bin/app-version.sh deleted file mode 100755 index bbe7490..0000000 --- a/bin/app-version.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -# Usage: ./app-version.sh -# Example: ./app-version.sh drone/drone:1.10.1 app -# -# Accepts a full format hub.docker.com image tag which it pulls locally and -# generates output which can be used to put in the abra.sh for app packaging. -# Requires the yq program https://mikefarah.gitbook.io/yq/ - -error() { - echo "$(tput setaf 1)ERROR: $*$(tput sgr0)" - exit 1 -} - -IMAGE="$1" -SERVICE="$2" - -if ! docker pull -q "$IMAGE" > /dev/null 2>&1; then - error "Failed to download image, is the tag correct?" -fi - -version=$(echo "$IMAGE" | cut -d ':' -f2) -digest=$(docker image inspect -f "{{.Id}}" "$IMAGE" | cut -d ':' -f2- | cut -c 1-8) - -echo "--- Add the following to your abra.sh ---" -echo "export ABRA_TYPE_${SERVICE^^}_VERSION=${version}" -echo "export ABRA_TYPE_${SERVICE^^}_DIGEST=${digest}" - -version_lookup="ABRA_TYPE_${SERVICE^^}_VERSION" -digest_lookup="ABRA_TYPE_${SERVICE^^}_DIGEST" - -label='- "coop-cloud.${STACK_NAME}.' -label+="${SERVICE}" -label+='.version=${' -label+="${version_lookup}" -label+='}-${' -label+="${digest_lookup}" -label+='}"' - -echo -echo "--- And don't forget to label the actual service in the compose file ---" -echo "$label" diff --git a/bin/image-versions.sh b/bin/image-versions.sh deleted file mode 100755 index 53fd987..0000000 --- a/bin/image-versions.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# Usage: ./image-version.sh -# Example: ./image-version.sh gitea/gitea -# -# Reads image metadata from Docker hub and lists versions - -IMAGE="$1" - -skopeo inspect "docker://$IMAGE" | jq '.RepoTags'