Skip to content

Commit 83456aa

Browse files
waveywaveschmouel
authored andcommitted
chore: allow users to set the REG_PORT for make dev using a envvar
on Macs the ControlCenter listens on the port 5000 so wanted to set the 5001 port instead for REG_PORT this change ensures that the user it able to set the REG_PORT using an environment variable
1 parent adb6e8c commit 83456aa

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

docs/content/docs/dev/_index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ When it finishes, you will have the following installed in your kind cluster:
2626
- Pipelines as code deployed from your repo with ko.
2727
- Gitea service running locally so you can run the E2E tests against it (Gitea has the most comprehensive set of tests).
2828

29+
### Configuring the Kind Registry Port
30+
31+
By default, the Kind registry runs on port 5000. To use a different port, set the `REG_PORT` environment variable:
32+
33+
```shell
34+
# Set a custom registry port
35+
export REG_PORT=5001
36+
make dev
37+
```
38+
2939
By default, it will try to install from
3040
$GOPATH/src/github.com/openshift-pipelines/pipelines-as-code. To override it,
3141
set the `PAC_DIRS` environment variable.

hack/dev/kind/install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if ! builtin type -p gosmee &>/dev/null; then
4646
fi
4747

4848
TMPD=$(mktemp -d /tmp/.GITXXXX)
49-
REG_PORT='5000'
49+
REG_PORT=${REG_PORT:-'5000'}
5050
REG_NAME='kind-registry'
5151
INSTALL_FROM_RELEASE=
5252
PAC_PASS_SECRET_FOLDER=${PAC_PASS_SECRET_FOLDER:-""}
@@ -173,7 +173,7 @@ function install_pac() {
173173
if [[ -n ${PAC_DEPLOY_SCRIPT:-""} ]]; then
174174
${PAC_DEPLOY_SCRIPT}
175175
else
176-
env KO_DOCKER_REPO=localhost:5000 $ko apply -f config --sbom=none -B >/dev/null
176+
env KO_DOCKER_REPO=localhost:${REG_PORT} $ko apply -f config --sbom=none -B >/dev/null
177177
fi
178178
cd ${oldPwd}
179179
fi
@@ -243,6 +243,7 @@ main() {
243243
install_pac
244244
[[ -z ${DISABLE_GITEA} ]] && install_gitea
245245
echo "And we are done :): "
246+
echo "Using registry on localhost:${REG_PORT}"
246247
}
247248

248249
function usage() {

0 commit comments

Comments
 (0)