Skip to content

Commit 14c9821

Browse files
author
Alan Christie
committed
build: Attempt to fix CI build errors
1 parent 8b2f81f commit 14c9821

File tree

13 files changed

+54
-46
lines changed

13 files changed

+54
-46
lines changed

.github/workflows/build-latest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
python-version: '3.10'
3737
- name: Install dependencies
3838
run: |
39-
python -m pip install --upgrade pip
39+
pip install --upgrade pip
4040
pip install -r build-requirements.txt
4141
pip install -r requirements.txt
4242
ansible-galaxy install -r requirements.yaml

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
python-version: '3.10'
3939
- name: Install dependencies
4040
run: |
41-
python -m pip install --upgrade pip
41+
pip install --upgrade pip
4242
pip install -r build-requirements.txt
4343
pip install -r requirements.txt
4444
ansible-galaxy install -r requirements.yaml

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
minimum_pre_commit_version: 2.18.1
2+
minimum_pre_commit_version: 3.3.3
33

44
repos:
55

@@ -8,7 +8,7 @@ repos:
88

99
# Conventional Commit message checker (commitizen)
1010
- repo: https://github.com/commitizen-tools/commitizen
11-
rev: v2.23.0
11+
rev: v3.5.3
1212
hooks:
1313
- id: commitizen
1414
stages:
@@ -19,7 +19,7 @@ repos:
1919

2020
# Standard pre-commit rules
2121
- repo: https://github.com/pre-commit/pre-commit-hooks
22-
rev: v4.1.0
22+
rev: v4.4.0
2323
hooks:
2424
- id: check-case-conflict
2525
- id: check-docstring-first
@@ -32,21 +32,21 @@ repos:
3232
- --markdown-linebreak-ext=md
3333
# Black (uncompromising) Python code formatter
3434
- repo: https://github.com/psf/black
35-
rev: 22.3.0
35+
rev: 23.7.0
3636
hooks:
3737
- id: black
3838
args:
3939
- --target-version
4040
- py39
4141
# MyPy
4242
- repo: https://github.com/pre-commit/mirrors-mypy
43-
rev: v0.942
43+
rev: v1.4.1
4444
hooks:
4545
- id: mypy
4646
files: ^operator
4747
# Pylint
4848
- repo: https://github.com/pycqa/pylint
49-
rev: v2.13.5
49+
rev: v2.17.4
5050
hooks:
5151
- id: pylint
5252
files: ^operator
@@ -57,7 +57,7 @@ repos:
5757
# All files that end '.yaml' or '.yaml.j2'
5858
# See https://pre-commit.com/#filtering-files-with-types
5959
- repo: https://github.com/adrienverge/yamllint
60-
rev: v1.26.3
60+
rev: v1.32.0
6161
hooks:
6262
- id: yamllint
6363
types:

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,19 @@ current health of your clone with: -
5858
pre-commit run --all-files
5959

6060
## Building the operator (local development)
61+
Pre-requisites: -
62+
63+
- Docker Compose (v2)
64+
6165
The operator container, residing in the `operator` directory,
6266
is automatically built and pushed to Docker Hub using GitHub Actions.
6367

6468
You can build and push the image yourself using docker-compose.
6569
The following will build an operator image with the tag `19.2.0-alpha.1`: -
6670

6771
export IMAGE_TAG=19.2.0-alpha.1
68-
docker-compose build
69-
docker-compose push
72+
docker compose build
73+
docker compose push
7074

7175
## Deploying into the Data Manager API
7276
We use [Ansible] 3 and community modules in [Ansible Galaxy] as the deployment

build-requirements.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
ansible-lint == 6.0.2
2-
black == 22.3.0
3-
mypy == 0.942
4-
pre-commit == 2.18.1
5-
pylint == 2.13.5
6-
yamllint == 1.26.3
1+
ansible-lint == 6.17.2
2+
black == 23.7.0
3+
mypy == 1.4.1
4+
pre-commit == 3.3.3
5+
pylint == 2.17.4
6+
yamllint == 1.32.0

docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#
1414
# i.e.: -
1515
#
16-
# IMAGE_TAG=19.3.0-alpha.1 docker-compose build
17-
# IMAGE_TAG=19.3.0-alpha.1 docker-compose push
16+
# IMAGE_TAG=19.3.0-alpha.1 docker compose build
17+
# IMAGE_TAG=19.3.0-alpha.1 docker compose push
1818

1919
version: '3.8'
2020

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
ansible == 4.10.0
2-
docker-compose == 1.29.2
1+
ansible == 8.2.0
32
openshift == 0.13.1

roles/operator/tasks/dm.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
# A ply to deploy objects to the chosen Data Manager namespace.
44
# In this case it's a Role and RoleBinding
55

6-
- include_tasks: prep.yaml
6+
- name: Prep
7+
ansible.builtin.include_tasks: prep.yaml
78

89
# Check the Data Manager Namespace and Service Account exists...
910

1011
- name: Deploy DataManager RBAC objects
12+
module_defaults:
13+
group/k8s:
14+
kubeconfig: "{{ jo_kubeconfig }}"
1115
block:
1216

1317
- name: Get Data Manager Namespace ({{ jo_dmapi_namespace }})
@@ -17,7 +21,7 @@
1721
register: ns_result
1822

1923
- name: Assert Namespace ({{ jo_dmapi_namespace }})
20-
assert:
24+
ansible.builtin.assert:
2125
that:
2226
- ns_result.resources|length == 1
2327

@@ -29,7 +33,7 @@
2933
register: sa_result
3034

3135
- name: Assert ServiceAccount
32-
assert:
36+
ansible.builtin.assert:
3337
that:
3438
- sa_result.resources|length == 1
3539

@@ -40,7 +44,3 @@
4044
loop:
4145
- rbac-data-manager
4246
- configmap-data-manager
43-
44-
module_defaults:
45-
group/k8s:
46-
kubeconfig: "{{ jo_kubeconfig }}"

roles/operator/tasks/main.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
---
22

3-
- include_tasks: prep.yaml
3+
- name: Prep
4+
ansible.builtin.include_tasks: prep.yaml
45

56
- name: Assert operator version defined
6-
assert:
7+
ansible.builtin.assert:
78
that:
89
- jo_image_tag|length > 0
910
- jo_image_tag != 'SetMe'
1011

1112
- name: Deploy using Kubernetes config
13+
module_defaults:
14+
group/k8s:
15+
kubeconfig: "{{ jo_kubeconfig }}"
1216
block:
1317

14-
- include_tasks: deploy.yaml
18+
- name: Deploy
19+
ansible.builtin.include_tasks: deploy.yaml
1520
when: jo_state|string == 'present'
16-
- include_tasks: undeploy.yaml
21+
- name: Undeploy
22+
ansible.builtin.include_tasks: undeploy.yaml
1723
when: jo_state|string == 'absent'
18-
19-
module_defaults:
20-
group/k8s:
21-
kubeconfig: "{{ jo_kubeconfig }}"

roles/operator/tasks/prep.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44

55
# Expose ansible version
66
- name: Display Ansible version
7-
debug:
7+
ansible.builtin.debug:
88
var: ansible_version.full
99

1010
# Expose all the installed Python modules...
1111

1212
- name: Capture pip freeze
13-
command: pip freeze
13+
ansible.builtin.command: pip freeze
1414
register: freeze
1515
changed_when: false
1616

1717
- name: Display pip freeze
18-
debug:
18+
ansible.builtin.debug:
1919
var: freeze.stdout_lines
2020

2121
- name: Assert kubeconfig defined
22-
assert:
22+
ansible.builtin.assert:
2323
that:
2424
- jo_kubeconfig|length > 0
2525
- jo_kubeconfig != 'SetMe'

0 commit comments

Comments
 (0)