question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When a devfile is included in a GitHub repo the project to clone should be inferred

See original GitHub issue

If I have project without a devfile.yaml and links to it like https://che.openshift.io/f?url=https://github.com/maxandersen/quarkus-quickstarts/tree/che a empty workspace is setup but with the project checked out.

If I add a devfile.yaml the project is not checked out and so far I’ve only been able to get something imported by adding:

projects:
  -
    name: quarkus-quickstarts
    source:
      type: git
      location: "https://github.com/maxandersen/quarkus-quickstarts.git"

but that now means I’m checking out a hardcoded path and thus the devfile.yaml inside a project is not really working well as I’m getting setup done from a branch potentially a completely different location/project and project checked out in che is from this hardcoded place.

@gorkem suggested to try:

projects:
  -
    name: quarkus-quickstarts
    source:
      type: git
``

but that gave me:  
"Error occurred during creation a workspace from devfile located at https://raw.githubusercontent.com/maxandersen/quarkus-quickstarts/che/devfile.yaml. Cause: Devfile schema validation failed. Error: (/projects/0/source):The object must have a property whose name is "location".""

Thus I can't see how to make a `devfile.yaml` that is easy to maintain as I would literally have to update that reference on every tag/branch I make for my project.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:30 (17 by maintainers)

github_iconTop GitHub Comments

3reactions
mshaposhnikcommented, Jan 20, 2020

Just to make sure i understood it right:

  • Direct devfile reference (i.e. f?url=......./devfile.yaml) - process what in the projects section;
  • Git repo reference, no projects section inside devfile - process current repo and branch/tag;
  • Git repo reference, devfile contains projects sections - process what is written in it;

Correct ? @maxandersen @gorkem

1reaction
gorkemcommented, Jan 20, 2020

If a devfile is referenced directly then projects is applied directly. If a devfile is being processed as part of reference to a git tree then projects che should skip processing the current git repo and process only other repos (if any) referenced from projects section.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction to Devfile - GitHub Pages
For each project, one has to specify the type of the source repository, its location and optionally also the directory to which the...
Read more >
Chapter 3. Workspaces overview - Red Hat Customer Portal
Project clone-path parameter: clonePath. 3.2.5.2. ... The devfile can be saved in the root folder of a Git repository, a feature branch of...
Read more >
Can I create anonymous repositories for double-blind peer ...
In my situation, I have to do it in a form of GitHub repository. I know that people often do it using anonymous...
Read more >
docker-sync Documentation
Supports multiple sync-end points and multiple projects at the same time ... Now you can start syncing using sync.sh provided with Laradock.
Read more >
Change log for 4.7.48
cluster-baremetal-operator git f73e5fcb sha256: ... Bug 1922098: project dropdown should close after user pick a project #7987 · Bug 1922066: Search for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found