Skip to content

Commit

Permalink
Merge pull request #271 from redhat-marketplace/release/2.5.0
Browse files Browse the repository at this point in the history
Release 2.5.0
  • Loading branch information
zach-source authored Nov 29, 2021
2 parents 0bdb379 + ee259a0 commit 851a74b
Show file tree
Hide file tree
Showing 329 changed files with 27,825 additions and 19,124 deletions.
203 changes: 112 additions & 91 deletions .github/workflows/branch_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ jobs:
test:
name: Test
runs-on: ubuntu-20.04
outputs:
version: ${{ steps.version.outputs.version }}
isDev: ${{ steps.version.outputs.isDev }}
tag: ${{ steps.version.outputs.tag }}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -59,47 +55,6 @@ jobs:
echo "/usr/local/kubebuilder/bin" >> $GITHUB_PATH
- name: Test
run: make operator/test
- id: version
name: Get Version
run: |-
make svu
export VERSION="$(./bin/svu next)"
if [ "$REF" == "" ]; then
REF="$GITHUB_REF"
fi
if [[ "$GITHUB_HEAD_REF" != "" ]]; then
echo "Request is a PR $GITHUB_HEAD_REF is head; is base $GITHUB_BASE_REF is base"
REF="$GITHUB_HEAD_REF"
fi
echo "Found ref $REF"
if [[ "$VERSION" == "" ]]; then
echo "failed to find version"
exit 1
fi
if [[ "$REF" == *"release"* || "$REF" == *"hotfix"* ]] ; then
echo "using release version and github_run_number"
export TAG="${VERSION}-${GITHUB_RUN_NUMBER}"
export IS_DEV="false"
else
echo "using beta in version"
export TAG="${VERSION}-beta-${GITHUB_RUN_NUMBER}"
export IS_DEV="true"
fi
echo "Found version $VERSION"
echo "::set-output name=version::$VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Found tag $TAG"
echo "TAG=$TAG" >> $GITHUB_ENV
echo "::set-output name=tag::$TAG"
echo "IS_DEV=$IS_DEV" >> $GITHUB_ENV
echo "::set-output name=isDev::$IS_DEV"
echo "REF=$REF" >> $GITHUB_ENV
matrix-test:
name: Matrix Test
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -146,18 +101,17 @@ jobs:
- tests
images:
name: Build Images
needs:
- test
runs-on: ubuntu-20.04
env:
VERSION: ${{ needs.test.outputs.tag }}
GO_VERSION: 1.16.8
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v2
with:
Expand Down Expand Up @@ -194,39 +148,66 @@ jobs:
# (you'll need to set the KUBEBUILDER_ASSETS env var if you put it somewhere else)
sudo mv /tmp/kubebuilder_${version}_${os}_${arch} /usr/local/kubebuilder
echo "/usr/local/kubebuilder/bin" >> $GITHUB_PATH
- name: Install operatorsdk
run: |-
version=v1.7.2
export ARCH=$(case $(arch) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(arch) ;; esac)
export OS=$(uname | awk '{print tolower($0)}')
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/${version}
curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
curl -LO ${OPERATOR_SDK_DL_URL}/checksums.txt
curl -LO ${OPERATOR_SDK_DL_URL}/checksums.txt.asc
grep operator-sdk_${OS}_${ARCH} checksums.txt | sha256sum -c -
chmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk
curl -LO https://github.com/operator-framework/operator-registry/releases/download/v1.15.3/${OS}-${ARCH}-opm
chmod +x ${OS}-${ARCH}-opm && sudo mv ${OS}-${ARCH}-opm /usr/local/bin/opm
- name: Install YQ
run: sudo snap install yq
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
registry: quay.io/rh-marketplace
username: ${{secrets['quayUser']}}
password: ${{secrets['quayPassword']}}
- id: version
name: Get Version
run: |-
make svu
export VERSION="$(./bin/svu next --prefix '')"
if [ "$REF" == "" ]; then
REF="$GITHUB_REF"
fi
if [[ "$GITHUB_HEAD_REF" != "" ]]; then
echo "Request is a PR $GITHUB_HEAD_REF is head; is base $GITHUB_BASE_REF is base"
REF="$GITHUB_HEAD_REF"
fi
echo "Found ref $REF"
if [[ "$VERSION" == "" ]]; then
echo "failed to find version"
exit 1
fi
if [[ "$REF" == *"release"* || "$REF" == *"hotfix"* || "$REF" == *"refs/head/master"* || "$REF" == *"refs/head/develop"* ]] ; then
echo "using release version and github_run_number"
export VERSION=${VERSION}-${GITHUB_RUN_NUMBER}
export TAG="${VERSION}"
export IS_DEV="false"
else
echo "using beta in version"
export VERSION=${VERSION}-beta.${GITHUB_RUN_NUMBER}
export TAG="${VERSION}"
export IS_DEV="true"
fi
echo "Found version $VERSION"
echo "::set-output name=version::$VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Found tag $TAG"
echo "TAG=$TAG" >> $GITHUB_ENV
echo "::set-output name=tag::$TAG"
echo "IS_DEV=$IS_DEV" >> $GITHUB_ENV
echo "::set-output name=isDev::$IS_DEV"
echo "REF=$REF" >> $GITHUB_ENV
- id: build
name: Build images
run: make clean-licenses save-licenses ${{ matrix.project }}/docker-build
env:
DOCKERBUILDXCACHE: /tmp/.buildx-cache
IMAGE_PUSH: "false"
- id: push
name: Push images
run: make ${{ matrix.project }}/docker-build
name: Build and push images
run: |-
if [ "$IS_DEV" == "true" ]; then
export ARCHS="amd64"
fi
make clean-licenses save-licenses ${{ matrix.project }}/docker-build
env:
DOCKERBUILDXCACHE: /tmp/.buildx-cache
PUSH: "true"
IMAGE_PUSH: "true"
strategy:
matrix:
project:
Expand All @@ -252,16 +233,14 @@ jobs:
isDev: ${{ steps.bundle.outputs.isDev }}
version: ${{ steps.bundle.outputs.version }}
tag: ${{ steps.bundle.outputs.tag }}
env:
VERSION: ${{ needs.test.outputs.version }}
IMAGE_TAG: ${{ needs.test.outputs.tag }}
IS_DEV: ${{ needs.test.outputs.isDev }}
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v2
with:
Expand Down Expand Up @@ -298,27 +277,67 @@ jobs:
# (you'll need to set the KUBEBUILDER_ASSETS env var if you put it somewhere else)
sudo mv /tmp/kubebuilder_${version}_${os}_${arch} /usr/local/kubebuilder
echo "/usr/local/kubebuilder/bin" >> $GITHUB_PATH
- name: Install operatorsdk
run: |-
version=v1.7.2
export ARCH=$(case $(arch) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(arch) ;; esac)
export OS=$(uname | awk '{print tolower($0)}')
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/${version}
curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
curl -LO ${OPERATOR_SDK_DL_URL}/checksums.txt
curl -LO ${OPERATOR_SDK_DL_URL}/checksums.txt.asc
grep operator-sdk_${OS}_${ARCH} checksums.txt | sha256sum -c -
chmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk
curl -LO https://github.com/operator-framework/operator-registry/releases/download/v1.15.3/${OS}-${ARCH}-opm
chmod +x ${OS}-${ARCH}-opm && sudo mv ${OS}-${ARCH}-opm /usr/local/bin/opm
- name: Install YQ
run: sudo snap install yq
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
registry: quay.io/rh-marketplace
username: ${{secrets['quayUser']}}
password: ${{secrets['quayPassword']}}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
registry: registry.connect.redhat.com
username: ${{secrets['REDHAT_IO_USER']}}
password: ${{secrets['REDHAT_IO_PASSWORD']}}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
registry: registry.redhat.io
username: ${{secrets['REDHAT_IO_USER']}}
password: ${{secrets['REDHAT_IO_PASSWORD']}}
- id: version
name: Get Version
run: |-
make svu
export VERSION="$(./bin/svu next --prefix '')"
if [ "$REF" == "" ]; then
REF="$GITHUB_REF"
fi
if [[ "$GITHUB_HEAD_REF" != "" ]]; then
echo "Request is a PR $GITHUB_HEAD_REF is head; is base $GITHUB_BASE_REF is base"
REF="$GITHUB_HEAD_REF"
fi
echo "Found ref $REF"
if [[ "$VERSION" == "" ]]; then
echo "failed to find version"
exit 1
fi
if [[ "$REF" == *"release"* || "$REF" == *"hotfix"* || "$REF" == *"refs/head/master"* || "$REF" == *"refs/head/develop"* ]] ; then
echo "using release version and github_run_number"
export VERSION=${VERSION}-${GITHUB_RUN_NUMBER}
export TAG="${VERSION}"
export IS_DEV="false"
else
echo "using beta in version"
export VERSION=${VERSION}-beta.${GITHUB_RUN_NUMBER}
export TAG="${VERSION}"
export IS_DEV="true"
fi
echo "Found version $VERSION"
echo "::set-output name=version::$VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Found tag $TAG"
echo "TAG=$TAG" >> $GITHUB_ENV
echo "::set-output name=tag::$TAG"
echo "IS_DEV=$IS_DEV" >> $GITHUB_ENV
echo "::set-output name=isDev::$IS_DEV"
echo "REF=$REF" >> $GITHUB_ENV
- id: bundle
name: Build bundle
run: |-
Expand All @@ -342,6 +361,8 @@ jobs:
echo "::set-output name=isDev::$IS_DEV"
echo "::set-output name=version::$VERSION"
echo "::set-output name=tag::$TAG"
env:
IMAGE_TAG: ${{ steps.version.outputs.tag }}
- uses: actions/upload-artifact@v2
with:
name: release-bundle-${{ steps.bundle.outputs.tag }}
Expand Down
Loading

0 comments on commit 851a74b

Please sign in to comment.