velero/hack
Bridget McErlean 198ea57407 Allow registry to be configured at build time
This adds a new `buildinfo` variable `ImageRegistry` that can set at
build time like the `Version` variable. This allows us to customise the
Velero binary to use different registries.

If the variable is set, this variable wille be used when creating the
URIs for both the main `velero` and `velero-restic-restore-helper`
images. If it is not set, default to using Dockerhub (`velero/velero`,
`velero/velero-restic-restore-helper`).

There are numerous ways in which the Velero binary can be built so all
of them have been updated to add the new link time flag to set the
variable:
* `make local` (used for local developer builds to build for the local
  OS and ARCH)
* `make build` (used by developers and also VMware internal builds to
  build a specific OS and ARCH)
* Goreleaser config (used when creating OSS release binaries)
* Dockerfile (used to build the Velero binary used within the image)

All of these workflows are currently triggered from our Makefile where
the variable `REGISTRY` is already available with the default value of
`velero` and used to build the image tag. Where the new `ImageRegistry`
build variable is needed, we pass through this Makefile variable to
those tasks so it can be used accordingly.

The GitHub action and the `./hack/docker-push.sh` script used to push
container images has not been modified. This will continue to use the
default registry specified in the Makefile and will not explicitly pass
it in.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-07-14 15:42:53 -04:00
..
build-image Bump Go to 1.15 (#2974) 2020-10-13 12:42:06 -07:00
crd-gen Convert manifests + BSL api client to kubebuilder (#2561) 2020-06-24 12:55:18 -04:00
issue-template-gen Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
release-tools Allow registry to be configured at build time 2021-07-14 15:42:53 -04:00
boilerplate.go.txt update license headers to Velero contributors (#1302) 2019-03-20 12:32:48 -07:00
build.sh Allow registry to be configured at build time 2021-07-14 15:42:53 -04:00
changelog-check.sh Address insensitive language (#2677) 2020-07-17 14:59:51 -07:00
ci-check.sh Only run CI when relevant files have changed 2019-05-30 17:32:23 -04:00
docker-push.sh Allow registry to be configured at build time 2021-07-14 15:42:53 -04:00
download-restic.sh Upgrade restic from v0.9.6 to v0.12.0 (#3528) 2021-03-11 13:11:23 -05:00
lint.sh Add linter (#2615) 2020-06-30 12:51:10 -04:00
restore-crd-patch.json 🐛 Patch generated yaml for restore CRD as a hacky workaround (#2814) 2020-08-12 18:43:29 -04:00
test.sh Add more E2E tests and improvement (#3111) 2020-12-09 16:26:05 -08:00
update-all.sh update license headers to Velero contributors (#1302) 2019-03-20 12:32:48 -07:00
update-fmt.sh fix goimport noise in prep for bump to latest 2020-03-02 10:55:08 -07:00
update-generated-crd-code.sh Minor kubebuilder related items to clean up (#3180) 2021-01-21 18:22:34 -05:00
update-generated-issue-template.sh move issue-template-gen from docs/ to hack/ (#1558) 2019-06-10 15:22:27 -07:00
update-proto.sh move plugin proto updating into make update (#1887) 2019-09-18 14:03:40 -07:00
verify-all.sh update license headers to Velero contributors (#1302) 2019-03-20 12:32:48 -07:00
verify-fmt.sh update license headers to Velero contributors (#1302) 2019-03-20 12:32:48 -07:00
verify-generated-crd-code.sh Fix path + add helpful message (#2740) 2020-07-22 11:13:02 -07:00
verify-generated-issue-template.sh update license headers to Velero contributors (#1302) 2019-03-20 12:32:48 -07:00