Skip to content

Commit

Permalink
CI-1488: Upgrade draupnir to use pg-14 (#446)
Browse files Browse the repository at this point in the history
Co-authored-by: Theo Barber-Bany <[email protected]>
Co-authored-by: Ben Wheatley <[email protected]>

A quick rundown of what's changed:
- updated Ruby (3.1.2) and Go (1.17) versions to ones that support M1s
- updated Ubuntu to 22.04
- updated the gem locks and the version of pq such that draupnir can interact with the newer postgres
- updated postgres from 11 to 14 in the dockerfile and the corresponding scripts, i.e. `provision.sh` and all the draupnir scripts
- remove mention of `deb` from the readme, and `deb` files, as we have transitioned to `go mod` in 2020.
- With @Nabil372's help, updated the `db.tar` following the same instructions from [here](e87ffe7)
  • Loading branch information
Dragos Dumitrache authored Jul 21, 2022
1 parent c044701 commit 2428065
Show file tree
Hide file tree
Showing 23 changed files with 803 additions and 462 deletions.
2 changes: 1 addition & 1 deletion .circleci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Add any extra build dependencies we need for running draupnir tests
FROM circleci/golang:1.14
FROM circleci/golang:1.17

RUN set -x \
&& sudo apt-get update \
Expand Down
9 changes: 3 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2
references:
docker_golang: &docker_golang
docker:
- image: golang:1.14
- image: golang:1.17
working_directory: /project

jobs:
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
rubocop:
docker:
- image: circleci/ruby:2.7.1
- image: cimg/ruby:3.1.2
working_directory: ~/draupnir
steps:
- checkout
Expand All @@ -57,7 +57,7 @@ jobs:

integration:
machine:
image: ubuntu-2004:2022.04.2
image: ubuntu-2204:2022.04.2
steps:
- checkout
- attach_workspace:
Expand All @@ -71,9 +71,6 @@ jobs:
- run:
name: Install Ruby bundle
command: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
- run:
name: Pull draupnir base image
command: docker pull gocardless/draupnir-base
- run:
name: Run integration tests
command: cp workspace/*.linux_amd64 ./ && make test-integration
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.1
3.1.2
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ruby 3.1.2
golang 1.17
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
Changelog
=========

5.3.0
-----
- Update scripts to use postgres 14. Some technical changes around the versions of the tools used were also made

5.2.2
-----
- Fix order of operations when destroying instance

5.2.1
-----
- Actually bundle the drapunir-start-image script
- Actually bundle the draupnir-start-image script

5.2.0
-----
Expand Down
2 changes: 1 addition & 1 deletion DRAUPNIR_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.2.2
5.3.0
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM ubuntu:18.04
FROM ubuntu:22.04

ENV POSTGRESQL_VERSION=11
ENV POSTGRESQL_VERSION=14
RUN set -x \
&& apt-get update \
&& apt-get install -y \
software-properties-common \
build-essential \
curl \
sudo \
btrfs-tools \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\ndeb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg 11" > /etc/apt/sources.list.d/pgdg.list \
&& curl --silent -L https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
btrfs-progs \
&& echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main\ndeb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg 14" > /etc/apt/sources.list.d/pgdg.list \
&& curl --silent -L https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive TZ=Europe/London apt-get install -y tzdata \
&& apt-get install -y \
Expand Down
160 changes: 82 additions & 78 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,120 +1,124 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.4.3)
activesupport (7.0.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arr-pm (0.0.10)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
arr-pm (0.0.11)
cabin (> 0)
ast (2.4.1)
backports (3.10.3)
ast (2.4.2)
backports (3.23.0)
cabin (0.9.0)
childprocess (0.8.0)
ffi (~> 1.0, >= 1.0.11)
clamp (1.0.1)
coderay (1.1.2)
concurrent-ruby (1.1.6)
diff-lcs (1.3)
docker-api (1.34.0)
coderay (1.1.3)
concurrent-ruby (1.1.10)
diff-lcs (1.5.0)
docker-api (2.2.0)
excon (>= 0.47.0)
multi_json
domain_name (0.5.20170404)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.2.1)
excon (0.71.0)
ffi (1.9.18)
fpm (1.9.3)
arr-pm (~> 0.0.10)
dotenv (2.7.6)
excon (0.92.3)
fpm (1.14.2)
arr-pm (~> 0.0.11)
backports (>= 2.6.2)
cabin (>= 0.6.0)
childprocess
clamp (~> 1.0.0)
ffi
json (>= 1.7.7, < 2.0)
git (>= 1.3.0, < 2.0)
json (>= 1.7.7, < 3.0)
pleaserun (~> 0.0.29)
ruby-xz
rexml
stud
gc_ruboconfig (2.16.0)
rubocop (>= 0.87)
rubocop-performance (~> 1.7)
rubocop-rspec (>= 1.38.1)
http-cookie (1.0.3)
gc_ruboconfig (3.3.0)
rubocop (>= 1.29)
rubocop-performance (>= 1.13)
rubocop-rails (>= 2.14.0)
rubocop-rspec (>= 2.11.0)
git (1.11.0)
rchardet (~> 1.8)
http-accept (1.7.0)
http-cookie (1.0.5)
domain_name (~> 0.5)
i18n (1.8.2)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
insist (1.0.0)
io-like (0.3.0)
json (1.8.6)
method_source (0.9.0)
mime-types (3.1)
json (2.6.2)
method_source (1.0.0)
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
minitest (5.14.1)
multi_json (1.12.2)
mime-types-data (3.2022.0105)
minitest (5.16.2)
multi_json (1.15.0)
mustache (0.99.8)
netrc (0.11.0)
parallel (1.19.2)
parser (2.7.1.4)
parallel (1.22.1)
parser (3.1.2.0)
ast (~> 2.4.1)
pleaserun (0.0.30)
pleaserun (0.0.32)
cabin (> 0)
clamp
dotenv
insist
mustache (= 0.99.8)
stud
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
rainbow (3.0.0)
regexp_parser (1.7.1)
rest-client (2.0.2)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
rack (2.2.4)
rainbow (3.1.1)
rchardet (1.8.0)
regexp_parser (2.5.0)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.4)
rspec (3.7.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-core (3.7.0)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
rexml (3.2.5)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rubocop (0.88.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
rubocop (1.31.2)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 2.7.1.1)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
rexml
rubocop-ast (>= 0.1.0, < 1.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.18.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.2.0)
parser (>= 2.7.0.1)
rubocop-performance (1.7.1)
rubocop (>= 0.82.0)
rubocop-rspec (1.42.0)
rubocop (>= 0.87.0)
ruby-progressbar (1.10.1)
ruby-xz (0.2.3)
ffi (~> 1.9)
io-like (~> 0.3)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.19.1)
parser (>= 3.1.1.0)
rubocop-performance (1.14.2)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.15.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-rspec (2.12.1)
rubocop (~> 1.31)
ruby-progressbar (1.11.0)
stud (0.0.23)
thread_safe (0.3.6)
tzinfo (1.2.7)
thread_safe (~> 0.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.4)
unicode-display_width (1.7.0)
unf_ext (0.0.8.2)
unicode-display_width (2.2.0)

PLATFORMS
ruby
Expand Down
Loading

0 comments on commit 2428065

Please sign in to comment.