From b0b55b279d510f4ccfe839752b346a29c6aa48d1 Mon Sep 17 00:00:00 2001 From: bevicted <170766675+bevicted@users.noreply.github.com> Date: Mon, 24 Aug 2026 12:15:28 +0200 Subject: [PATCH 1/5] ci: add GitHub Actions workflow Signed-off-by: bevicted <170766675+bevicted@users.noreply.github.com> --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ Makefile | 9 ++------- 2 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..04ace722 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + ci: + name: CI + runs-on: ubuntu-24.04 + timeout-minutes: 45 + + steps: + - name: Check out repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Set up Go + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version: 1.17.13 + cache: true + + - name: Lint + run: make lint + + - name: Run unit tests + run: make test-unit + + - name: Validate release artifacts + run: make validate-release RELEASE_VERSION=1000.0.0 diff --git a/Makefile b/Makefile index 3883617b..fd722be1 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ KUBEVAL_KUBE_VERSION=1.18.1 # Set PATH to pick up cached tools. The additional 'sed' is required for cross-platform support of quoting the args to 'env' SHELL := /usr/bin/env PATH=$(shell echo ${PWD}/cache/bin:${KUBEBUILDER_ASSETS}:${PATH} | sed 's/ /\\ /g') bash -# Version to create release. Value is set in .travis.yml's release job +# Version to create release. Value is set by the release job RELEASE_VERSION ?= 0.0.0 # Image URL to use all building/pushing image targets IMG ?= cloudoperators/ibmcloud-operator:${RELEASE_VERSION} @@ -17,11 +17,7 @@ IMG ?= cloudoperators/ibmcloud-operator:${RELEASE_VERSION} CRD_OPTIONS ?= "crd" # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) -ifeq (,$(shell go env GOBIN)) -GOBIN=$(shell go env GOPATH)/bin -else -GOBIN=$(shell go env GOBIN) -endif +GOBIN := $(or $(shell go env GOBIN),$(shell go env GOPATH)/bin) .PHONY: all all: manager @@ -140,7 +136,6 @@ lint: lint-deps golangci-lint run gosec -conf .gosec.json ./... find . -name '*.*sh' | xargs shellcheck --color - go list -json -m all | docker run --rm -i sonatypecommunity/nancy:latest sleuth .PHONY: lint-fix lint-fix: lint-deps From a78ae5283f14966586fc7d6a8b2805fd3eedf65d Mon Sep 17 00:00:00 2001 From: bevicted <170766675+bevicted@users.noreply.github.com> Date: Mon, 24 Aug 2026 12:15:40 +0200 Subject: [PATCH 2/5] chore: configure Mend Signed-off-by: bevicted <170766675+bevicted@users.noreply.github.com> --- .whitesource | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .whitesource diff --git a/.whitesource b/.whitesource new file mode 100644 index 00000000..58c90b53 --- /dev/null +++ b/.whitesource @@ -0,0 +1,3 @@ +{ + "settingsInheritedFrom": "ibm-mend-config/mend-config@main" +} From be3a4b362133df1af4799d928769ef7c90fe10cd Mon Sep 17 00:00:00 2001 From: bevicted <170766675+bevicted@users.noreply.github.com> Date: Mon, 24 Aug 2026 12:17:42 +0200 Subject: [PATCH 3/5] docs: update CI references Signed-off-by: bevicted <170766675+bevicted@users.noreply.github.com> --- Makefile | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fd722be1..c1f8015d 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ IMG ?= cloudoperators/ibmcloud-operator:${RELEASE_VERSION} # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) CRD_OPTIONS ?= "crd" -# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) +# Use the configured GOBIN, falling back to GOPATH/bin. GOBIN := $(or $(shell go env GOBIN),$(shell go env GOPATH)/bin) .PHONY: all diff --git a/README.md b/README.md index 57c03287..5dfd6923 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.com/IBM/cloud-operators.svg?branch=master)](https://travis-ci.com/IBM/cloud-operators) +[![CI](https://github.com/IBM/cloud-operators/actions/workflows/ci.yml/badge.svg)](https://github.com/IBM/cloud-operators/actions/workflows/ci.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/IBM/cloud-operators)](https://goreportcard.com/report/github.com/IBM/cloud-operators) [![Coverage Status](https://coveralls.io/repos/github/IBM/cloud-operators/badge.svg)](https://coveralls.io/github/IBM/cloud-operators) ![Docker Pulls](https://img.shields.io/docker/pulls/cloudoperators/ibmcloud-operator) From 6581945ddff75e601d8c44b67b5424f50113e1e4 Mon Sep 17 00:00:00 2001 From: bevicted <170766675+bevicted@users.noreply.github.com> Date: Mon, 24 Aug 2026 13:54:47 +0200 Subject: [PATCH 4/5] ci: fetch tags for release validation Signed-off-by: bevicted <170766675+bevicted@users.noreply.github.com> --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04ace722..9e4b0ae3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,7 @@ jobs: - name: Check out repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: + fetch-depth: 0 persist-credentials: false - name: Set up Go From ad7b58b9d2d8001c540a5d13bad14835c4e5a069 Mon Sep 17 00:00:00 2001 From: bevicted <170766675+bevicted@users.noreply.github.com> Date: Mon, 24 Aug 2026 13:56:59 +0200 Subject: [PATCH 5/5] fmt Signed-off-by: bevicted <170766675+bevicted@users.noreply.github.com> --- config/manager/kustomization.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 95c23ca9..03d6cba3 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,8 +1,8 @@ resources: -- manager.yaml + - manager.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: -- name: controller - newName: cloudoperators/ibmcloud-operator - newTag: 1.0.0 + - name: controller + newName: cloudoperators/ibmcloud-operator + newTag: 1.0.0