Create ClusterRoleBinding and Role for alertmanager (#475) #1623
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: push | |
jobs: | |
operator-linting: | |
name: Operator Linting | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Ansible | |
run: python -m pip install 'ansible <= 2.9' | |
- name: Install operator_sdk.util dependency for Ansible role linting | |
run: ansible-galaxy collection install operator_sdk.util | |
- name: Install ansible-lint | |
run: python -m pip install 'ansible-lint < 6.0.0' | |
- name: Lint Ansible roles/servicetelemetry/ directory | |
run: ${HOME}/.local/bin/ansible-lint roles/servicetelemetry | |
stf-run-ci-linting: | |
name: stf-run-ci Linting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Ansible | |
run: python -m pip install 'ansible' | |
- name: Install ansible-lint | |
run: python -m pip install 'ansible-lint' | |
- name: Lint Ansible build/stf-run-ci directory | |
run: ${HOME}/.local/bin/ansible-lint . | |
working-directory: ./build/stf-run-ci | |
build-operator-check: | |
name: Build Operator check | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Verify image builds | |
run: docker build --tag infrawatch/service-telemetry-operator:latest --file build/Dockerfile . | |
build-bundle-check: | |
name: Build bundle check | |
runs-on: ubuntu-20.04 | |
env: | |
RELEASE_VERSION: v0.19.4 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Get operator-sdk image 0.19.4 | |
run: curl --output operator-sdk -JL https://github.com/operator-framework/operator-sdk/releases/download/$RELEASE_VERSION/operator-sdk-$RELEASE_VERSION-x86_64-linux-gnu | |
- name: Make operator-sdk executable | |
run: chmod +x operator-sdk | |
- name: Move operator-sdk binary | |
run: sudo mv operator-sdk /usr/local/bin | |
- name: Create working directory | |
run: mkdir /tmp/bundle | |
- name: Generate bundle | |
run: WORKING_DIR=/tmp/bundle ./build/generate_bundle.sh | |
- name: Verify image builds | |
run: docker build --tag infrawatch/service-telemetry-operator:latest --file build/Dockerfile . | |
check-bundle-validation-scorecard: | |
name: Validate the generated bundle and perform scorecard checks | |
runs-on: ubuntu-20.04 | |
env: | |
RELEASE_VERSION: v1.26.0 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# prepare environment to buld the bundle | |
- name: Get operator-sdk image 0.19.4 | |
run: curl --output operator-sdk -JL https://github.com/operator-framework/operator-sdk/releases/download/$RELEASE_VERSION/operator-sdk-$RELEASE_VERSION-x86_64-linux-gnu | |
env: | |
RELEASE_VERSION: v0.19.4 | |
- name: Make operator-sdk executable | |
run: chmod +x operator-sdk | |
- name: Move operator-sdk binary | |
run: sudo mv operator-sdk /usr/local/bin | |
- name: Create working directory | |
run: mkdir /tmp/bundle | |
# generate the bundle using operator-sdk-0.19.4 | |
- name: Generate bundle | |
run: WORKING_DIR=/tmp/bundle ./build/generate_bundle.sh | |
# prepare the environment to run bundle validation and bundle scorecard checks | |
- name: Get operator-sdk image 1.26.0 | |
run: curl --output operator-sdk-$RELEASE_VERSION -JL https://github.com/operator-framework/operator-sdk/releases/download/$RELEASE_VERSION/operator-sdk_linux_amd64 | |
- name: Make operator-sdk executable | |
run: chmod +x operator-sdk-$RELEASE_VERSION | |
- name: Move operator-sdk binary | |
run: sudo mv operator-sdk-$RELEASE_VERSION /usr/local/bin | |
# perform bundle validation | |
- name: Check bundle validation | |
run: operator-sdk-$RELEASE_VERSION bundle validate --verbose /tmp/bundle | |
- name: Create KinD cluster to execute scorecard tests | |
uses: helm/kind-action@v1.4.0 | |
# perform scorecard checks against a KinD cluster | |
- name: Check scorecord validation | |
run: operator-sdk-$RELEASE_VERSION scorecard --verbose /tmp/bundle |