forked from redhat-developer/odo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding sparseCheckoutDir functionality to devfiles (redhat-developer#…
…3042) * Initial commit * added devfile * added tests * commented out tests * change to validpath statement * changed method of extracting zip * changed pathsToUnzip to pathToUnzip * Added error message when no files are unzipped * cleaned up conditional prefix trim * Changes from feedback * feedback changes and unit tests for util func * check for empty pathToUnzip * changed error message format * cleaned up path separator for windows * fixed return pathToUnzip * use hassuffix * moved to function * fromslash * minor fixes * lowercase fix for test
- Loading branch information
Showing
5 changed files
with
197 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
47 changes: 47 additions & 0 deletions
47
tests/examples/source/devfiles/nodejs/devfile-with-sparseCheckoutDir.yaml
This file contains 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,47 @@ | ||
apiVersion: 1.0.0 | ||
metadata: | ||
name: test-devfile | ||
projects: | ||
- | ||
name: nodejs-web-app | ||
source: | ||
type: git | ||
location: "https://github.com/che-samples/web-nodejs-sample.git" | ||
sparseCheckoutDir: /app/ | ||
components: | ||
- type: dockerimage | ||
image: quay.io/eclipse/che-nodejs10-ubi:nightly | ||
endpoints: | ||
- name: "3000/tcp" | ||
port: 3000 | ||
alias: runtime | ||
env: | ||
- name: FOO | ||
value: "bar" | ||
memoryLimit: 1024Mi | ||
mountSources: true | ||
commands: | ||
- name: build | ||
actions: | ||
- type: exec | ||
component: runtime | ||
command: "npm install" | ||
workdir: ${CHE_PROJECTS_ROOT}/nodejs-web-app/app | ||
- name: devbuild | ||
actions: | ||
- type: exec | ||
component: runtime | ||
command: "npm install" | ||
workdir: ${CHE_PROJECTS_ROOT}/nodejs-web-app/app | ||
- name: run | ||
actions: | ||
- type: exec | ||
component: runtime | ||
command: "nodemon app.js" | ||
workdir: ${CHE_PROJECTS_ROOT}/nodejs-web-app/app | ||
- name: devrun | ||
actions: | ||
- type: exec | ||
component: runtime | ||
command: "nodemon app.js" | ||
workdir: ${CHE_PROJECTS_ROOT}/nodejs-web-app/app |
This file contains 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