Change links usage

Story: 2005666
Task: 33510

Change-Id: Ic6e0cc1f6e70d8ad496104843831f737c4708dbe
This commit is contained in:
Arseni Lipinski 2019-05-14 16:10:46 +02:00 committed by Dobroslaw Zybort
parent b6e1bb5a01
commit 807ebf0331
3 changed files with 8 additions and 7 deletions

View File

@ -56,7 +56,7 @@ ONBUILD LABEL \
org.opencontainers.image.version="$REPO_VERSION" \
org.opencontainers.image.revision="$GIT_COMMIT" \
org.opencontainers.image.licenses="Apache-2.0" \
org.openstack.constraints_uri="$CONSTRAINTS_FILE?h=$CONSTRAINTS_BRANCH" \
org.openstack.constraints_uri="$CONSTRAINTS_FILE" \
org.openstack.monasca.python.extra_deps="$EXTRA_DEPS" \
org.openstack.monasca.common.source="$COMMON_REPO" \
org.openstack.monasca.common.version="$COMMON_VERSION" \
@ -97,7 +97,7 @@ ONBUILD RUN \
git -C /app fetch origin "$REPO_VERSION" && \
git -C /app reset --hard FETCH_HEAD && \
wget --output-document /app/upper-constraints.txt \
"$CONSTRAINTS_FILE"?h="$CONSTRAINTS_BRANCH" && \
"$CONSTRAINTS_FILE" && \
# Download monasca-common
mkdir -p /monasca-common && \
git -C /monasca-common init && \
@ -146,7 +146,7 @@ ONBUILD RUN \
printf "Monasca-common revision: %s\\n" \
"$COMMON_GIT_COMMIT" >> /VERSIONS && \
printf "Constraints file: %s\\n" \
"$CONSTRAINTS_FILE"?h="$CONSTRAINTS_BRANCH" >> /VERSIONS && \
"$CONSTRAINTS_FILE" >> /VERSIONS && \
# Clean after instalation.
apk del .build-deps .build-librdkafka && \
rm -rf \

View File

@ -1,6 +1,6 @@
# Example Dockerfile for creating Docker image.
ARG DOCKER_IMAGE=monasca-api
ARG APP_REPO=https://opendev.org/openstack/monasca-api
ARG APP_REPO=https://review.opendev.org/openstack/monasca-api
# Branch, tag or git hash to build from.
ARG REPO_VERSION=master

View File

@ -55,7 +55,7 @@ set -eo pipefail # Exit the script if any statement returns error.
REPO_VERSION_CLEAN=$(echo "$REPO_VERSION" | sed 's|/|-|g')
[ -z "$APP_REPO" ] && APP_REPO=$(\grep APP_REPO Dockerfile | cut -f2 -d"=")
GITHUB_REPO=$(echo "$APP_REPO" | sed 's/opendev.org/github.com/' | \
GITHUB_REPO=$(echo "$APP_REPO" | sed 's/review.opendev.org/github.com/' | \
sed 's/ssh:/https:/')
if [ -z "$CONSTRAINTS_FILE" ]; then
@ -71,10 +71,11 @@ fi
case "$REPO_VERSION" in
*stable*)
CONSTRAINTS_BRANCH_CLEAN="$REPO_VERSION"
CONSTRAINTS_FILE=${CONSTRAINTS_FILE/master/$CONSTRAINTS_BRANCH_CLEAN}
# Get monasca-common version from stable upper constraints file.
CONSTRAINTS_TMP_FILE=$(mktemp)
wget --output-document "$CONSTRAINTS_TMP_FILE" \
"$CONSTRAINTS_FILE"?h="$CONSTRAINTS_BRANCH_CLEAN"
$CONSTRAINTS_FILE
UPPER_COMMON=$(\grep 'monasca-common' "$CONSTRAINTS_TMP_FILE")
# Get only version part from monasca-common.
UPPER_COMMON_VERSION="${UPPER_COMMON##*===}"
@ -88,7 +89,7 @@ esac
# Monasca-common variables.
if [ -z "$COMMON_REPO" ]; then
COMMON_REPO=$(\grep COMMON_REPO Dockerfile | cut -f2 -d"=") || true
: "${COMMON_REPO:=https://opendev.org/openstack/monasca-common}"
: "${COMMON_REPO:=https://review.opendev.org/openstack/monasca-common}"
fi
: "${COMMON_VERSION:=$3}"
if [ -z "$COMMON_VERSION" ]; then