Skip to content

Commit ede8083

Browse files
authored
Install j2cli with apt (#436)
1 parent f8ae265 commit ede8083

File tree

12 files changed

+27
-36
lines changed

12 files changed

+27
-36
lines changed

.github/actions/create-local-test-infra-resources/action.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ runs:
2828
steps:
2929
- name: Create `local-test-infra` OpenShift resources
3030
run: |
31+
python3 -m venv .venv
32+
source .venv/bin/activate
33+
pip install --upgrade pip
34+
pip install jinjanator
35+
cp .venv/bin/jinjanate .venv/bin/j2
3136
make install
3237
working-directory: ${{ inputs.working_directory }}
3338
shell: bash

.github/actions/start-k8s-cluster/action.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ runs:
1919
working-directory: ${{ inputs.working_directory }}
2020
shell: bash
2121

22-
- name: Run Bootstrap Python
23-
run: make bootstrap-python-ubuntu-local
24-
working-directory: ${{ inputs.working_directory }}
25-
shell: bash
26-
2722
- name: Start the cluster
2823
run: make rebuild-cluster
2924
working-directory: ${{ inputs.working_directory }}

.github/workflows/cnf-test-partner-image.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323
jobs:
2424
test-cnf-test-partner-image:
2525
name: 'Build and test the `cnf-test-partner` image'
26-
runs-on: ubuntu-22.04
26+
runs-on: ubuntu-24.04
2727

2828
steps:
2929
- uses: actions/checkout@v4
@@ -45,7 +45,7 @@ jobs:
4545
if: ${{ github.ref == 'refs/heads/main' }}
4646
name: 'Push the new `cnf-test-partner` image to Quay.io'
4747
needs: test-cnf-test-partner-image
48-
runs-on: ubuntu-22.04
48+
runs-on: ubuntu-24.04
4949

5050
steps:
5151
- name: Checkout the main branch

.github/workflows/debug-partner-image.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
jobs:
2525
test-debug-partner-image:
2626
name: 'Build and test the `debug-partner` image'
27-
runs-on: ubuntu-22.04
27+
runs-on: ubuntu-24.04
2828

2929
steps:
3030
- uses: actions/checkout@v4

.github/workflows/local-test-infra.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defaults:
77
jobs:
88
shellcheck:
99
name: Shellcheck
10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111
steps:
1212
- uses: actions/checkout@v4
1313
- name: Run ShellCheck
@@ -17,7 +17,7 @@ jobs:
1717
severity: error
1818
test-local-test-infra:
1919
name: 'Test the `local-test-infra` configuration on k8s cluster'
20-
runs-on: ubuntu-22.04
20+
runs-on: ubuntu-24.04
2121
env:
2222
TNF_NAMESPACE: tnf
2323
PUT_CONTAINER_NAME: test

.github/workflows/pre-main.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
SMOKE_TESTS_LABELS_FILTER: all
2525
jobs:
2626
linters:
27-
runs-on: ubuntu-22.04
27+
runs-on: ubuntu-24.04
2828
steps:
2929
- uses: actions/checkout@v4
3030
- uses: hadolint/[email protected]
@@ -59,7 +59,7 @@ jobs:
5959
level: warning
6060
smoke-tests:
6161
name: Run Smoke Tests
62-
runs-on: ubuntu-22.04
62+
runs-on: ubuntu-24.04
6363
env:
6464
SHELL: /bin/bash
6565
KUBECONFIG: '/home/runner/.kube/config'
@@ -69,6 +69,12 @@ jobs:
6969
# Restart docker using /mnt/docker-storage (sdb) instead of /var/lib/docker (sda).
7070
# This step needs to be done right after the partner repo's bootstrap scripts, as they
7171
# overwrite the docker's daemon.json.
72+
- name: Create docker/daemon.json if it does not exist
73+
run: |
74+
if [ ! -f /etc/docker/daemon.json ]; then
75+
echo '{}' | sudo tee /etc/docker/daemon.json
76+
fi
77+
7278
- name: Make docker to use /mnt (sdb) for storage
7379
run: |
7480
df -h

.github/workflows/preflight.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name: Preflight
99

1010
jobs:
1111
preflight-debug-partner:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
env:
1414
SHELL: /bin/bash
1515
IMAGE_NAME: quay.io/testnetworkfunction/debug-partner:latest
@@ -50,7 +50,7 @@ jobs:
5050
5151
5252
preflight-cnf-test-partner:
53-
runs-on: ubuntu-22.04
53+
runs-on: ubuntu-24.04
5454
env:
5555
SHELL: /bin/bash
5656
IMAGE_NAME: quay.io/testnetworkfunction/cnf-test-partner:latest

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ bootstrap-docker-fedora-local:
4343
bootstrap-docker-ubuntu-local:
4444
cd config/vagrant/scripts && ./bootstrap-docker-ubuntu.sh
4545

46-
# Bootstrap Python (Ubuntu)
47-
bootstrap-python-ubuntu-local:
48-
cd config/vagrant/scripts && ./bootstrap-python-ubuntu.sh
49-
50-
# Bootstrap Python (Fedora)
51-
bootstrap-python-fedora-local:
52-
cd config/vagrant/scripts && ./bootstrap-python-fedora.sh
53-
5446
# Bootstrap Golang (Fedora)
5547
bootstrap-golang-fedora-local:
5648
cd config/vagrant/scripts && ./bootstrap-golang-fedora.sh

config/vagrant/scripts/bootstrap-docker-fedora.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ sudo dnf -y install docker-ce docker-ce-cli containerd.io jq
2525

2626
# Configure IPv6 in docker ( https://docs.docker.com/config/daemon/ipv6/ )
2727
sudo mkdir /etc/docker
28+
29+
# Create the daemon.json file if it does not exist
30+
sudo touch -a /etc/docker/daemon.json
31+
2832
sudo bash -c 'cat <<- EOF > /etc/docker/daemon.json
2933
{
3034
"ipv6": true,

config/vagrant/scripts/bootstrap-docker-ubuntu.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env bash
22

3+
# create the docker daemon json file if it does not exist
4+
sudo touch -a /etc/docker/daemon.json
5+
36
# update docker config to include ipv6 support
47
jq '. +={"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64"}' /etc/docker/daemon.json > /tmp/new-docker-daemon.json
58
sudo cp /tmp/new-docker-daemon.json /etc/docker/daemon.json

0 commit comments

Comments
 (0)