Skip to content

Commit

Permalink
ci: push downstream image to ocs/dev
Browse files Browse the repository at this point in the history
we have some changes related to downstream
so we need to have a seprate downstream image
so the ocs operator ci can make use of it

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit b23de5a)
Signed-off-by: parth-gr <partharora1010@gmail.com>
Signed-off-by: parth-gr <paarora@redhat.com>
  • Loading branch information
parth-gr committed Apr 4, 2024
1 parent 049bcb1 commit fc5805d
Show file tree
Hide file tree
Showing 25 changed files with 14,046 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/push-build-downstream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Push Image Build Downstream
on:
push:
branches:
- master
- release-*
tags:
- v*
pull_request:
branches:
- master

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

permissions:
contents: read

jobs:
push-image-to-container-registry:
runs-on: ubuntu-20.04
if: github.repository == 'parth-gr/rook'
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v5
with:
go-version: "1.21"

# docker/setup-qemu action installs QEMU static binaries, which are used to run builders for architectures other than the host.
- name: set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: log in to container registry
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_OCS_DEV_ROBOT_USER }}
password: ${{ secrets.QUAY_OCS_DEV_ROBOT_PASSWORD }}

# creating custom env var
- name: set env
run: |
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "GITHUB_SHA=${GITHUB_SHA}" >> $GITHUB_ENV
- name: build and release
env:
BRANCH_NAME: ${{ env.BRANCH_NAME }}
GITHUB_SHA: $ {{ env.GITHUB_SHA }}
run: |
tests/scripts/build-release-downstream.sh
6 changes: 6 additions & 0 deletions build/bundle/annotations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
annotations:
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: rook-ceph-operator
operators.operatorframework.io.bundle.channels.v1: alpha
21 changes: 21 additions & 0 deletions build/bundle/gen-bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -e

source "build/common.sh"

# Use the available container management tool
if [ -z "$DOCKERCMD" ]; then
DOCKERCMD=$(command -v docker || echo "")
fi
if [ -z "$DOCKERCMD" ]; then
DOCKERCMD=$(command -v podman || echo "")
fi

if [ -z "$DOCKERCMD" ]; then
echo -e '\033[1;31m' "podman or docker not found on system" '\033[0m'
exit 1
fi

${DOCKERCMD} build --platform="${GOOS}"/"${GOARCH}" --no-cache -t "$BUNDLE_IMAGE" -f Dockerfile.bundle .
echo
echo "Run '${DOCKERCMD} push ${BUNDLE_IMAGE}' to push operator bundle to image registry."
66 changes: 66 additions & 0 deletions build/csv/ceph/ceph.rook.io_cephblockpoolradosnamespaces.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
name: cephblockpoolradosnamespaces.ceph.rook.io
spec:
group: ceph.rook.io
names:
kind: CephBlockPoolRadosNamespace
listKind: CephBlockPoolRadosNamespaceList
plural: cephblockpoolradosnamespaces
singular: cephblockpoolradosnamespace
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
blockPoolName:
type: string
x-kubernetes-validations:
- message: blockPoolName is immutable
rule: self == oldSelf
name:
type: string
x-kubernetes-validations:
- message: name is immutable
rule: self == oldSelf
required:
- blockPoolName
type: object
status:
properties:
info:
additionalProperties:
type: string
nullable: true
type: object
phase:
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
Loading

0 comments on commit fc5805d

Please sign in to comment.