-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a workflow to automate config connector release bundle creation
- Loading branch information
Showing
4 changed files
with
110 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Config Connector Release Automation | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
paths-ignore: | ||
- "**.md" | ||
- "experiments/**" | ||
push: | ||
branches: ["master"] | ||
paths-ignore: | ||
- "**.md" | ||
- "experiments/**" | ||
# push: | ||
# tags: | ||
# - 'v*' | ||
|
||
jobs: | ||
run-example: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# - name: Authenticate to Google Cloud | ||
# uses: google-github-actions/auth@v2 | ||
# with: | ||
# workload_identity_provider: 'projects/758705872360/locations/global/workloadIdentityPools/YOUR_POOL_ID/providers/YOUR_PROVIDER_ID' | ||
# service_account: '[email protected]' | ||
|
||
- name: Set up Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v1 | ||
|
||
- name: Run the create-relese-bundle script | ||
run: | | ||
chmod +x ./scripts/github-actions/create-release-bundle.sh | ||
./scripts/github-actions/create-release-bundle.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -346,9 +346,8 @@ build-rbac-manifests: | |
|
||
.PHONY: build-operator-manifests | ||
build-operator-manifests: | ||
go run sigs.k8s.io/controller-tools/cmd/[email protected] crd paths="./operator/pkg/apis/..." output:crd:artifacts:config=operator/config/crd/bases | ||
make -C operator docker-build | ||
kustomize build operator/config/autopilot-manager -o config/installbundle/release-manifests/autopilot/manager.yaml | ||
kustomize build operator/config/manager -o config/installbundle/release-manifests/standard/manager.yaml | ||
|
||
.PHONY: push-operator-manifest | ||
push-operator-manifest: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2022 Google LLC | ||
# | ||
# 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. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
# runs the config-connector build across all desired systems and architectures and creates a release tarball | ||
REPO_ROOT="$(git rev-parse --show-toplevel)" | ||
cd ${REPO_ROOT} | ||
|
||
|
||
BUILD_DIR="${REPO_ROOT}/.build" | ||
mkdir -p "${BUILD_DIR}" | ||
|
||
|
||
MANUAL_DIR="${BUILD_DIR}/manual-release" | ||
mkdir -p "${MANUAL_DIR}/operator-system" | ||
|
||
# build the operator manifest first | ||
make build-operator-manifests | ||
echo "finish build operator manifest" | ||
|
||
kustomize build config/installbundle/release-manifests/standard -o ${MANUAL_DIR}/operator-system/configconnector-operator.yaml | ||
echo "Added standard release manifest to ${MANUAL_DIR}/operator-system/configconnector-operator.yaml" | ||
|
||
kustomize build config/installbundle/release-manifests/autopilot -o ${MANUAL_DIR}/operator-system/autopilot-configconnector-operator.yaml | ||
echo "Added autopilot release manifest to ${MANUAL_DIR}/operator-system/autopilot-configconnector-operator.yaml" | ||
|
||
# cp -rf operator/config/samples ${MANUAL_DIR}/ | ||
|
||
# tar -czvf ${BUILD_DIR}/release-bundle.tar.gz -C ${MANUAL_DIR}/ . | ||
|
||
# echo "Generated ${BUILD_DIR}/release-bundle.tar.gz for manual installation " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# Copyright 2024 Google LLC | ||
# | ||
# 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. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
echo "Start creating the release bundle" | ||
|
||
REPO_ROOT="$(git rev-parse --show-toplevel)" | ||
|
||
# build release manifest | ||
source ${REPO_ROOT}/dev/tasks/deploy-release-manifest | ||
|