Skip to content

Commit 3ef0ad0

Browse files
Add 3.2.0 facades and update versioning. (#874)
1 parent 23380f5 commit 3ef0ad0

17 files changed

Lines changed: 54444 additions & 486 deletions

.github/workflows/test.yaml

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ jobs:
1212
- "3.9"
1313
- "3.10"
1414
steps:
15-
- name: Check out code
16-
uses: actions/checkout@v3
17-
- name: Setup Python
18-
uses: actions/setup-python@v4
19-
with:
20-
python-version: ${{ matrix.python }}
21-
- name: Install dependencies
22-
run: pip install tox
23-
- name: Run linter
24-
run: tox -e lint
15+
- name: Check out code
16+
uses: actions/checkout@v3
17+
- name: Setup Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: ${{ matrix.python }}
21+
- name: Install dependencies
22+
run: pip install tox
23+
- name: Run linter
24+
run: tox -e lint
2525

2626
unit-tests:
2727
needs: lint
@@ -33,17 +33,17 @@ jobs:
3333
- "3.9"
3434
- "3.10"
3535
steps:
36-
- name: Check out code
37-
uses: actions/checkout@v3
38-
- name: Setup Python
39-
uses: actions/setup-python@v4
40-
with:
41-
python-version: ${{ matrix.python }}
42-
- name: Install dependencies
43-
run: pip install tox
44-
- name: Run unit tests
45-
run: tox -e py3
46-
36+
- name: Check out code
37+
uses: actions/checkout@v3
38+
- name: Setup Python
39+
uses: actions/setup-python@v4
40+
with:
41+
python-version: ${{ matrix.python }}
42+
- name: Install dependencies
43+
run: pip install tox
44+
- name: Run unit tests
45+
run: tox -e py3
46+
4747
integration:
4848
name: Integration
4949
needs: [lint, unit-tests]
@@ -52,52 +52,52 @@ jobs:
5252
strategy:
5353
matrix:
5454
python:
55-
# We will reduce the workload to 3.10 to
55+
# We will reduce the workload to 3.10 to
5656
# save some resources for now.
5757
# - "3.9"
5858
- "3.10"
5959
steps:
60-
- name: Check out code
61-
uses: actions/checkout@v3
62-
- name: Setup operator environment
63-
uses: charmed-kubernetes/actions-operator@main
64-
with:
65-
provider: lxd
66-
juju-channel: 3.1/stable
67-
# 2023-01-11 Commented until we discover a
68-
# clear approach for this.
69-
# - name: Set proxy in controller
70-
# run: |
71-
# set -euxo pipefail
72-
# # build a squid config file
73-
# CONTROLLER_IP=$(juju list-controllers --format yaml | yq '.controllers[.current-controller].recent-server' | awk -F '[:]' '{print $1}');
74-
# echo "Controller IP is: $CONTROLLER_IP"
75-
# PROXY=$CONTROLLER_IP:3128
76-
# echo "Proxy address is: $PROXY"
77-
# echo "acl all src all" > squid.conf
78-
# echo "http_access allow all" >> squid.conf
79-
# echo "http_port $PROXY" >> squid.conf
80-
# cat squid.conf
81-
# # copy to the controller and reconfigure it
82-
# juju status -m controller
83-
# juju switch controller
84-
# juju ssh 0 "sudo apt-get install squid -y"
85-
# juju scp squid.conf 0:/tmp/squid.conf
86-
# juju ssh 0 "sudo mv /tmp/squid.conf /etc/squid/squid.conf"
87-
# juju ssh 0 "sudo squid -k reconfigure"
88-
# # Test curl after waiting
89-
# sleep 10
90-
# echo "Test proxy access"
91-
# curl -s -o /dev/null -w "%{http_code}" --proxy http://$PROXY https://charmhub.io
92-
# # set model defaults
93-
# juju model-defaults apt-http-proxy=$PROXY apt-https-proxy=$PROXY juju-http-proxy=$PROXY juju-https-proxy=$PROXY snap-http-proxy=$PROXY snap-https-proxy=$PROXY
94-
# juju model-defaults
95-
- name: Setup Python
96-
uses: actions/setup-python@v4
97-
with:
98-
python-version: ${{ matrix.python }}
99-
- name: Install dependencies
100-
run: pip install tox
101-
- name: Run integration
102-
# Force one single concurrent test
103-
run: tox -e integration -- -n 1
60+
- name: Check out code
61+
uses: actions/checkout@v3
62+
- name: Setup operator environment
63+
uses: charmed-kubernetes/actions-operator@main
64+
with:
65+
provider: lxd
66+
juju-channel: 3.2/stable
67+
# 2023-01-11 Commented until we discover a
68+
# clear approach for this.
69+
# - name: Set proxy in controller
70+
# run: |
71+
# set -euxo pipefail
72+
# # build a squid config file
73+
# CONTROLLER_IP=$(juju list-controllers --format yaml | yq '.controllers[.current-controller].recent-server' | awk -F '[:]' '{print $1}');
74+
# echo "Controller IP is: $CONTROLLER_IP"
75+
# PROXY=$CONTROLLER_IP:3128
76+
# echo "Proxy address is: $PROXY"
77+
# echo "acl all src all" > squid.conf
78+
# echo "http_access allow all" >> squid.conf
79+
# echo "http_port $PROXY" >> squid.conf
80+
# cat squid.conf
81+
# # copy to the controller and reconfigure it
82+
# juju status -m controller
83+
# juju switch controller
84+
# juju ssh 0 "sudo apt-get install squid -y"
85+
# juju scp squid.conf 0:/tmp/squid.conf
86+
# juju ssh 0 "sudo mv /tmp/squid.conf /etc/squid/squid.conf"
87+
# juju ssh 0 "sudo squid -k reconfigure"
88+
# # Test curl after waiting
89+
# sleep 10
90+
# echo "Test proxy access"
91+
# curl -s -o /dev/null -w "%{http_code}" --proxy http://$PROXY https://charmhub.io
92+
# # set model defaults
93+
# juju model-defaults apt-http-proxy=$PROXY apt-https-proxy=$PROXY juju-http-proxy=$PROXY juju-https-proxy=$PROXY snap-http-proxy=$PROXY snap-https-proxy=$PROXY
94+
# juju model-defaults
95+
- name: Setup Python
96+
uses: actions/setup-python@v4
97+
with:
98+
python-version: ${{ matrix.python }}
99+
- name: Install dependencies
100+
run: pip install tox
101+
- name: Run integration
102+
# Force one single concurrent test
103+
run: tox -e integration -- -n 1

.github/workflows/test_candidate.yaml

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Nightly release candidate testing
22

33
on:
44
schedule:
5-
- cron: "0 0 * * *" # Run at 12AM UTC, every day
5+
- cron: "0 0 * * *" # Run at 12AM UTC, every day
66

77
jobs:
88
candidate-integration:
@@ -16,60 +16,60 @@ jobs:
1616
- "3.9"
1717
- "3.10"
1818
steps:
19-
- name: Download artifact from previous workflow
20-
id: download_artifact
21-
uses: dawidd6/action-download-artifact@v2
22-
with:
23-
workflow_conclusion: success
24-
name: juju-last-candidate-version
25-
if_no_artifact_found: ignore
26-
- name: Check if there is a new candidate
27-
shell: bash
28-
run: |
29-
candidate=$(snap info juju | grep 3.1/candidate | awk '{print $2}')
30-
last_tested=NA
31-
if [ -f juju-last-candidate-version ]; then
32-
last_tested=$(cat juju-last-candidate-version)
33-
fi
34-
echo "Last tested was $last_tested"
35-
echo "Latest juju version found is $candidate"
36-
next_test=NA
37-
if [[ "$candidate" == "^" ]]; then
38-
echo "No candidate to test"
39-
else
40-
if [[ "$candidate" == "$last_tested" ]]; then
41-
echo "Candidate $candidate was already tested"
19+
- name: Download artifact from previous workflow
20+
id: download_artifact
21+
uses: dawidd6/action-download-artifact@v2
22+
with:
23+
workflow_conclusion: success
24+
name: juju-last-candidate-version
25+
if_no_artifact_found: ignore
26+
- name: Check if there is a new candidate
27+
shell: bash
28+
run: |
29+
candidate=$(snap info juju | grep 3.1/candidate | awk '{print $2}')
30+
last_tested=NA
31+
if [ -f juju-last-candidate-version ]; then
32+
last_tested=$(cat juju-last-candidate-version)
33+
fi
34+
echo "Last tested was $last_tested"
35+
echo "Latest juju version found is $candidate"
36+
next_test=NA
37+
if [[ "$candidate" == "^" ]]; then
38+
echo "No candidate to test"
4239
else
43-
echo "Candidate $candidate has to be tested"
44-
next_test="$candidate"
45-
fi
46-
fi
47-
echo "next-test=$next_test" >> $GITHUB_ENV
48-
echo "$next_test" > ~/juju-last-candidate-version
49-
- name: Check out code
50-
uses: actions/checkout@v3
51-
if: ${{ env.next-test != 'NA' }}
52-
- name: Setup operator environment
53-
if: ${{ env.next-test != 'NA' }}
54-
uses: charmed-kubernetes/actions-operator@main
55-
with:
56-
provider: lxd
57-
juju-channel: 3.1/candidate
58-
- name: Setup Python
59-
if: ${{ env.next-test != 'NA' }}
60-
uses: actions/setup-python@v4
61-
with:
62-
python-version: ${{ matrix.python }}
63-
- name: Install dependencies
64-
if: ${{ env.next-test != 'NA' }}
65-
run: pip install tox
66-
- name: Run integration
67-
if: ${{ env.next-test != 'NA' }}
68-
# Force one single concurrent test
69-
run: tox -e integration -- -n 1
70-
- name: Upload artifact
71-
if: ${{ env.next-test != 'NA' }}
72-
uses: actions/upload-artifact@v3
73-
with:
74-
name: juju-last-candidate-version
75-
path: ~/juju-last-candidate-version
40+
if [[ "$candidate" == "$last_tested" ]]; then
41+
echo "Candidate $candidate was already tested"
42+
else
43+
echo "Candidate $candidate has to be tested"
44+
next_test="$candidate"
45+
fi
46+
fi
47+
echo "next-test=$next_test" >> $GITHUB_ENV
48+
echo "$next_test" > ~/juju-last-candidate-version
49+
- name: Check out code
50+
uses: actions/checkout@v3
51+
if: ${{ env.next-test != 'NA' }}
52+
- name: Setup operator environment
53+
if: ${{ env.next-test != 'NA' }}
54+
uses: charmed-kubernetes/actions-operator@main
55+
with:
56+
provider: lxd
57+
juju-channel: 3.2/candidate
58+
- name: Setup Python
59+
if: ${{ env.next-test != 'NA' }}
60+
uses: actions/setup-python@v4
61+
with:
62+
python-version: ${{ matrix.python }}
63+
- name: Install dependencies
64+
if: ${{ env.next-test != 'NA' }}
65+
run: pip install tox
66+
- name: Run integration
67+
if: ${{ env.next-test != 'NA' }}
68+
# Force one single concurrent test
69+
run: tox -e integration -- -n 1
70+
- name: Upload artifact
71+
if: ${{ env.next-test != 'NA' }}
72+
uses: actions/upload-artifact@v3
73+
with:
74+
name: juju-last-candidate-version
75+
path: ~/juju-last-candidate-version

0 commit comments

Comments
 (0)