Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI-1488: Upgrade draupnir to use pg-14 #446

Merged
merged 25 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
528e3e2
This is an attempt to get virtualbox going on Apple silicon
Jul 11, 2022
825629f
Update packages and pg version
Jul 14, 2022
6826793
Update db.tar and integration tests
Jul 15, 2022
74b9370
Undo incorrect changes
Jul 15, 2022
7c47131
Undo silly version removal
Jul 15, 2022
f61ab6e
Undo unrelated changes on provision.sh
Jul 15, 2022
efb2cf1
Update circleci golang version
Jul 15, 2022
9fa0d08
No longer pull old docker image
Jul 15, 2022
8427d4e
Adding a .tool-versions file for asdf usage
Jul 15, 2022
15a7737
Re-add postgres14 installation to vagrant
Jul 15, 2022
52eb76e
Update ubuntu and golang base images
Jul 19, 2022
9ba5e65
Undo circleci golang image change
Jul 19, 2022
62d72a5
Update vagrant base to ubuntu-22.04
Jul 21, 2022
01ffab3
Update provision script to generate certificate with SAN
Jul 21, 2022
14f582e
Remove SAN for certificate authority
Jul 21, 2022
8de70ed
Re-add circleci ruby version and update storage controller
Jul 21, 2022
eb6d278
Switch to ruby 3.1.2 to make circleci happy
Jul 21, 2022
17697db
Use updated cimg over the deprecated ones
Jul 21, 2022
75f7319
Fix rubocop hash value syntax
Jul 21, 2022
9fcccd7
Update provision.sh to install postgres 14
Jul 21, 2022
88c81a5
Add -e to echo for escape sequences and revert echo change in
Jul 21, 2022
37911d5
Remove -e escape from docker command
Jul 21, 2022
2feef51
Actually generate the certificate with a private key
Jul 21, 2022
ddb4c25
Skip reinstalling go on reprovision
benwh Jul 21, 2022
6814d3b
Fix installation of sql-migrate
benwh Jul 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
DragosDumitrache marked this conversation as resolved.
Show resolved Hide resolved

RUN set -x \
&& sudo apt-get update \
Expand Down
15 changes: 3 additions & 12 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
DragosDumitrache marked this conversation as resolved.
Show resolved Hide resolved
- image: circleci/ruby:3.0.2
working_directory: ~/draupnir
steps:
- checkout
Expand All @@ -57,23 +57,14 @@ jobs:

integration:
machine:
image: ubuntu-2004:2022.04.2
image: ubuntu-2204:2022.04.2
steps:
- checkout
- attach_workspace:
at: workspace
- run:
name: Set Ruby version
DragosDumitrache marked this conversation as resolved.
Show resolved Hide resolved
command: |
RUBY_VERSION=$(cat .ruby-version)
rvm install $RUBY_VERSION
echo . $(rvm $RUBY_VERSION do rvm env --path) >> $BASH_ENV
- 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.0.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.0.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
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
FROM ubuntu:18.04
FROM ubuntu:22.04
DragosDumitrache marked this conversation as resolved.
Show resolved Hide resolved

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 \
postgresql-"${POSTGRESQL_VERSION}" \
postgresql-common \
ruby \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

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