diff --git a/.ci/README.md b/.ci/README.md index 680eae3e3..47b11a03b 100644 --- a/.ci/README.md +++ b/.ci/README.md @@ -12,7 +12,7 @@ All documentation about how to onboard components in Openshift CI can be found i All Che operator jobs configurations are defined in `https://github.com/openshift/release/tree/master/ci-operator/config/eclipse-che/che-operator`. ### Jobs -- `che-operator-update` - It tests Eclipse Che update from the latest Eclipse Che release version to a new version from the PR and workspace startup. Note this PR check runs against `master` branch and all `7.x.y` branches. +- `che-operator-update` - It tests Eclipse Che update from the latest Eclipse Che release version to a new version from the PR and workspace startup. Note this PR check runs against `main` branch and all `7.x.y` branches. - `che-operator-olm-latest-changes-tests`- It tests Eclipse Che deployment and workspace startup. All Openshift CI checks name in pull request have a special nomenclature. Example: `ci/prow/v6-che-operator-update where` where `v6` is Openshift4 minor version. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4ab7d370e..389ecfedc 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -30,8 +30,8 @@ che-operator Development Guide: https://github.com/eclipse-che/che-operator/#dev - [ ] [Code produced is complete](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#code-produced-is-complete) - [ ] [Code builds without errors](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#code-builds-without-errors) - [ ] [Tests are covering the bugfix](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#tests-are-covering-the-bugfix) -- [ ] [Custom resource definition file is up to date](https://github.com/eclipse-che/che-operator/blob/master/README.md#updating-custom-resource-definition-file) -- [ ] [Nightly OLM bundle is up to date](https://github.com/eclipse-che/che-operator/blob/master/README.md#update-nightly-olm-bundle) +- [ ] [Custom resource definition file is up to date](https://github.com/eclipse-che/che-operator/blob/main/README.md#updating-custom-resource-definition-file) +- [ ] [Nightly OLM bundle is up to date](https://github.com/eclipse-che/che-operator/blob/main/README.md#update-nightly-olm-bundle) - [ ] [The repository devfile is up to date and works](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#the-repository-devfile-is-up-to-date-and-works) - [ ] [Sections `What issues does this PR fix or reference` and `How to test this PR` completed](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#sections-what-issues-does-this-pr-fix-or-reference-and-how-to-test-this-pr-completed) - [ ] [Relevant user documentation updated](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#relevant-contributing-documentation-updated) diff --git a/.github/bin/check-nightly-olm-bundle-version.sh b/.github/bin/check-nightly-olm-bundle-version.sh index e600bfe22..a1492a140 100755 --- a/.github/bin/check-nightly-olm-bundle-version.sh +++ b/.github/bin/check-nightly-olm-bundle-version.sh @@ -19,10 +19,10 @@ if [ -z "${ROOT_PROJECT_DIR}" ]; then fi CSV_KUBERNETES_NEW="deploy/olm-catalog/nightly/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml" -CSV_KUBERNETES_CURRENT=https://raw.githubusercontent.com/eclipse-che/che-operator/master/deploy/olm-catalog/nightly/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml +CSV_KUBERNETES_CURRENT=https://raw.githubusercontent.com/eclipse-che/che-operator/main/deploy/olm-catalog/nightly/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml CSV_OPENSHIFT_NEW="deploy/olm-catalog/nightly/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml" -CSV_OPENSHIFT_CURRENT=https://raw.githubusercontent.com/eclipse-che/che-operator/master/deploy/olm-catalog/nightly/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml +CSV_OPENSHIFT_CURRENT=https://raw.githubusercontent.com/eclipse-che/che-operator/main/deploy/olm-catalog/nightly/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml checkNightlyBundleVersions() { git fetch -q diff --git a/.github/workflows/build-and-push-catalog-and-bundle-images.yaml b/.github/workflows/build-and-push-catalog-and-bundle-images.yaml index dad55d10f..91d39879a 100644 --- a/.github/workflows/build-and-push-catalog-and-bundle-images.yaml +++ b/.github/workflows/build-and-push-catalog-and-bundle-images.yaml @@ -14,7 +14,7 @@ on: schedule: - cron: '0 21 * * *' branches: - - master + - main jobs: build-and-push-images: @@ -37,7 +37,7 @@ jobs: - name: Build catalog source and opm bundle images and push to registry run: > ${GITHUB_WORKSPACE}/olm/buildAndPushBundleImages.sh -c 'nightly' -p 'openshift' && - ${GITHUB_WORKSPACE}/olm/buildAndPushBundleImages.sh -c 'nightly' -p 'kubernetes' + ${GITHUB_WORKSPACE}/olm/buildAndPushBundleImages.sh -c 'nightly' -p 'kubernetes' env: IMAGE_REGISTRY_HOST: quay.io IMAGE_REGISTRY_USER_NAME: eclipse diff --git a/.github/workflows/check-nightly-olm-bundle.yaml b/.github/workflows/check-nightly-olm-bundle.yaml index 802d54525..7a7b70779 100644 --- a/.github/workflows/check-nightly-olm-bundle.yaml +++ b/.github/workflows/check-nightly-olm-bundle.yaml @@ -14,7 +14,7 @@ name: Check nightly OLM bundle on: pull_request: branches: - - master + - main jobs: check-bundle-files: runs-on: ubuntu-20.04 diff --git a/.github/workflows/minikube-operator-update.yaml b/.github/workflows/minikube-operator-update.yaml index bc0f07d08..1c7f004f1 100644 --- a/.github/workflows/minikube-operator-update.yaml +++ b/.github/workflows/minikube-operator-update.yaml @@ -14,7 +14,7 @@ name: Minikube on: pull_request: branches: - - master + - main jobs: minikube: name: Test Eclipse Che update from stable to nightly diff --git a/.github/workflows/minishift-operator-update.yaml b/.github/workflows/minishift-operator-update.yaml index 8bc9e6aba..bb5edefa4 100644 --- a/.github/workflows/minishift-operator-update.yaml +++ b/.github/workflows/minishift-operator-update.yaml @@ -14,7 +14,7 @@ name: Minishift on: pull_request: branches: - - master + - main jobs: minishift: name: Test Eclipse Che update from stable to nightly diff --git a/.github/workflows/release-che-docs.yml b/.github/workflows/release-che-docs.yml index 707ab398b..c0df57b57 100644 --- a/.github/workflows/release-che-docs.yml +++ b/.github/workflows/release-che-docs.yml @@ -11,10 +11,10 @@ on: forceflag: description: 'To force creation of .x branch, use --force flag here' default: '' - # trigger on commit to master branch of new CSVs, eg., https://github.com/eclipse-che/che-operator/pull/571/files + # trigger on commit to main branch of new CSVs, eg., https://github.com/eclipse-che/che-operator/pull/571/files push: branches: - - master + - main paths: - 'VERSION' diff --git a/.github/workflows/release-chectl.yml b/.github/workflows/release-chectl.yml index ed25ae385..3a4b7d661 100644 --- a/.github/workflows/release-chectl.yml +++ b/.github/workflows/release-chectl.yml @@ -11,10 +11,10 @@ on: forceflag: description: 'To force creation of .x branch, use --force flag here' default: '' - # trigger on commit to master branch of new CSVs, eg., https://github.com/eclipse-che/che-operator/pull/571/files + # trigger on commit to main branch of new CSVs, eg., https://github.com/eclipse-che/che-operator/pull/571/files push: branches: - - master + - main paths: - 'VERSION' @@ -48,7 +48,7 @@ jobs: fi # To determine DWO version, we have to replace first 7. with v0. - # then major DWO version is behind upstream Che version by 26 + # then major DWO version is behind upstream Che version by 26 # and the minor version is the same # e.g 7.27.0 for Che = v0.1.0 for DWO chectlMajorMinorVersion=${chectlVersion#7.} @@ -74,7 +74,7 @@ jobs: IFS=',' read -ra paramMap <<< "${this_params}" for keyvalue in "${paramMap[@]}" - do + do key=${keyvalue%=*} value=${keyvalue#*=} echo $var1 diff --git a/.github/workflows/release-community-operator-PRs.yml b/.github/workflows/release-community-operator-PRs.yml index eda093188..2bdde131b 100644 --- a/.github/workflows/release-community-operator-PRs.yml +++ b/.github/workflows/release-community-operator-PRs.yml @@ -7,10 +7,10 @@ on: forceflag: description: 'To update an existing PR, use -f or --force flag here' default: '' - # trigger on commit to master branch of new CSVs, eg., https://github.com/eclipse-che/che-operator/pull/571/files + # trigger on commit to main branch of new CSVs, eg., https://github.com/eclipse-che/che-operator/pull/571/files push: branches: - - master + - main paths: - 'VERSION' diff --git a/README.md b/README.md index 695193bbd..8e4c72210 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Che/CodeReady Workspaces Operator -[![codecov](https://codecov.io/gh/eclipse-che/che-operator/branch/master/graph/badge.svg?token=IlYvrVU5nB)](https://codecov.io/gh/eclipse-che/che-operator) +[![codecov](https://codecov.io/gh/eclipse-che/che-operator/branch/main/graph/badge.svg?token=IlYvrVU5nB)](https://codecov.io/gh/eclipse-che/che-operator) Che/CodeReady workspaces operator uses [Operator SDK](https://github.com/operator-framework/operator-sdk) and [Go Kube client](https://github.com/kubernetes/client-go) to deploy, update and manage K8S/OpenShift resources that constitute a single or multi-user Eclipse Che/CodeReady Workspaces cluster. @@ -378,7 +378,7 @@ $ export NO_DATE_UPDATE="true" \ ### Che operator PR checks -Documentation about all Che operator test cases can be found [here](https://github.com/eclipse-che/che-operator/tree/master/.ci/README.md) +Documentation about all Che operator test cases can be found [here](https://github.com/eclipse-che/che-operator/tree/main/.ci/README.md) ### Generate go mocks. diff --git a/RELEASE.md b/RELEASE.md index 502a2dfcd..7a9bbe418 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -68,7 +68,7 @@ Validate that the release version is installed and workspace can be created: ## 4. Merge pull requests -Merge pull request into .x and master branches. +Merge pull request into .x and main branches. ## 5. Testing release on minishift (when chectl is released) diff --git a/devfile.yaml b/devfile.yaml index 02f361e7d..11d5e83bf 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -5,7 +5,7 @@ projects: source: location: 'https://github.com/eclipse-che/che-operator.git' type: git - branch: master + branch: main clonePath: src/github.com/eclipse-che/che-operator components: - id: golang/go/latest diff --git a/make-release.sh b/make-release.sh index 93a6a2f06..a37f14b08 100755 --- a/make-release.sh +++ b/make-release.sh @@ -27,7 +27,7 @@ init() { RELEASE_DIR=$(cd "$(dirname "$0")"; pwd) FORCE_UPDATE="" BUILDX_PLATFORMS="linux/amd64,linux/ppc64le" - DEV_WORKSPACE_CONTROLLER_VERSION="master" + DEV_WORKSPACE_CONTROLLER_VERSION="main" DEV_WORKSPACE_CHE_OPERATOR_VERSION="main" if [[ $# -lt 1 ]]; then usage; exit; fi @@ -82,9 +82,9 @@ checkoutToReleaseBranch() { echo "[INFO] $BRANCH exists." resetChanges $BRANCH else - echo "[INFO] $BRANCH does not exist. Will be created a new one from master." - resetChanges master - git push origin master:$BRANCH + echo "[INFO] $BRANCH does not exist. Will be created a new one from main." + resetChanges main + git push origin main:$BRANCH fi git checkout -B $RELEASE_BRANCH } @@ -126,7 +126,6 @@ checkImageReferences() { echo "[ERROR] Unable to find ubi8_minimal image in the $filename"; exit 1 fi - # use ${RELEASE} instead of master wget https://raw.githubusercontent.com/eclipse/che/${RELEASE}/assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/che/che.properties -q -O /tmp/che.properties plugin_broker_meta_image=$(cat /tmp/che.properties | grep che.workspace.plugin_broker.metadata.image | cut -d '=' -f2) @@ -240,20 +239,20 @@ createPRToXBranch() { set -e } -createPRToMasterBranch() { - echo "[INFO] createPRToMasterBranch :: Create pull request into master branch to copy csv" - resetChanges master - local tmpBranch="copy-csv-to-master" +createPRToMainBranch() { + echo "[INFO] createPRToMainBranch :: Create pull request into main branch to copy csv" + resetChanges main + local tmpBranch="copy-csv-to-main" git checkout -B $tmpBranch git diff refs/heads/${BRANCH}...refs/heads/${RELEASE_BRANCH} ':(exclude)deploy/operator.yaml' | git apply -3 - . ${RELEASE_DIR}/replace-images-tags.sh nightly master + . ${RELEASE_DIR}/replace-images-tags.sh nightly main if git status --porcelain; then git add -A || true # add new generated CSV files in olm/ folder - git commit -am "Copy "$RELEASE" csv to master" --signoff + git commit -am "Copy "$RELEASE" csv to main" --signoff fi git push origin $tmpBranch -f if [[ $FORCE_UPDATE == "--force" ]]; then set +e; fi # don't fail if PR already exists (just force push commits into it) - hub pull-request $FORCE_UPDATE --base master --head ${tmpBranch} -m "Copy "$RELEASE" csv to master" + hub pull-request $FORCE_UPDATE --base main --head ${tmpBranch} -m "Copy "$RELEASE" csv to main" set -e } @@ -291,7 +290,7 @@ fi if [[ $CREATE_PULL_REQUESTS == "true" ]]; then createPRToXBranch - createPRToMasterBranch + createPRToMainBranch fi if [[ $PREPARE_COMMUNITY_OPERATORS_UPDATE == "true" ]]; then diff --git a/pkg/deploy/defaults.go.update.sh b/pkg/deploy/defaults.go.update.sh index 530a22989..a3f8e8a5d 100755 --- a/pkg/deploy/defaults.go.update.sh +++ b/pkg/deploy/defaults.go.update.sh @@ -5,9 +5,9 @@ defaultsFile=${0%/*}/defaults.go if [[ ! -f ${defaultsFile} ]]; then - echo "$defaultsFile not found, downloading from master..." + echo "$defaultsFile not found, downloading from main..." defaultsFile="/tmp/defaults.go" - curl -ssL https://raw.githubusercontent.com/eclipse-che/che-operator/master/pkg/deploy/defaults.go -o ${defaultsFile} + curl -ssL https://raw.githubusercontent.com/eclipse-che/che-operator/main/pkg/deploy/defaults.go -o ${defaultsFile} fi excludes="eclipse/che-keycloak|centos/postgresql-96-centos7"