Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 5a2e015

Browse files
authored
Merge pull request #644 from ldorau/Create-separate-Docker-images-for-stable-1.6-branch
Create separate Docker images for stable-1.6 branch
2 parents bc08ba5 + 587c4c3 commit 5a2e015

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

utils/docker/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# Copyright 2017-2018, Intel Corporation
3+
# Copyright 2017-2020, Intel Corporation
44
#
55
# Redistribution and use in source and binary forms, with or without
66
# modification, are permitted provided that the following conditions
@@ -73,7 +73,7 @@ else
7373
fi
7474
fi
7575

76-
imageName=${DOCKERHUB_REPO}:${OS}-${OS_VER}
76+
imageName=${DOCKERHUB_REPO}:1.6-${OS}-${OS_VER}
7777
containerName=libpmemobj-cpp-${OS}-${OS_VER}
7878

7979
if [[ "$command" == "" ]]; then

utils/docker/images/build-image.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# Copyright 2016-2018, Intel Corporation
3+
# Copyright 2016-2020, Intel Corporation
44
#
55
# Redistribution and use in source and binary forms, with or without
66
# modification, are permitted provided that the following conditions
@@ -62,8 +62,8 @@ if [[ ! -f "Dockerfile.$2" ]]; then
6262
exit 1
6363
fi
6464

65-
# Build a Docker image tagged with ${DOCKERHUB_REPO}:OS-VER
66-
docker build -t $1:$2 \
65+
# Build a Docker image tagged with ${DOCKERHUB_REPO}:1.6-OS-VER
66+
docker build -t $1:1.6-$2 \
6767
--build-arg http_proxy=$http_proxy \
6868
--build-arg https_proxy=$https_proxy \
6969
-f Dockerfile.$2 .

utils/docker/images/push-image.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# Copyright 2016-2018, Intel Corporation
3+
# Copyright 2016-2020, Intel Corporation
44
#
55
# Redistribution and use in source and binary forms, with or without
66
# modification, are permitted provided that the following conditions
@@ -45,7 +45,7 @@ function usage {
4545
echo "Usage:"
4646
echo " push-image.sh <OS-VER>"
4747
echo "where <OS-VER>, for example, can be 'ubuntu-16.04', provided " \
48-
"a Docker image tagged with ${DOCKERHUB_REPO}:ubuntu-16.04 exists " \
48+
"a Docker image tagged with ${DOCKERHUB_REPO}:1.6-ubuntu-16.04 exists " \
4949
"locally."
5050
}
5151

@@ -55,8 +55,8 @@ if [[ -z "$1" ]]; then
5555
exit 1
5656
fi
5757

58-
# Check if the image tagged with ${DOCKERHUB_REPO}:OS-VER exists locally
59-
if [[ ! $(docker images -a | awk -v pattern="^${DOCKERHUB_REPO}:$1\$" \
58+
# Check if the image tagged with ${DOCKERHUB_REPO}:1.6-OS-VER exists locally
59+
if [[ ! $(docker images -a | awk -v pattern="^${DOCKERHUB_REPO}:1.6-$1\$" \
6060
'$1":"$2 ~ pattern') ]]
6161
then
6262
echo "ERROR: wrong argument."
@@ -68,4 +68,4 @@ fi
6868
docker login -u="$DOCKERHUB_USER" -p="$DOCKERHUB_PASSWORD"
6969

7070
# Push the image to the repository
71-
docker push ${DOCKERHUB_REPO}:$1
71+
docker push ${DOCKERHUB_REPO}:1.6-$1

utils/docker/pull-or-rebuild-image.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# Copyright 2016-2019, Intel Corporation
3+
# Copyright 2016-2020, Intel Corporation
44
#
55
# Redistribution and use in source and binary forms, with or without
66
# modification, are permitted provided that the following conditions
@@ -123,8 +123,8 @@ for file in $files; do
123123
# repository's master branch, and the Travis build is not
124124
# of the "pull_request" type). In that case, create the empty
125125
# file.
126-
if [[ $TRAVIS_REPO_SLUG == "${GITHUB_REPO}" \
127-
&& $TRAVIS_BRANCH == "master" \
126+
if [[ "${TRAVIS_REPO_SLUG}" == "${GITHUB_REPO}" \
127+
&& ($TRAVIS_BRANCH == stable-* || $TRAVIS_BRANCH == master) \
128128
&& $TRAVIS_EVENT_TYPE != "pull_request"
129129
&& $PUSH_IMAGE == "1" ]]
130130
then
@@ -145,4 +145,4 @@ done
145145

146146
# Getting here means rebuilding the Docker image is not required.
147147
# Pull the image from Docker Hub.
148-
docker pull ${DOCKERHUB_REPO}:${OS}-${OS_VER}
148+
docker pull ${DOCKERHUB_REPO}:1.6-${OS}-${OS_VER}

0 commit comments

Comments
 (0)