-
Notifications
You must be signed in to change notification settings - Fork 243
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
Add Support for specifying git branch and tag in devfile #4260
Add Support for specifying git branch and tag in devfile #4260
Conversation
Need to write tests |
Fix Integration test
/retest Does not seemed to be linked error with the PR.
|
The reason for failure shows before the summary of failure. Here are the relevant logs:
We're hitting #3256 like in many other recent CI failures. 😢 |
Added Integration tests
/retest
|
Is this ready for review? |
yes |
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.
Some trademark silly questions and some requests for adding more comments. Haven't tried checking the functionality yet.
refName = plumbing.NewBranchReferenceName(revision) | ||
} | ||
|
||
downloadSpinner := log.Spinnerf("Downloading starter project %s from %s", starterProject.Name, remoteUrl) |
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.
Using %q
would print better output. I know we don't follow this across our code. So leaving it up to you to decide if you want to do it or not.
@adisky: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
/override ci/prow/v4.5-integration-e2e |
@dharmit: /override requires a failed status context to operate on.
Only the following contexts were expected:
In response to this:
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. |
@adisky I'm trying to check out the functionality and am facing a few issues. Maybe I'll ask a few embarrassing questions. First, I forked https://github.com/odo-devfiles/nodejs-ex repo and created a separate branch with minor changes. Here it is: dharmit/nodejs-ex@5d68d95. Next, I built odo binary using your PR (well, obviously!) Steps followed after that: $ git clone repo
$ cd repo
$ odo create nodejs node
# next I modified the devfile and did `odo push` On the URL, I see the message devfilecommands:
- exec:
commandLine: npm install
component: runtime
group:
isDefault: true
kind: build
workingDir: /project
id: install
- exec:
commandLine: npm start
component: runtime
group:
isDefault: true
kind: run
workingDir: /project
id: run
- exec:
commandLine: npm run debug
component: runtime
group:
isDefault: true
kind: debug
workingDir: /project
id: debug
- exec:
commandLine: npm test
component: runtime
group:
isDefault: true
kind: test
workingDir: /project
id: test
components:
- container:
endpoints:
- name: http-3000
targetPort: 3000
- exposure: public
name: node-3000
path: /
protocol: http
targetPort: 3000
image: registry.access.redhat.com/ubi8/nodejs-12:1-45
memoryLimit: 1024Mi
mountSources: true
sourceMapping: /project
name: runtime
metadata:
name: nodejs
version: 1.0.0
schemaVersion: 2.0.0
starterProjects:
- git:
checkoutFrom:
remote: origin
revision: my-branch
remotes:
origin: https://github.com/dharmit/nodejs-ex.git
name: nodejs-starter What am I doing wrong? |
This works when you download starter project with odo |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adisky, dharmit The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What does does this PR do / why we need it:
Updates go-git library
Users can specify
git branch
andgit tag
usingcheckoutFrom
in devfile, This PR implements the sameWhich issue(s) this PR fixes:
Fixes #4257
PR acceptance criteria:
Unit test
Integration test
Documentation
I have read the test guidelines
How to test changes / Special notes to the reviewer:
Specify revision as shown above in devfile, revision could be a tag or branch. odo should download the starter project from specified branch/tag