Skip to content

Commit 151eb62

Browse files
committed
feat: switch to gitflow
1 parent 2daaa57 commit 151eb62

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

.travis.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ before_install:
2828
- 'echo " \"experimental\": \"enabled\"" >> $HOME/.docker/config.json'
2929
- 'echo "}" >> $HOME/.docker/config.json'
3030
- sudo service docker restart
31+
# To have `DOCKER_USER` and `DOCKER_PASS`
32+
# use `travis env set`.
33+
- echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
3134

3235
install:
3336
# For cross buidling our images
@@ -51,9 +54,11 @@ before_script:
5154
- if [ -n "$TRAVIS_TAG" ]; then
5255
VERSION=$(echo "${TRAVIS_TAG}" | sed -e 's/\(.*\)[-v]\(.*\)/\1\2/g');
5356
fi
54-
- if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
57+
- if [ "${TRAVIS_BRANCH}" == 'master' ]; then
5558
VERSION="stable";
5659
fi
60+
# replace / with - in version
61+
- VERSION=$(echo "${VERSION}" | sed 's|/|-|g');
5762

5863
script:
5964
- make build-nocache NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
@@ -64,9 +69,6 @@ before_deploy:
6469
- docker run -d --name test_image ${NAME}:${VERSION}-${TARGET_ARCH} sleep 10
6570
- sleep 5
6671
- sudo docker ps | grep -q test_image
67-
# To have `DOCKER_USER` and `DOCKER_PASS`
68-
# use `travis env set`.
69-
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS";
7072
- make tag NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
7173

7274
deploy:
@@ -81,21 +83,21 @@ jobs:
8183
install: skip
8284
script: skip
8385
after_deploy:
84-
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS";
86+
- echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
8587
- docker manifest create ${NAME}:${VERSION} ${NAME}:${VERSION}-amd64 ${NAME}:${VERSION}-arm32v7 ${NAME}:${VERSION}-arm64v8;
8688
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-amd64 --os linux --arch amd64;
8789
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-arm32v7 --os linux --arch arm --variant v7;
8890
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-arm64v8 --os linux --arch arm64 --variant v8;
8991

90-
# The latest tag is coming from the stable branch of the repo
91-
- if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
92+
# The latest tag is coming from the master branch of the repo
93+
- if [ "${TRAVIS_BRANCH}" == 'master' ]; then
9294
docker manifest create ${NAME}:latest ${NAME}:${VERSION}-amd64 ${NAME}:${VERSION}-arm32v7 ${NAME}:${VERSION}-arm64v8;
9395
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-amd64 --os linux --arch amd64;
9496
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-arm32v7 --os linux --arch arm --variant v7;
9597
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-arm64v8 --os linux --arch arm64 --variant v8;
9698
fi
9799

98100
- docker manifest push ${NAME}:${VERSION};
99-
if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
101+
if [ "${TRAVIS_BRANCH}" == 'master' ]; then
100102
docker manifest push ${NAME}:latest;
101103
fi

image/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ FROM osixia/openldap:1.4.0
22

33
# Install cron from baseimage and remove .cfss and slapd services inherited from openldap image
44
# remove also previous default environment files, they are not needed.
5-
# sources: https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/add-service-available
6-
#  https://github.com/osixia/docker-light-baseimage/blob/stable/image/service-available/:cron/download.sh
5+
# sources: https://github.com/osixia/docker-light-baseimage/blob/master/image/tool/add-service-available
6+
#  https://github.com/osixia/docker-light-baseimage/blob/master/image/service-available/:cron/download.sh
77
RUN apt-get -y update \
88
&& /container/tool/add-multiple-process-stack \
99
&& apt-get install -y awscli \
@@ -14,7 +14,7 @@ RUN apt-get -y update \
1414
ADD service /container/service
1515

1616
# Use baseimage install-service script
17-
# https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/install-service
17+
# https://github.com/osixia/docker-light-baseimage/blob/master/image/tool/install-service
1818
RUN /container/tool/install-service
1919

2020
# Add default env variables

image/service/slapd-backup/startup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash -e
22

33
# set -x (bash debug) if log level is trace
4-
# https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/log-helper
4+
# https://github.com/osixia/docker-light-baseimage/blob/master/image/tool/log-helper
55
log-helper level eq trace && set -x
66

77
# add image tools to path

0 commit comments

Comments
 (0)