Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change KinD registry port to 5001 #538

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
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)
}