Skip to content
This repository was archived by the owner on Nov 30, 2017. It is now read-only.

Commit bbeae00

Browse files
committed
wal-e ssh_strategy fork is stable; build into base image
1 parent d5df4c8 commit bbeae00

8 files changed

Lines changed: 22 additions & 16 deletions

File tree

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[submodule "wal-e"]
2-
path = wal-e
1+
[submodule "images/postgresql95-base/wal-e"]
2+
path = images/postgresql95-base/wal-e
33
url = https://github.com/drnic/wal-e.git
44
branch = ssh_strategy

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ RUN echo "[[ -f /etc/patroni.d/.envrc ]] && source /etc/patroni.d/.envrc" >> /ro
1616
COPY images/supervisord.conf /etc/supervisor/supervisord.conf
1717
COPY images/services/*.conf /etc/supervisor/conf.d/
1818

19-
COPY wal-e /tmp/wal-e
20-
RUN cd /tmp/wal-e && pip3 install . --upgrade
21-
2219
COPY images/scripts /scripts
2320
CMD ["/scripts/entry.sh"]
2421

ci/pipeline.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,9 @@ jobs:
3232
- {get: agent-ci}
3333
- {get: agent, passed: [rc]}
3434
- {get: version, passed: [rc], trigger: true}
35-
- {get: wal-e, resource: wale-fork, trigger: true}
36-
- task: custom-wal-e
37-
file: agent-ci/ci/tasks/custom-wal-e.yml
3835
- put: pg95-image
3936
params:
40-
build: dockerfile
37+
build: agent
4138
# cache: true -- causing https://ci.starkandwayne.com/teams/main/pipelines/dingo-postgresql-agent/jobs/build-image/builds/16
4239
tag: agent-ci/ci/tags/pre-test
4340

@@ -140,11 +137,16 @@ jobs:
140137
public: true
141138
serial: true
142139
plan:
143-
- {get: agent-base, trigger: true}
144-
- {get: agent}
140+
- aggregate:
141+
- {get: agent, resource: agent-base, trigger: true}
142+
- {get: agent-ci}
143+
- {get: wal-e, resource: wale-fork, trigger: true}
144+
- task: custom-wal-e
145+
file: agent-ci/ci/tasks/custom-wal-e.yml
146+
params: {dockerfile_dir: agent/images/postgresql95-base}
145147
- put: pg95-base-image
146148
params:
147-
build: agent/images/postgresql95-base
149+
build: dockerfile
148150
cache: true
149151

150152
- name: build-task-image

ci/tasks/custom-wal-e.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
cp -r agent/* dockerfile/
5+
cp -r ${dockerfile_dir}/* dockerfile/
66

77
# remove submodule from development
88
rm -rf dockerfile/wal-e

ci/tasks/custom-wal-e.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@ inputs:
1111
outputs:
1212
- name: dockerfile
1313

14+
params:
15+
dockerfile_dir:
16+
1417
run:
1518
path: agent-ci/ci/tasks/custom-wal-e.sh

images/postgresql95-base/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ RUN set -x \
7272
&& rm -rf /var/cache/apk/* \
7373
&& pip3 install --no-cache-dir wal-e[aws,azure,google,swift]==${WALE_VERSION} awscli envdir pgxnclient --upgrade
7474

75+
# Now install patched wal-e with ssh_strategy
76+
COPY wal-e /tmp/wal-e
77+
RUN cd /tmp/wal-e && pip3 install . --upgrade
78+
7579
# python2, dumb-init, supervisor
7680
ENV SUPERVISOR_VERSION=3.3.1
7781
RUN set -x \

images/postgresql95-base/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
To see the versioned aspects of the base Docker image, run:
44

55
```
6-
grep "^ENV.*VERSION" images/pg96-base/Dockerfile
6+
grep "^ENV.*VERSION" images/postgresql95-base/Dockerfile
77
```
88

99
The output will look similar to:
@@ -27,7 +27,7 @@ docker build -t dingotiles/dingo-postgresql95-agent-base:latest images/postgresq
2727
Sanity check of installed tools:
2828

2929
```
30-
$ image=dingotiles/dingo-postgresql96-agent-base:latest
30+
$ image=dingotiles/dingo-postgresql95-agent-base:latest
3131
3232
$ docker run -ti $image postgres --version
3333
postgres (PostgreSQL) 9.5.4
@@ -38,7 +38,7 @@ jq-1.5
3838
$ docker run -ti $image etcdctl --version
3939
etcdctl version 2.3.4
4040
$ docker run -ti $image wal-e version
41-
1.0.2
41+
1.1.dev0
4242
$ docker run -ti $image python --version
4343
Python 2.7.12
4444
$ docker run -ti $image python3 --version

0 commit comments

Comments
 (0)