Skip to content

Commit 7b44cfc

Browse files
authored
ubuntu version updates (#66)
- Remove ubuntu 16.04/18.04 - Add support for ubuntu 22.04 - Add test for no IMDS version specified
1 parent eed9799 commit 7b44cfc

File tree

4 files changed

+36
-75
lines changed

4 files changed

+36
-75
lines changed

.circleci/config.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,49 +23,48 @@ jobs:
2323
path: /tmp/logs
2424
- store_test_results:
2525
path: /tmp/logs
26-
bats_ubuntu1604_imds_v1:
26+
bats_ubuntu2004_imds_v1:
2727
# We need to run Docker Compose with privileged settings, which isn't supported by CircleCI's Docker executor, so
2828
# we have to use the machine executor instead.
2929
machine: true
3030
steps:
3131
- checkout
32-
- run: docker-compose up --exit-code-from bats_ubuntu1604_imds_v1 bats_ubuntu1604_imds_v1
33-
bats_ubuntu1604_imds_v2:
32+
- run: docker-compose up --exit-code-from bats_ubuntu2004_imds_v1 bats_ubuntu2004_imds_v1
33+
bats_ubuntu2004_imds_v2:
3434
# We need to run Docker Compose with privileged settings, which isn't supported by CircleCI's Docker executor, so
3535
# we have to use the machine executor instead.
3636
machine: true
3737
steps:
3838
- checkout
39-
- run: docker-compose up --exit-code-from bats_ubuntu1604_imds_v2 bats_ubuntu1604_imds_v2
40-
41-
bats_ubuntu1804_imds_v1:
39+
- run: docker-compose up --exit-code-from bats_ubuntu2004_imds_v2 bats_ubuntu2004_imds_v2
40+
bats_ubuntu2004_no_imds:
4241
# We need to run Docker Compose with privileged settings, which isn't supported by CircleCI's Docker executor, so
4342
# we have to use the machine executor instead.
4443
machine: true
4544
steps:
4645
- checkout
47-
- run: docker-compose up --exit-code-from bats_ubuntu1804_imds_v1 bats_ubuntu1804_imds_v1
48-
bats_ubuntu1804_imds_v2:
46+
- run: docker-compose up --exit-code-from bats_ubuntu2004_no_imds bats_ubuntu2004_no_imds
47+
bats_ubuntu2204_imds_v1:
4948
# We need to run Docker Compose with privileged settings, which isn't supported by CircleCI's Docker executor, so
5049
# we have to use the machine executor instead.
5150
machine: true
5251
steps:
5352
- checkout
54-
- run: docker-compose up --exit-code-from bats_ubuntu1804_imds_v2 bats_ubuntu1804_imds_v2
55-
bats_ubuntu2004_imds_v1:
53+
- run: docker-compose up --exit-code-from bats_ubuntu2204_imds_v1 bats_ubuntu2204_imds_v1
54+
bats_ubuntu2204_imds_v2:
5655
# We need to run Docker Compose with privileged settings, which isn't supported by CircleCI's Docker executor, so
5756
# we have to use the machine executor instead.
5857
machine: true
5958
steps:
6059
- checkout
61-
- run: docker-compose up --exit-code-from bats_ubuntu2004_imds_v1 bats_ubuntu2004_imds_v1
62-
bats_ubuntu2004_imds_v2:
60+
- run: docker-compose up --exit-code-from bats_ubuntu2204_imds_v2 bats_ubuntu2204_imds_v2
61+
bats_ubuntu2204_no_imds:
6362
# We need to run Docker Compose with privileged settings, which isn't supported by CircleCI's Docker executor, so
6463
# we have to use the machine executor instead.
6564
machine: true
6665
steps:
6766
- checkout
68-
- run: docker-compose up --exit-code-from bats_ubuntu2004_imds_v2 bats_ubuntu2004_imds_v2
67+
- run: docker-compose up --exit-code-from bats_ubuntu2204_no_imds bats_ubuntu2204_no_imds
6968

7069
workflows:
7170
version: 2
@@ -76,9 +75,9 @@ workflows:
7675
context:
7776
- AWS__PHXDEVOPS__circle-ci-test
7877
- GITHUB__PAT__gruntwork-ci
79-
- bats_ubuntu1604_imds_v1
80-
- bats_ubuntu1604_imds_v2
81-
- bats_ubuntu1804_imds_v1
82-
- bats_ubuntu1804_imds_v2
8378
- bats_ubuntu2004_imds_v1
8479
- bats_ubuntu2004_imds_v2
80+
- bats_ubuntu2004_no_imds
81+
- bats_ubuntu2204_imds_v1
82+
- bats_ubuntu2204_imds_v2
83+
- bats_ubuntu2204_no_imds

Dockerfile.ubuntu16.04.bats

Lines changed: 0 additions & 36 deletions
This file was deleted.

Dockerfile.ubuntu18.04.bats renamed to Dockerfile.ubuntu22.04.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:18.04
1+
FROM ubuntu:22.04
22
MAINTAINER Gruntwork <[email protected]>
33

44
# Install basic dependencies

docker-compose.yml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,24 @@ services:
88
- ./:/usr/local/src/bash-commons
99
working_dir: /usr/local/src/bash-commons/.circleci
1010
command: ./shellcheck.sh
11-
bats_ubuntu1604_imds_v1:
11+
bats_ubuntu2004_imds_v1:
1212
build:
1313
context: ./
14-
dockerfile: Dockerfile.ubuntu16.04.bats
14+
dockerfile: Dockerfile.ubuntu20.04.bats
1515
volumes:
1616
# Mount all the files so you have "hot reload" of all changes from the host
1717
- ./:/usr/local/src/bash-commons
1818
working_dir: /usr/local/src/bash-commons
1919
command: bats test
2020
# Necessary so we can run a mock EC2 metadata service on port 80 on a special IP
2121
privileged: true
22-
# We intentionally omit the GRUNTWORK_BASH_COMMONS_IMDS_VERSION env var here to ensure the default behavior works as expected
23-
bats_ubuntu1604_imds_v2:
22+
environment:
23+
# Signal to bash-commons module to use Instance Metadata Service version 1
24+
- GRUNTWORK_BASH_COMMONS_IMDS_VERSION=1
25+
bats_ubuntu2004_imds_v2:
2426
build:
2527
context: ./
26-
dockerfile: Dockerfile.ubuntu16.04.bats
28+
dockerfile: Dockerfile.ubuntu20.04.bats
2729
volumes:
2830
# Mount all the files so you have "hot reload" of all changes from the host
2931
- ./:/usr/local/src/bash-commons
@@ -34,22 +36,21 @@ services:
3436
environment:
3537
# Signal to bash-commons module to use Instance Metadata Service version 2
3638
- GRUNTWORK_BASH_COMMONS_IMDS_VERSION=2
37-
bats_ubuntu1804_imds_v1:
39+
bats_ubuntu2004_no_imds:
3840
build:
3941
context: ./
40-
dockerfile: Dockerfile.ubuntu18.04.bats
42+
dockerfile: Dockerfile.ubuntu20.04.bats
4143
volumes:
4244
# Mount all the files so you have "hot reload" of all changes from the host
4345
- ./:/usr/local/src/bash-commons
4446
working_dir: /usr/local/src/bash-commons
4547
command: bats test
4648
# Necessary so we can run a mock EC2 metadata service on port 80 on a special IP
4749
privileged: true
48-
# We intentionally omit the GRUNTWORK_BASH_COMMONS_IMDS_VERSION env var here to ensure the default behavior works as intended
49-
bats_ubuntu1804_imds_v2:
50+
bats_ubuntu2204_imds_v1:
5051
build:
5152
context: ./
52-
dockerfile: Dockerfile.ubuntu18.04.bats
53+
dockerfile: Dockerfile.ubuntu22.04.bats
5354
volumes:
5455
# Mount all the files so you have "hot reload" of all changes from the host
5556
- ./:/usr/local/src/bash-commons
@@ -58,12 +59,12 @@ services:
5859
# Necessary so we can run a mock EC2 metadata service on port 80 on a special IP
5960
privileged: true
6061
environment:
61-
# Signal to bash-commons module to use Instance Metadata Service version 2
62-
- GRUNTWORK_BASH_COMMONS_IMDS_VERSION=2
63-
bats_ubuntu2004_imds_v1:
62+
# Signal to bash-commons module to use Instance Metadata Service version 1
63+
- GRUNTWORK_BASH_COMMONS_IMDS_VERSION=1
64+
bats_ubuntu2204_imds_v2:
6465
build:
6566
context: ./
66-
dockerfile: Dockerfile.ubuntu20.04.bats
67+
dockerfile: Dockerfile.ubuntu22.04.bats
6768
volumes:
6869
# Mount all the files so you have "hot reload" of all changes from the host
6970
- ./:/usr/local/src/bash-commons
@@ -72,19 +73,16 @@ services:
7273
# Necessary so we can run a mock EC2 metadata service on port 80 on a special IP
7374
privileged: true
7475
environment:
75-
# Signal to bash-commons module to use Instance Metadata Service version 1
76-
- GRUNTWORK_BASH_COMMONS_IMDS_VERSION=1
77-
bats_ubuntu2004_imds_v2:
76+
# Signal to bash-commons module to use Instance Metadata Service version 2
77+
- GRUNTWORK_BASH_COMMONS_IMDS_VERSION=2
78+
bats_ubuntu2204_no_imds:
7879
build:
7980
context: ./
80-
dockerfile: Dockerfile.ubuntu20.04.bats
81+
dockerfile: Dockerfile.ubuntu22.04.bats
8182
volumes:
8283
# Mount all the files so you have "hot reload" of all changes from the host
8384
- ./:/usr/local/src/bash-commons
8485
working_dir: /usr/local/src/bash-commons
8586
command: bats test
8687
# Necessary so we can run a mock EC2 metadata service on port 80 on a special IP
8788
privileged: true
88-
environment:
89-
# Signal to bash-commons module to use Instance Metadata Service version 2
90-
- GRUNTWORK_BASH_COMMONS_IMDS_VERSION=2

0 commit comments

Comments
 (0)