Skip to content

Commit

Permalink
[zuul] Add in base job for testing with zuul
Browse files Browse the repository at this point in the history
  • Loading branch information
elfiesmelfie committed Jun 2, 2023
1 parent 13370ad commit 0683b75
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 1 deletion.
56 changes: 55 additions & 1 deletion .zuul.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,60 @@
---
- job:
name: stf-base
# defined in: https://review.rdoproject.org/cgit/config/tree/zuul.d/_jobs-crc.yaml
parent: base-simple-crc
# need to set cluster-monitoring
abstract: true
description: |
Create a CRC instance that's configured for STF
# irrelevant-files
roles: # adds in dependent roles i.e. put it in the role path
- zuul: github.com/openstack-k8s-operators/ci-framework
# These are the additional repos that zuul will clone
required-projects:
- openstack-k8s-operators/ci-framework
# requires: # defines a resource that needs to be available e.g. a content-provide job will provide a resource
# dependencies: # list a job that needs to run successfully for this one
#
nodeset: centos-9-crc-xxl
vars:
# vars for base-simple-crc
crc_config_cluster_monitoring: true
# crc_parameters: # Pass vars to crc cli https://review.rdoproject.org/cgit/config/tree/playbooks/crc/simple-start.yaml#n30

# need a base job here, for now to request the specific versions of OCP

# content provider job that provides stf-15.
# MIGHT need OCP

# all jobs would depend on a combo of the stf and ocp content providers

# this is the one to use
- job:
name: stf-crc-latest
parent: stf-base
description: |
Build, deploy and test STF
pre-run:
- ci/prepare.yml
run:
- ci/build_stf.yml
- ci/deploy_stf.yml
- ci/test_stf.yml

#stf-1.5-ocp-4.10
# parent: stf-base
# dependencies: [make-ocp-4.10]
# requires:
# - "ocp-4.10"
#
#stf-1.5-ocp-4.12
# parent: stf-base
#stf-1.5-ocp-pre-release
# parent: stf-base

- project:
name: infrawatch/service-telemetry-operator
github-check:
jobs:
- noop
- stf-crc-latest
14 changes: 14 additions & 0 deletions ci/build_stf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
hosts: controller
tasks:
- name: "Build STF containers"
when: build_stf | default(True)
ansible.builtin.import_role:
name: build/stf-run-ci
vars:
__deploy_stf: false
__local_build_enabled: true
__service_telemetry_snmptraps_enabled: "true"
__service_telemetry_storage_ephemeral_enabled": "true"
__working_branch: master

8 changes: 8 additions & 0 deletions ci/deploy_stf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- hosts: controller
tasks:
- name: "Deploy STF object"
ansible.builtin.shell:
cmd: |
OCP_PROJECT=service-telemetry VALIDATION_SCOPE=use_redhat ./build/validate_deployment.sh
chdir: "{{ ansible_user_dir }}/src/github.com/infrawatch/service-telemetry-operator/"
13 changes: 13 additions & 0 deletions ci/prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- hosts: controller
tasks:
#- name: Clone upstream

- name: Log into the cluster
ansible.builtin.import_role:
name: rhol_crc
tasks_from: add_crc_creds.yml
- name: Create project
shell:
cmd: |
oc new-project service-telemetry
8 changes: 8 additions & 0 deletions ci/test_stf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- hosts: controller
tasks:
- name: "Run STF smoketests"
ansible.builtin.shell:
cmd: |
OCP_PROJECT=${namespace} ./tests/smoketest/smoketest.sh
chdir: "{{ ansible_user_dir }}/src/github.com/infrawatch/service-telemetry-operator/"

0 comments on commit 0683b75

Please sign in to comment.