diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 0c8800006816..000000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,27 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. -{ - "name": "Knative Serving", - "image": "gcr.io/knative-tests/test-infra/prow-tests:latest", - "privileged": true, - "onCreateCommand": "echo 'source ${HOME}/.gvm/scripts/gvm' >> ~/.bashrc", - - // Creates a local container registry, a Kind cluster, and deploys Knative Serving and Knative Ingress - // To explore the setup logs, use the "Codespaces: View Creation Log" command in the Command Palette (Cmd/Ctrl + Shift + P or F1) - "postCreateCommand": "bash .devcontainer/setup.sh", - "postStartCommand": "bash .devcontainer/docker-start.sh", - - "forwardPorts": [ - 5001 - ], - "containerEnv": { - "KO_DOCKER_REPO": "kind.local" - }, - - "mounts": [ - { - "source": "dind-var-lib-docker", - "target": "/docker-graph", - "type": "volume" - } - ] -} diff --git a/.devcontainer/docker-start.sh b/.devcontainer/docker-start.sh deleted file mode 100755 index f4357955c1b7..000000000000 --- a/.devcontainer/docker-start.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2023 The Knative Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eux - -if ! docker info > /dev/null 2>&1; then - echo "Starting docker..." - service docker start -fi diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh deleted file mode 100755 index 9a35e2fad315..000000000000 --- a/.devcontainer/setup.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2023 The Knative Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eux - -.devcontainer/docker-start.sh - -until docker info > /dev/null 2>&1 ; do - echo "Waiting for docker to start..." - sleep 0.1 -done - -echo "Setting up local container registry..." -REGISTRY_NAME='registry.local' -REGISTRY_PORT='5001' - -if [ "$(docker inspect -f '{{.State.Running}}' "${REGISTRY_NAME}" 2>/dev/null || true)" != 'true' ]; then - docker run \ - -d --restart=always -p "127.0.0.1:${REGISTRY_PORT}:5000" --name "${REGISTRY_NAME}" \ - registry:2 -fi - -if kind get clusters | grep kind ; then - echo "KinD cluster already exists, skipping..." - exit 0 -fi - -echo "Creating KinD cluster..." -cat <