Giter VIP home page Giter VIP logo

Comments (10)

rhuss avatar rhuss commented on July 20, 2024 1

Yes. With the gotcha that kn version is broken (we need to propagate ldflags to ko) --> #257

from client.

imjasonh avatar imjasonh commented on July 20, 2024

Related: #52 #53

It'd be great to get nightly-built images tagged with the latest commit SHA (or just :latest), and release-tagged images built during releases.

from client.

houshengbo avatar houshengbo commented on July 20, 2024

We can directly run the command "ko publish github.com/knative/client/cmd/kn -B -t ${tag}" to name the image <KO_DOCKER_REPO>/kn in the image registry. No need of crane copy.

We can define <KO_DOCKER_REPO> as gcr.io/[gcloud-project], docker.io/, etc. So where do we put this image officially for knative client? Do we have a public directory somewhere to host knative images?

from client.

houshengbo avatar houshengbo commented on July 20, 2024

I have succeeded in creating the image in my own dockerhub repository, docker.io/houshengbo/kn:latest, with the command:

ko publish github.com/knative/client/cmd/kn -B -t latest

When I pulled the image, and did the taskrun run for the following section:

steps
- name: kn-deploy-image
  image: docker.io/houshengbo/kn:latest
  command: ['kn', 'service', 'create', 'foo', '--image', 'gcr.io/knative-samples/helloworld-go', '--env', 'TARGET=Knative']

I have got:

Error executing command: exec: "kn": executable file not found in $PATH

I was wondering what I have done wrong or I am missing. @imjasonh Do you have any ideas? Thx.

from client.

rhuss avatar rhuss commented on July 20, 2024

@houshengbo just shot in the dark, but could you use ./kn instead of plain kn ? Thoug, I'm not sure what working directory ko sets for the generated image, nor what working directory Tekton is using.

from client.

houshengbo avatar houshengbo commented on July 20, 2024

It looks like I need to install crane first to check the path of kn. This is what I have done:

go get github.com/google/go-containerregistry/cmd/crane

crane should be install under $GOPATH/bin.

Then run

crane config ${image}

Here is the output for the image of kn:

{"architecture":"amd64","author":"Bazel","created":"1970-01-01T00:00:00Z","history":[{"author":"Bazel","created":"1970-01-01T00:00:00Z","created_by":"bazel build ..."},{"created":"0001-01-01T00:00:00Z"},{"created":"0001-01-01T00:00:00Z"}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:01092e5921c5543a918d54d9df752ee09a84c912a1d914b7eb37e7152f20b951","sha256:8f8d58d9708807553434fbd82014ea40b5ee0dc8b2eeefcde561a363461d3e66","sha256:0d411545791d984190d7488cad58d30fa9ae1aec52eda3262d65ecd1aa58d1dc"]},"config":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":null,"Healthcheck":null,"Domainname":"","Entrypoint":["/ko-app/kn"],"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt","KO_DATA_PATH=/var/run/ko"],"Hostname":"","Image":"","Labels":null,"OnBuild":null,"OpenStdin":false,"StdinOnce":false,"Tty":false,"User":"","Volumes":null,"WorkingDir":"","ExposedPorts":null,"ArgsEscaped":false,"NetworkDisabled":false,"MacAddress":"","StopSignal":"","Shell":null},"container_config":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":null,"Healthcheck":null,"Domainname":"","Entrypoint":null,"Env":null,"Hostname":"","Image":"","Labels":null,"OnBuild":null,"OpenStdin":false,"StdinOnce":false,"Tty":false,"User":"","Volumes":null,"WorkingDir":"","ExposedPorts":null,"ArgsEscaped":false,"NetworkDisabled":false,"MacAddress":"","StopSignal":"","Shell":null}}

The most important thing we need to look up is Entrypoint":["/ko-app/kn"], which tells us the path of the command.

I will try /ko-app/kn instead of kn to see how it goes. Thanks to @imjasonh.

from client.

houshengbo avatar houshengbo commented on July 20, 2024

/assign @houshengbo

from client.

knative-prow-robot avatar knative-prow-robot commented on July 20, 2024

@houshengbo: GitHub didn't allow me to assign the following users: houshengbo.

Note that only knative members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @houshengbo

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from client.

sixolet avatar sixolet commented on July 20, 2024

We have it now!

from client.

imjasonh avatar imjasonh commented on July 20, 2024

That's gcr.io/knative-releases/github.com/knative/client/cmd/kn correct?

from client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.