Giter Club home page Giter Club logo

Comments (8)

jcajka avatar jcajka commented on July 21, 2024

It seems that the upstream project is providing its own assemble script, which means that this is not an issue related to this repository as the upstream project never supported building with the stock assemble script.
Anyway I will check it out of my curiosity as the project seems simple enough.

from golang-container.

jarifibrahim avatar jarifibrahim commented on July 21, 2024

It seems that the upstream project is providing its own assemble script, which means that this is not an issue related to this repository as the upstream project never supported building with the stock assemble script.

I am the maintainer of https://github.com/jarifibrahim/golang-health-check :)
I had to add the custom s2i scripts because the default ones didn't work for us. You can try the without-s2i branch, it doesn't have the custom assemble and run script.

from golang-container.

jcajka avatar jcajka commented on July 21, 2024

@jarifibrahim I don't know that ;) You have pointed me to your fork.
Digging bit deeper it seems that you are not setting the IMPORT_URL env var as described in the usage printed. With it set properly it builds fine -e IMPORT_URL='github.com/jarifibrahim/golang-health-check'. When it is not set we can't really infer what is built.

The assembler script should error out with better error messages and better handled edge cases. I will try to look in to that today for this upstream repo(can't promise that it will ever make its way in to the centos).

from golang-container.

jarifibrahim avatar jarifibrahim commented on July 21, 2024

@jcajka but why do I need to set the IMPORT_URL. Shouldn't the builder image for simple apps work without any kind of customizations?
For instance, the node builder image works with

s2i build . nodeshift/centos7-s2i-nodejs:10.x node-health-check

out of the box.

In our usecase, setting an environment variable isn't feasible (long story).
Can we make some changes to the assembler script so that it works for simple apps without IMPORT/INSTALL environment variables?

I would love to help in fixing the scripts 😉

from golang-container.

jcajka avatar jcajka commented on July 21, 2024

@jarifibrahim Issue for the golang(notably it is compiled in contrast to the node and hasn't had build in package manager) in many cases is that you need to know what are you building therefor the import_url. In most cases(I need to investigate go mods&co if it is possible to infer the import url from the metadata in the repo) it can't be inferred and by design the s2i is not exposing the URI with sources built, witch would help a lot with the inference. Current assemble script supports only simple projects with fully resolved dependencies without the import_url set.

from golang-container.

jcajka avatar jcajka commented on July 21, 2024

Oh anf GOPATH that needs to be prepared is/was core part of the build.

from golang-container.

jarifibrahim avatar jarifibrahim commented on July 21, 2024

Current assemble script supports only simple projects with fully resolved dependencies without the import_url set.

Ah, okay.

from golang-container.

jcajka avatar jcajka commented on July 21, 2024

I have submitted/will submit two PRs one that improves the error message and other adding capability to extract the needed meta data from the Go module, tl;dr; go mod init <IMPORT_URL> in the root of the Go project.

I will close this issue and let's talk more off github.

from golang-container.

Related Issues (17)

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.