Skip to content

[stf-run-ci][create_catalog] Default package name in local build only #2596

[stf-run-ci][create_catalog] Default package name in local build only

[stf-run-ci][create_catalog] Default package name in local build only #2596

Workflow file for this run

name: CI
on: push
jobs:
operator-linting:
name: Operator Linting
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/[email protected]
- 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/[email protected]
- 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
generate-bundle-diff-check:
name: Check if generating the bundle would result in local changes
runs-on: ubuntu-latest
env:
RELEASE_VERSION: v0.19.4
steps:
- name: Checkout code
uses: actions/[email protected]
- 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: Generate bundle locally
run: operator-sdk generate bundle --manifests --metadata --default-channel unstable --channels unstable
- name: Check if bundle generation results in local changes
run: git diff --exit-code
build-operator-check:
name: Build Operator check
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/[email protected]
- 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/[email protected]
- 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/[email protected]
# 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/[email protected]
# perform scorecard checks against a KinD cluster
- name: Check scorecord validation
run: operator-sdk-$RELEASE_VERSION scorecard --verbose /tmp/bundle