Skip to content
Merged
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
18 changes: 14 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
env:
global:
- RELEASE_VERSION: v0.17.2
- secure: MeO4V6CHY8GjebH1n3sTYtq5AG/ohY4MgKr4pDb0P29DxpAtYaqa+lkVBB3lxXGcsE2yY8bEOmHHzA6CQgYpWGHOGihKJbL40HQdQGAajtCStSQcv+AVA4Dq5uwo714Ddx7wovntJbm+zO+Cyv2zczj6407fTvuyJAjf9MMrCkwC23tLr+iCld+juSQlfOtdExzgIegWEhi3z967i9ce70ux4jl9n3jHXaU/6A/o6gJS/Ng5INf8VJ0ZZKnCUwdHYOshjzQAbC+ym24W4oGQTdyJbVAIbxdJMl65VI/h3xcTeS8PJXw9PK9lTS7r7RUDdl8giLTk67TgpYFE/LhuYiq+zAH/5iZSD/Mr0tyblHlpqB9gzDUs2G00IYv7l/RD+BFwReZAXxR9xO2Rsxumtsf+mKm2iu6BkbuzNTudyR2vn4dMGp1lwWwY44ll22nMaek2fjNhgQwB6Ps0xU19NrwpiS7AdyYnYGi9Cg8n59XT5ydwL83jITDk43tZd0IZjX6TcssshqQBzCeXovyzD3O4PsfkBkPer5xoRJ0e/qLLFkQxrv4YNtqxtNzzX9Z3dpYhV0s1sw+ydLTz4/HIMu9tFLkV8F4Zf8r5Yd8NSSKV1E+o8QIXRPATxpJ2OlwG2PiCl7BgYihx8TWXtjnSLDPVJHofw/XAS391DikixRk=
- secure: IZqzqdEL37CHF3NWEx3jNegfrl9092wpWWezEY4oEVNY1ncUUbZdmzq97gTLtOZ/5lkvm9yMOXZzM20NAl898U8jXp8oj1rX+JowXrXNG7celNIiwag+R9uELOwhSwPkLBF/swmdWf4gErTmFpxIJCERGV9aIuodXd5Wie7U45qn6OExVVp6U4S0VeucOH/SIDDk7V5k4Aaw4MTfNy9Dq6SgMkIxhMhro3Ghxz0NqrZf9BXnrWMxqVIhene7fYrmOvbi1vRrEhgoIROn8mNHD/92sIBEGTQ774lOsX7IMAzXZBH6XeuSLhnH6EZRq0us/evc9c1h8NAIbo4id8x3D4olGWge04PbBoR5hegQLJR4r8Wi0oqGEmiVHb5Uunr1OAjgD9n/ZekeYiUIrt1CLhhNjlTOr4+JW0Ny6X26HuouOG+cIRfKIDtFQjisMLUHgRSFBEqMHrd1ROzekBCFk7MnfSMUq55z176BTnQgGqp+2PFZHI8/Lbh2LhkBfQ477BHieT27nZUbMV3KMyQzrR8SJFTa1p19hqf4Dx9PE1CRe5OzrpzOtYiKwk0RRNKHvrkooPzaojMft0Gj1snweAC4Gipzqs//aTNRZA2jR7RIGsmZsGW+RxDesFyckgCqB0p2kBup/9AnPvS6hLSQQA4BqE4T51UHELi0/Ar/pHA=

os: linux
language: python

services:
- docker

git:
depth: 1

before_install:
- curl --output operator-sdk -JL https://github.com/operator-framework/operator-sdk/releases/download/$RELEASE_VERSION/operator-sdk-$RELEASE_VERSION-x86_64-linux-gnu
- chmod +x operator-sdk
- sudo mv operator-sdk /usr/local/bin

install:
- pip install operator-courier==2.1.7
- pip install ansible-lint

script:
- operator-courier verify --ui_validate_io deploy/olm-catalog/smart-gateway-operator
- ansible-lint roles/smartgateway/
after_success:
- if [ "$TRAVIS_TAG" == "" ]; then echo "Not a tagged release, skipping after_success.sh"; else ./build/travis/after_success.sh; fi
- operator-sdk bundle validate --verbose ./deploy/olm-catalog/smart-gateway-operator
72 changes: 72 additions & 0 deletions build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Updating CSV for next bundle release

The following set of commands will allow updating the current CSV to a new
version.

## Prerequisites

You will need operator-sdk 0.17.2 (in sync with OCP 4.5).

```
curl --output operator-sdk -JL https://github.com/operator-framework/operator-sdk/releases/download/$RELEASE_VERSION/operator-sdk-$RELEASE_VERSION-x86_64-linux-gnu
chmod +x operator-sdk
mkdir -p ~/.local/bin
mv operator-sdk ~/.local/bin
```

## Creating a new release

Creating a new release requires 3 steps:

* update container image versions to deploy in `deploy/operator.yaml`
* generate a new CSV version
* create a new bundle image and push to quay.io/infrawatch-operators

### Updating container image tags

Update the `deploy/operator.yaml` file to target a new set of container image
tags. You will need to adjust the `smart-gateway-operator` version which should
align to the new CSV version. Optionally, update the related container images
for `smart-gateway`, `sg-core` and `sg-bridge` if there are new container
images that should be associated with this CSV release.

If there are any roles, role binding, or deployment adjustments for this
release, now is the time to make those changes. See files in the `deploy/`
root.

The following environment variables are used by the Operator to determine what
components to deploy into the environment. Set the container image tags
appropriately.

```
- name: SMARTGATEWAY_IMAGE
value: quay.io/infrawatch/smart-gateway:v2.0.0
- name: CORE_SMARTGATEWAY_IMAGE
value: quay.io/infrawatch/sg-core:v3.0.0
- name: BRIDGE_SMARTGATEWAY_IMAGE
value: quay.io/infrawatch/sg-bridge:v1.0.0
```

### Updating the CSV manifests

To update the CSV manifests to a new release version use `operator-sdk
generate csv` and pass the new version. The `replaces` line will be
automatically updated.

```
operator-sdk generate csv --csv-version 2.1.0
```

## Create a new bundle container image

Create a new bundle release by updating the bundle container image.

```
operator-sdk bundle create quay.io/infrawatch-operators/smart-gateway-operator-bundle:v2.1.0
```

You can validate your bundle directory with `operator-sdk bundle validate`.

```
operator-sdk bundle validate ./deploy/olm-catalog/smart-gateway-operator
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ LABEL operators.operatorframework.io.bundle.package.v1=smart-gateway-operator
LABEL operators.operatorframework.io.bundle.channels.v1=stable
LABEL operators.operatorframework.io.bundle.channel.default.v1=stable

COPY /*.yaml /manifests/
COPY /metadata/annotations.yaml /metadata/annotations.yaml
COPY deploy/olm-catalog/smart-gateway-operator/manifests /manifests/
COPY deploy/olm-catalog/smart-gateway-operator/metadata/annotations.yaml /metadata/annotations.yaml
Loading