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

🐛 Reactivate e2e tests #177

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 13 additions & 13 deletions docs/continuous-integration.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Continuous integration

Project `cluster-stacks` use the [SCS Zuul](https://zuul.scs.community) CI platform to
drive its continuous integration tests. The project is registered under the [SCS tenant](https://zuul.scs.community/t/SCS/projects)
Project `cluster-stacks` use the [SCS Zuul](https://zuul.sovereignit.cloud) CI platform to
drive its continuous integration tests. The project is registered under the [SCS tenant](https://zuul.sovereignit.cloud/t/scs/projects)
and therefore is able to use a set of pre-defined pipelines, jobs, and ansible roles that the
SCS Zuul instance defines and imports. If you want to explore currently available SCS pipelines,
visit the [SCS zuul-config](https://github.com/SovereignCloudStack/zuul-config) project.
If you want to see the full list of jobs that are available, visit the [SCS Zuul UI](https://zuul.scs.community/t/SCS/jobs).
visit the [SCS zuul-scs-jobs](https://github.com/SovereignCloudStack/zuul-scs-jobs) project.
If you want to see the full list of jobs that are available, visit the [SCS Zuul UI](https://zuul.sovereignit.cloud/t/scs/jobs).
And if you are looking for some handy ansible role that SCS Zuul imports, visit the [source](https://opendev.org/zuul/zuul-jobs/src/branch/master/roles).

Refer to the SCS [Zuul users guide](https://github.com/SovereignCloudStack/docs/blob/main/contributor-docs/operations/operations/zuul-ci-cd-quickstart-user-guide.md) and/or
Expand All @@ -23,7 +23,7 @@ of Zuul CI platform with a GitHub organization.
SCS Zuul automatically recognizes `.zuul.yaml` configuration file that is located in the
cluster-stacks's root. This file informs Zuul about the project's [default-branch](https://zuul-ci.org/docs/zuul/latest/config/project.html#attr-project.default-branch) and
preferred [merge-mode](https://zuul-ci.org/docs/zuul/latest/config/project.html#attr-project.merge-mode).
It also references [SCS Zuul pipelines](https://github.com/SovereignCloudStack/zuul-config) and
It also references [SCS Zuul pipelines](https://github.com/SovereignCloudStack/zuul-scs-jobs) and
their jobs used by the cluster-stacks project. Then, jobs link Ansible playbooks that contain
tasks for actual CI testing.

Expand All @@ -43,7 +43,7 @@ See relevant CI configuration files:

## Pipelines

This section describes an [SCS Zuul pipelines](https://github.com/SovereignCloudStack/zuul-config/blob/main/zuul.d/gh_pipelines.yaml) that are used by the cluster-stacks project.
This section describes an [SCS Zuul pipelines](https://github.com/SovereignCloudStack/zuul-scs-jobs/blob/main/zuul.d/gh_pipelines.yaml) that are used by the cluster-stacks project.

- `e2e-test`
- It is triggered by the `e2e-test` label in the opened PR
Expand Down Expand Up @@ -94,26 +94,26 @@ This section describes Zuul jobs defined within the cluster-stacks project and l
### Secrets

The parent job `openstack-access-base`, from which e2e jobs inherit, defines the secret variable `openstack-application-credential`.
This secret is stored directly in the [SCS/zuul-config repository](https://github.com/SovereignCloudStack/zuul-config/blob/main/zuul.d/secrets.yaml) in an encrypted form. It contains OpenStack application credentials to access the OpenStack project dedicated to CI testing.
This secret is stored directly in the [SCS/zuul-scs-jobs repository](https://github.com/SovereignCloudStack/zuul-scs-jobs/blob/main/zuul.d/secrets.yaml) in an encrypted form. It contains OpenStack application credentials to access the OpenStack project dedicated to CI testing.

This secret is encrypted by the SCS/zuul-config repository RSA key that has been generated by SCS Zuul instance.
This secret is encrypted by the SCS/zuul-scs-jobs repository RSA key that has been generated by SCS Zuul instance.
So only SCS Zuul instance is able to decrypt it (read the [docs](https://zuul-ci.org/docs/zuul/latest/project-config.html#encryption)).

If you want to re-generate the mentioned secret or add another one using SCS/zuul-config repository RSA key, follow the below instructions:
If you want to re-generate the mentioned secret or add another one using SCS/zuul-scs-jobs repository RSA key, follow the below instructions:

- Install zuul-client

```bash
pip install zuul-client
```

- Encrypt "super-secret" string by the SCS/zuul-config repository public key from SCS Zuul
- Encrypt "super-secret" string by the SCS/zuul-scs-jobs repository public key from SCS Zuul

```bash
echo -n "super-secret" | \
zuul-client --zuul-url https://zuul.scs.community encrypt \
--tenant SCS \
--project github.com/SovereignCloudStack/zuul-config
zuul-client --zuul-url https://zuul.sovereignit.cloud encrypt \
--tenant scs \
--project SovereignCloudStack/zuul-scs-jobs
```

### Job customization
Expand Down
13 changes: 6 additions & 7 deletions playbooks/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
- name: Ensure cluster stacks dependencies
hosts: all
vars:
kind_version: "0.22.0"
kubectl_version: "1.29.3"
clusterctl_version: "1.7.2"
helm_version: "3.14.4"
yq_version: "4.44.1"
kind_version: "0.24.0"
kubectl_version: "1.31.0"
clusterctl_version: "1.8.3"
helm_version: "3.15.4"
yq_version: "4.44.3"
envsubst_version: "1.4.2"
install_dir: "{{ ansible_user_dir }}/.local/bin"
roles: # https://opendev.org/zuul/zuul-jobs
- role: ensure-docker
- role: ensure-go
vars:
go_version: 1.21.6
go_version: 1.23.1
environment:
PATH: "{{ install_dir }}:{{ ansible_env.PATH }}"
tasks:
Expand Down Expand Up @@ -47,7 +47,6 @@
url: "https://dl.k8s.io/release/v{{ kubectl_version }}/bin/linux/amd64/kubectl"
dest: "{{ install_dir }}/kubectl"
mode: "+x"
# TODO: Install csctl and csctl-openstack from the release when it will be available
- name: Install csctl and csctl-openstack
ansible.builtin.import_tasks: tasks/csctl.yaml
- name: Install helm
Expand Down
6 changes: 3 additions & 3 deletions playbooks/openstack/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
cluster_stack_release_dir: "{{ ansible_user_dir }}/.release"
cluster_manifest_dir: "{{ ansible_user_dir }}/cluster_manifest"
cluster_stack_release_container_dir: "/.release"
openstack_csp_helper_chart_version: v0.6.0
openstack_csp_helper_chart_version: v0.7.0
openstack_csp_helper_chart_url: "https://github.com/SovereignCloudStack/openstack-csp-helper/releases/download/{{ openstack_csp_helper_chart_version }}/openstack-csp-helper.tgz"
capo_version: "v0.10.3"
capo_version: "v0.10.5"
openstackclient_version: "6.6.0"

k8s_management_name: "management"
k8s_management_version: "v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245"
k8s_management_version: "v1.31.0@sha256:53df588e04085fd41ae12de0c3fe4c72f7013bba32a20e7325357a1ac94ba865"
k8s_management_cluster_wait_for: "180"

environment:
Expand Down
4 changes: 2 additions & 2 deletions playbooks/tasks/csctl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
vars:
csctl_dir: "{{ ansible_user_dir }}/csctl"
csctl_openstack_dir: "{{ ansible_user_dir }}/csctl-openstack"
csctl_version: "0.0.3"
csctl_openstack_version: "0.0.1"
csctl_version: "0.0.4"
csctl_openstack_version: "0.0.2"
install_dir: "{{ ansible_user_dir }}/.local/bin"
block:
- name: Make sure csctl directory exists
Expand Down
2 changes: 1 addition & 1 deletion playbooks/tasks/cso.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Install CSO
vars:
cso_version: "0.1.0-alpha.5"
cso_version: "0.1.0-alpha.7"
cso_dir: "{{ ansible_user_dir }}/cso"
cso_wait_for_pods: 240
install_dir: "{{ ansible_user_dir }}/.local/bin"
Expand Down
2 changes: 1 addition & 1 deletion playbooks/tasks/cspo.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Install CSPO
vars:
cspo_version: "0.1.0-alpha.3"
cspo_version: "0.1.0-alpha.5"
cspo_dir: "{{ ansible_user_dir }}/cspo"
cspo_wait_for_pods: 240
install_dir: "{{ ansible_user_dir }}/.local/bin"
Expand Down
2 changes: 1 addition & 1 deletion playbooks/tasks/sonobouy.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Execute sonobouy check mode {{ sonobouy.mode }}
vars:
sonobuoy_version: "0.57.1"
sonobuoy_version: "0.57.2"
install_dir: "{{ ansible_user_dir }}/.local/bin"
block:
- name: Install Sonobuoy
Expand Down