-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[ci]: migrate kubernetes bootcamp image to prow #21904
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
Open
ComradeProgrammer
wants to merge
1
commit into
kubernetes:master
Choose a base branch
from
ComradeProgrammer:bootcamp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+52
−3
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| FROM node:slim | ||
| RUN apt-get update && apt-get install curl -y | ||
| EXPOSE 8080 | ||
| COPY server.js . | ||
| CMD [ "node", "server.js" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| var http = require('http'); | ||
| var requests = 0; | ||
| var podname = process.env.HOSTNAME; | ||
| var startTime; | ||
| var host; | ||
| var handleRequest = function(request, response) { | ||
| response.setHeader('Content-Type', 'text/plain'); | ||
| response.writeHead(200); | ||
| response.write('Hello Kubernetes bootcamp! | Hostname: '); | ||
| response.write(host); | ||
| response.end(' | v=2\n'); | ||
| console.log('Hostname:', host, '| Total Requests:', ++requests, '| App Uptime:', (new Date() - startTime)/1000 , 'seconds', '| Log Time:', new Date()); | ||
| } | ||
| var www = http.createServer(handleRequest); | ||
| www.listen(8080, function () { | ||
| startTime = new Date(); | ||
| host = process.env.HOSTNAME; | ||
| console.log('Kubernetes Bootcamp App Started At:', startTime, '| Running On:', host, '\n'); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # See https://cloud.google.com/cloud-build/docs/build-config | ||
| options: | ||
| substitution_option: ALLOW_LOOSE | ||
| steps: | ||
| - name: gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20250513-9264efb079 | ||
| entrypoint: make | ||
| env: | ||
| - DOCKER_CLI_EXPERIMENTAL=enabled | ||
| - _GIT_TAG=$_GIT_TAG | ||
| - _PULL_BASE_REF=$_PULL_BASE_REF | ||
| args: | ||
| - push-kubernetes-bootcamp | ||
| substitutions: | ||
| # _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and | ||
| # can be used as a substitution | ||
| _GIT_TAG: '12345' | ||
| # _PULL_BASE_REF will contain the ref that was pushed to to trigger this build - | ||
| # a branch like 'master' or 'release-0.2', or a tag like 'v0.2'. | ||
| _PULL_BASE_REF: 'master' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| .PHONY: integration-prow-kvm-docker-linux-x86-64 | ||
|
|
||
| .PHONY: integration-prow-kvm-docker-linux-x86-64 integration-prow-docker-docker-linux-x86-64 push-kubernetes-bootcamp | ||
|
|
||
| integration-prow-docker-docker-linux-x86-64: | ||
| # build first | ||
|
|
@@ -16,4 +15,11 @@ integration-prow-kvm-docker-linux-x86-64: | |
| cp -f "${GCE_SSH_PRIVATE_KEY_FILE}" ~/.ssh/google_compute_engine | ||
| cp -f "${GCE_SSH_PUBLIC_KEY_FILE}" ~/.ssh/google_compute_engine.pub | ||
| GOTOOLCHAIN=auto go build -C ./hack/prow/minitest -o $(PWD)/out/minitest . | ||
| ./out/minitest --deployer boskos --tester kvm-docker-linux-amd64-integration --config hack/prow/kvm.json | ||
| ./out/minitest --deployer boskos --tester kvm-docker-linux-amd64-integration --config hack/prow/kvm.json | ||
|
|
||
| push-kubernetes-bootcamp: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how about naming it prow so all prow things have a prow in their name push-prow-kubernetes-bootcamp: |
||
| docker run --rm --privileged tonistiigi/binfmt:latest --install all | ||
| docker buildx create --name multiarch --bootstrap | ||
| docker buildx build --builder multiarch --push --platform linux/amd64,linux/arm64 \ | ||
| -t gcr.io/minikube/kubernetes-bootcamp:$(_GIT_TAG) -t gcr.io/minikube/kubernetes-bootcamp:latest deploy/image/kubernetes-bootcamp | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we have access to gcr.io/minikube in prow ? |
||
| docker buildx rm multiarch | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about add this new phony right before the target to match other ones. Instead of putting all .phonies in one place