Skip to content

Commit

Permalink
Change KinD registry port to 5001
Browse files Browse the repository at this point in the history
Closes #390.
  • Loading branch information
michaelsauter committed May 31, 2022
1 parent 1c79cf6 commit bb3ad7d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
context: .
push: false
file: build/package/Dockerfile.${{ matrix.image }}
tags: localhost:5000/ods/ods-${{ matrix.image }}:latest
tags: localhost:5001/ods/ods-${{ matrix.image }}:latest
outputs: type=docker,dest=/tmp/image-ods-${{ matrix.image }}.tar
-
name: Upload artifacts
Expand Down Expand Up @@ -77,10 +77,10 @@ jobs:
do
echo "::group::Push ods-$image to local registry"
docker load --input /tmp/buildx-image-ods-$image/image-ods-$image.tar
docker push localhost:5000/ods/ods-$image:latest
docker push localhost:5001/ods/ods-$image:latest
if [[ "${{ github.event_name }}" == 'pull_request' ]]
then
docker rmi localhost:5000/ods/ods-$image:latest
docker rmi localhost:5001/ods/ods-$image:latest
fi
echo "::endgroup::"
done
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
for image in ${images[*]}
do
echo "::group::Push ods-$image to ghcr.io"
docker tag localhost:5000/ods/ods-$image:latest ghcr.io/${{ env.IMAGE_BASE }}/ods-$image:latest
docker tag localhost:5001/ods/ods-$image:latest ghcr.io/${{ env.IMAGE_BASE }}/ods-$image:latest
docker push ghcr.io/${{ env.IMAGE_BASE }}/ods-$image:latest
echo "::endgroup::"
done
6 changes: 3 additions & 3 deletions deploy/ods-pipeline/values.kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ setup:
storageSize: '2Gi'
replicaCount: 1
image:
registry: localhost:5000
registry: localhost:5001
namespace: ods
repository: ods-pipeline-manager
pullPolicy: Always
Expand Down Expand Up @@ -65,9 +65,9 @@ tasks:
# registry: ghcr.io
# namespace: opendevstack/ods-pipeline

registry: localhost:5000
registry: localhost:5001
namespace: ods
pushRegistry: kind-registry.kind:5000
pushRegistry: kind-registry.kind:5001

##
# images chart
Expand Down
2 changes: 1 addition & 1 deletion docs/adr/20210517-testing-tekton-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Run a task that prints a hello world message and define a test in Go using Use [
As part of the preconditions to run the tests, we shall:

- Create a KinD cluster with a registry. (needed to push images for buildah)
- Pull the images from DockerHub into the KinD registry (Tasks by default will use localhost:5000, make it easy later to override).
- Pull the images from DockerHub into the KinD registry (Tasks by default will use localhost:5001, make it easy later to override).
- Install Tekton Core components
- Apply the custom Tekton tasks under /deploy.
- Verify we can run Tekton tests.
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-and-push-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -eu

# To carry out normal operations like running ODS Tekton Tasks,
# we need the ODS tasks images available in the KinD cluster.
REGISTRY="localhost:5000"
REGISTRY="localhost:5001"
NAMESPACE="ods"

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
Expand Down
2 changes: 1 addition & 1 deletion scripts/kind-with-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ODS_PIPELINE_DIR=${SCRIPT_DIR%/*}
# desired cluster name; default is "kind"
KIND_CLUSTER_NAME="kind"
RECREATE_KIND_CLUSTER="false"
REGISTRY_PORT="5000"
REGISTRY_PORT="5001"

# K8S version is aligned with OpenShift GA 4.8.
# See https://docs.openshift.com/container-platform/4.8/release_notes/ocp-4-8-release-notes.html
Expand Down
6 changes: 3 additions & 3 deletions test/tasks/ods-deploy-helm_external_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ func TestTaskODSDeployHelmExternal(t *testing.T) {

imageStream = random.PseudoString()
tag := "latest"
fullTag := fmt.Sprintf("localhost:5000/%s/%s:%s", ctxt.Namespace, imageStream, tag)
fullTag := fmt.Sprintf("localhost:5001/%s/%s:%s", ctxt.Namespace, imageStream, tag)
buildAndPushImageWithLabel(t, ctxt, fullTag, wsDir)
ia := artifact.Image{
Image: fmt.Sprintf("kind-registry.kind:5000/%s/%s:%s", ctxt.Namespace, imageStream, tag),
Registry: "kind-registry.kind:5000",
Image: fmt.Sprintf("kind-registry.kind:5001/%s/%s:%s", ctxt.Namespace, imageStream, tag),
Registry: "kind-registry.kind:5001",
Repository: ctxt.Namespace,
Name: imageStream,
Tag: tag,
Expand Down
2 changes: 1 addition & 1 deletion test/tasks/ods-package-image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,5 +207,5 @@ func getDockerImageTag(t *testing.T, ctxt *tasktesting.TaskRunContext, wsDir str
if err != nil {
t.Fatalf("could not read git-commit-sha: %s", err)
}
return fmt.Sprintf("localhost:5000/%s/%s:%s", ctxt.Namespace, ctxt.ODS.Component, sha)
return fmt.Sprintf("localhost:5001/%s/%s:%s", ctxt.Namespace, ctxt.ODS.Component, sha)
}

0 comments on commit bb3ad7d

Please sign in to comment.