diff --git a/.github/workflows/check-pull-request.yaml b/.github/workflows/check-pull-request.yaml index 336b18b4..92840323 100644 --- a/.github/workflows/check-pull-request.yaml +++ b/.github/workflows/check-pull-request.yaml @@ -30,7 +30,7 @@ jobs: uses: actions/checkout@v4 - name: Build image - run: make image + run: make docker-build unit-tests: name: Unit tests diff --git a/Containerfile b/Containerfile deleted file mode 100644 index b6cef51a..00000000 --- a/Containerfile +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 2023 Red Hat, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed under the License -# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -# or implied. See the License for the specific language governing permissions and limitations under -# the License. -# - -FROM registry.access.redhat.com/ubi9/ubi:9.2 AS builder - -# Install packages: -RUN \ - dnf install -y \ - make \ - && \ - dnf clean all - -# Currently RHEL 9 doesn't provide a Go 1.21 compiler, so we need to install it from the Go -# downloads site: -RUN \ - curl -Lo tarball https://go.dev/dl/go1.21.3.linux-amd64.tar.gz && \ - echo 1241381b2843fae5a9707eec1f8fb2ef94d827990582c7c7c32f5bdfbfd420c8 tarball | sha256sum -c && \ - tar -C /usr/local -xf tarball && \ - rm tarball - -# Run the rest of the steps with a new builder user: -RUN \ - useradd -c "Builder" builder -USER \ - builder -ENV \ - PATH="${PATH}:/usr/local/go/bin" - -# Run the rest of the steps inside the directory containing the source code of the project. Note -# that it is important to use a directory that is not the home of the user. Go will create`go/pkg` -# directory inside that home directory, and tools like `conroller-gen` get very confused and fail -# when they find the `go.mod` and `go.sum` files inside that package cache. -WORKDIR \ - /home/builder/project -COPY \ - --chown=builder:builder \ - . . - -# Build the binary: -RUN \ - make binary - -FROM registry.access.redhat.com/ubi9-minimal:9.2 AS runtime - -# Install the binary: -COPY \ - --from=builder \ - /home/builder/project/oran-o2ims /usr/bin/oran-o2ims - -# We need to explictly run the servers a a non-root user, otherwise if the container is in a pod -# with `runAsNonRoot: true` in the security context it will fail to start. In addition the user -# needs to be specified numerically, not with a user name like `nobody`, because otherwise the -# cluster can't verify if it is root or not. -USER \ - 65534:65534 diff --git a/Containerfile.tools b/Containerfile.tools deleted file mode 100644 index 1e2c8b23..00000000 --- a/Containerfile.tools +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2023 Red Hat, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed under the License -# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -# or implied. See the License for the specific language governing permissions and limitations under -# the License. -# - -FROM registry.access.redhat.com/ubi9/ubi:9.2 AS builder - -# Install packages. -RUN \ - dnf install -y \ - make \ - && \ - dnf clean all - -# Currently RHEL 9 doesn't provide a Go 1.21 compiler, so we need to install it from the Go -# downloads site. -RUN \ - curl -Lo tarball https://go.dev/dl/go1.21.3.linux-amd64.tar.gz && \ - echo 1241381b2843fae5a9707eec1f8fb2ef94d827990582c7c7c32f5bdfbfd420c8 tarball | sha256sum -c && \ - tar -C /usr/local -xf tarball && \ - rm tarball - -# Install git - required by the ci-operator. -RUN dnf install -y \ - git \ - diffutils - -# Update GOPATH, GOCACHE, GOLANGCI_LINT_CACHE, PATH. -ENV \ - GOPATH=/go -ENV \ - GOCACHE=/tmp/ -ENV \ - GOLANGCI_LINT_CACHE=/tmp/.cache -ENV \ - PATH="${PATH}:/usr/local/go/bin:${GOPATH}/bin" - diff --git a/Makefile b/Makefile index 97998f75..9cbbdcaf 100644 --- a/Makefile +++ b/Makefile @@ -12,10 +12,6 @@ # the License. # -# Details of the image: -image_repo:=quay.io/openshift-kni/oran-o2ims -image_tag:=4.16.0 - # Additional flags to pass to the `ginkgo` command. ginkgo_flags:= @@ -295,14 +291,6 @@ catalog-push: ## Push a catalog image. binary: go build -mod=vendor -.PHONY: image -image: - podman build -t "$(image_repo):$(image_tag)" -f Containerfile . - -.PHONY: push -push: image - podman push "$(image_repo):$(image_tag)" - .PHONY: generate go-generate: go generate ./... diff --git a/internal/cmd/operator/start_controller_manager.go b/internal/cmd/operator/start_controller_manager.go index 94e13477..2f49659a 100644 --- a/internal/cmd/operator/start_controller_manager.go +++ b/internal/cmd/operator/start_controller_manager.go @@ -72,7 +72,7 @@ func ControllerManager() *cobra.Command { flags.StringVar( &c.image, imageFlagName, - "quay.io/openshift-kni/oran-o2ims:latest", + "quay.io/openshift-kni/oran-o2ims-operator:latest", "Reference of the container image containing the servers.", ) return result