Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 2 additions & 38 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,5 @@
# Syncing downstream OLM

All of the staged repositories live in the top level `staging` directory. The versions of each staged dependency are tracked in the [`scripts/tracked`](./tracked) file.
All of the staged repositories live in the top level `staging` directory.

## Setup

The sync process requires the git-subtree command. See [git subtree](https://github.com/git/git/blob/master/contrib/subtree/INSTALL) for more detailed instructions.

The local repo also needs to track the upstream remotes in [`scripts/tracked`](./tracked). To add these to your repo, run the `init_remotes` script from the root of your repo:

```bash
./scripts/init_remotes.sh
```

## Syncing with upstream

To sync a staged dependency with an upstream version, you can use the `pull_upstream.sh` helper script. This adds a staged repo if it is not present and updates it to the provided tag/branch otherwise. The script is run as follows:

```bash
./scripts/pull_upstream.sh <remote url or name> [<ref>]
```

The ref can be a valid tag or branch on the remote, and defaults to master. A successful run adds a new commit to the current branch, similar to

```text
1bec1e8bb Sync upstream api v0.6.1
```

Commit history for the staged repositories is not preserved. The latest synced upstream commit for each staged repo can be found in the `./scripts/tracked` file.

Once the sync is completed, verify it by running the unit tests for the dependencies.

## Pushing changes upstream

Changes made to the staged repositories may be pushed upstream by providing specific commit ranges. For this run:

```bash
./scripts/push_upstream.sh <remote name> <commit range or list>
```

This creates a local branch containing from the last synced version of the staged dependency with the specified commits cherry-picked onto it. You can then create a PR from this branch to the required upstream repository.
Note: the process for porting upstream commits downstream is outlined in the [OLM downstreaming guide](https://docs.google.com/document/d/139yXeOqAJbV1ndC7Q4NbaOtzbSdNpcuJan0iemORd3g/edit#).
12 changes: 6 additions & 6 deletions scripts/generate_crds_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ add_ibm_managed_cloud_annotations() {
done
}

${YQ} merge --inplace -d'*' manifests/0000_50_olm_00-namespace.yaml scripts/namespaces.patch.yaml
${YQ} merge --inplace -d'0' manifests/0000_50_olm_00-namespace.yaml scripts/monitoring-namespace.patch.yaml
${YQ} write --inplace -s scripts/olm-deployment.patch.yaml manifests/0000_50_olm_07-olm-operator.deployment.yaml
${YQ} write --inplace -s scripts/catalog-deployment.patch.yaml manifests/0000_50_olm_08-catalog-operator.deployment.yaml
${YQ} write --inplace -s scripts/packageserver-deployment.patch.yaml manifests/0000_50_olm_15-packageserver.clusterserviceversion.yaml
${YQ} merge --inplace -d'*' manifests/0000_50_olm_00-namespace.yaml scripts/patches/namespaces.patch.yaml
${YQ} merge --inplace -d'0' manifests/0000_50_olm_00-namespace.yaml scripts/patches/monitoring-namespace.patch.yaml
${YQ} write --inplace -s scripts/patches/olm-deployment.patch.yaml manifests/0000_50_olm_07-olm-operator.deployment.yaml
${YQ} write --inplace -s scripts/patches/catalog-deployment.patch.yaml manifests/0000_50_olm_08-catalog-operator.deployment.yaml
${YQ} write --inplace -s scripts/patches/packageserver-deployment.patch.yaml manifests/0000_50_olm_15-packageserver.clusterserviceversion.yaml
mv manifests/0000_50_olm_15-packageserver.clusterserviceversion.yaml pkg/manifests/csv.yaml

cat << EOF > manifests/image-references
Expand Down Expand Up @@ -267,7 +267,7 @@ spec:
imagePullPolicy: IfNotPresent
command:
- bin/collect-profiles
args:
args:
- -n
- openshift-operator-lifecycle-manager
- --config-mount-path
Expand Down
22 changes: 0 additions & 22 deletions scripts/init_remotes.sh

This file was deleted.

Binary file removed scripts/olm/.build_local.sh.swp
Binary file not shown.
16 changes: 0 additions & 16 deletions scripts/olm/build_bare.sh

This file was deleted.

23 changes: 0 additions & 23 deletions scripts/olm/build_local.sh

This file was deleted.

15 changes: 0 additions & 15 deletions scripts/olm/copy_crds.sh

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/olm/generate_fakes.sh

This file was deleted.

52 changes: 0 additions & 52 deletions scripts/olm/generate_manifests.sh

This file was deleted.

30 changes: 0 additions & 30 deletions scripts/olm/install_bare.sh

This file was deleted.

32 changes: 0 additions & 32 deletions scripts/olm/install_local.sh

This file was deleted.

35 changes: 0 additions & 35 deletions scripts/olm/lib/olm_util.sh

This file was deleted.

26 changes: 0 additions & 26 deletions scripts/olm/package_release.sh

This file was deleted.

Loading