Skip to content

Commit

Permalink
use new capd targets and remove old makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Apr 26, 2022
1 parent 7a27773 commit e9ea3c8
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 181 deletions.
3 changes: 1 addition & 2 deletions cloudbuild-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ steps:
args:
- release-staging-nightly
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20211013-1be7868d8b'
dir: 'test/infrastructure/docker'
entrypoint: make
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
- TAG=$_GIT_TAG
- PULL_BASE_REF=$_PULL_BASE_REF
- DOCKER_BUILDKIT=1
args:
- release-staging-nightly
- release-capd-staging-nightly
substitutions:
# _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and
# can be used as a substitution
Expand Down
3 changes: 1 addition & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ steps:
args:
- release-staging
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20211013-1be7868d8b'
dir: 'test/infrastructure/docker'
entrypoint: make
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
- TAG=$_GIT_TAG
- PULL_BASE_REF=$_PULL_BASE_REF
- DOCKER_BUILDKIT=1
args:
- release-staging
- release-capd-staging
substitutions:
# _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and
# can be used as a substitution
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/clusterctl/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ make docker-build REGISTRY=gcr.io/k8s-staging-cluster-api PULL_POLICY=IfNotPrese
In order to build docker provider artifacts

```
make -C test/infrastructure/docker docker-build REGISTRY=gcr.io/k8s-staging-cluster-api PULL_POLICY=IfNotPresent
make docker-capd-build REGISTRY=gcr.io/k8s-staging-cluster-api PULL_POLICY=IfNotPresent
```

### Create a clusterctl-settings.json file
Expand Down
14 changes: 6 additions & 8 deletions docs/book/src/developer/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ You'll need to build two docker images, one for Cluster API itself and one for t

```
make docker-build
make -C test/infrastructure/docker docker-build
make docker-capd-build
```

### Push both images
Expand All @@ -125,19 +125,17 @@ The push refers to repository [gcr.io/cluster-api-242700/cluster-api-controller-
90a39583ad5f: Layer already exists
932da5156413: Layer already exists
dev: digest: sha256:263262cfbabd3d1add68172a5a1d141f6481a2bc443672ce80778dc122ee6234 size: 739
$ make -C test/infrastructure/docker docker-push
make: Entering directory '/home/liz/src/sigs.k8s.io/cluster-api/test/infrastructure/docker'
docker push gcr.io/cluster-api-242700/manager:dev
The push refers to repository [gcr.io/cluster-api-242700/manager]
$ make docker-capd-push
docker push gcr.io/cluster-api-242700/capd-manager-amd64:dev
The push refers to repository [gcr.io/cluster-api-242700/capd-manager-amd64]
5b1e744b2bae: Pushed
932da5156413: Layer already exists
dev: digest: sha256:35670a049372ae063dad910c267a4450758a139c4deb248c04c3198865589ab2 size: 739
make: Leaving directory '/home/liz/src/sigs.k8s.io/cluster-api/test/infrastructure/docker'
```

Make a note of the URLs and the digests. You'll need them for the next step. In this case, they're...

`gcr.io/cluster-api-242700/manager@sha256:35670a049372ae063dad910c267a4450758a139c4deb248c04c3198865589ab2`
`gcr.io/cluster-api-242700/capd-manager-amd64@sha256:35670a049372ae063dad910c267a4450758a139c4deb248c04c3198865589ab2`

and

Expand All @@ -162,7 +160,7 @@ spec:
template:
spec:
containers:
- image: gcr.io/cluster-api-242700/manager@sha256:35670a049372ae063dad910c267a4450758a139c4deb248c04c3198865589ab2`
- image: gcr.io/cluster-api-242700/capd-manager-amd64@sha256:35670a049372ae063dad910c267a4450758a139c4deb248c04c3198865589ab2`
name: manager
```

Expand Down
32 changes: 32 additions & 0 deletions docs/book/src/developer/providers/v1.1-to-v1.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,35 @@ in ClusterAPI are kept in sync with the versions used by `sigs.k8s.io/controller
- The check for `cluster.status.infrastructureReady=true` usually existing at the beginning of the reconcile loop for control-plane providers is implemented after setting external objects ref;
- The check for `cluster.status.infrastructureReady=true` usually existing at the beginning of the reconcile loop for infrastructure provider does not prevent the object to be deleted
rif. [PR #6183](https://github.com/kubernetes-sigs/cluster-api/pull/6183)

- Makefile
- migrate all targets of `./test/infrastructure/docker/Makefile` to the top-level `Makefile`:

| old Makefile target | new Makefile target |
|-----------------------------|-------------------------------|
| `test` | `test-capd` |
| `test-verbose` | `test-capd-verbose` |
| `test-junit` | `test-capd-junit` |
| `manager` | `manager-capd` |
| `generate` | `generate` |
| `generate-go` | `generate-go-deepcopy-capd` |
| | `generate-go-conversion-capd` |
| `generate-manifests` | `generate-manifests-capd` |
| `docker-pull-prerequisites` | `docker-pull-prerequisites` |
| `docker-build` | `docker-capd-build` |
| `docker-push` | `docker-capd-push` |
| `docker-build-all` | `docker-capd-build-all` |
| `docker-build-%` | `docker-capd-build-%` |
| `docker-push-all` | `docker-capd-push-all` |
| `docker-push-%` | `docker-capd-push-%` |
| `docker-push-manifest` | `docker-capd-push-manifest` |
| `release` | `release` |
| `manifest-modification` | `manifest-modification` |
| `release-manifests` | `release-manifests-dev` |
| `release-staging` | `release-capd-staging` |
| `release-staging-nigtly` | `release-capd-staging-nigtly` |
| `release-alias-tag` | `release-capd-alias-tag` |
| `clean-bin` | `clean-bin` |
| `clean-release` | `clean-release` |
| `verify` | `verify / verify-capd` |
| `verify-gen` | `verify-gen` |
4 changes: 2 additions & 2 deletions docs/book/src/reference/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ GitHub Presubmit Workflows:
### Postsubmits

Prow Postsubmits:
* [post-cluster-api-push-images] Google Cloud Build: `make release-staging`, `make -C test/infrastructure/docker release-staging`
* [post-cluster-api-push-images] Google Cloud Build: `make release-staging`, `make release-capd-staging`

### Periodics

Expand All @@ -60,7 +60,7 @@ Prow Periodics:
* GINKGO_FOCUS: `[K8s-Upgrade]`
* [periodic-cluster-api-e2e-workload-upgrade-1-23-latest-main] `./scripts/ci-e2e.sh` FROM: `stable-1.23` TO: `ci/latest-1.24`
* GINKGO_FOCUS: `[K8s-Upgrade]`
* [cluster-api-push-images-nightly] Google Cloud Build: `make release-staging-nightly`, `make -C test/infrastructure/docker release-staging-nightly`
* [cluster-api-push-images-nightly] Google Cloud Build: `make release-staging-nightly`, `make release-capd-staging-nightly`

## Builds and Tests running on releases

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ cd "${REPO_ROOT}" && make managers clusterctl e2e-framework build-book

echo "*** Building Cluster API Provider Docker ***"
# Docker provider
cd "${REPO_ROOT}/test/infrastructure/docker" && make manager
cd "${REPO_ROOT}" && make manager-capd
2 changes: 1 addition & 1 deletion scripts/ci-e2e-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ capi:buildDockerImages () {
## Build CAPD provider images, if missing
if [[ "$(docker images -q "$REGISTRY/capd-manager-$ARCH:$TAG" 2> /dev/null)" == "" ]]; then
echo "+ Building CAPD images"
make -C test/infrastructure/docker docker-build
make docker-capd-build
else
echo "+ CAPD images already present in the system, skipping make"
fi
Expand Down
3 changes: 1 addition & 2 deletions scripts/ci-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ make test-junit

echo -e "\n*** Testing Cluster API Provider Docker ***\n"
# Docker provider
cd test/infrastructure/docker
make test-junit
make test-capd-junit
161 changes: 0 additions & 161 deletions test/infrastructure/docker/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion test/infrastructure/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For a complete overview, please refer to the documentation available [here](http
## Testing

In order to test your local changes, go to the top level directory of this project, `cluster-api/` and run
`make -C test/infrastructure/docker test` to run the unit tests.
`make test-capd` to run the unit tests.

**Note:** `make test-e2e` runs the CAPI E2E tests that are based on CAPD (CAPD does not have a separated e2e suite).

Expand Down

0 comments on commit e9ea3c8

Please sign in to comment.