-
Notifications
You must be signed in to change notification settings - Fork 100
Added commands to install&update devon4node and cicdgen #280
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
Merged
hohwille
merged 9 commits into
devonfw:master
from
dario-rodriguez:feature/devon4node-cicdgen
Oct 29, 2019
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
69bf142
Added commands to install&update devon4node and cicdgen
dario-rodriguez 0dcaea6
Merge branch 'master' of https://github.com/devonfw/ide into feature/…
dario-rodriguez d610580
Merge branch 'master' into feature/devon4node-cicdgen
hohwille cc8a70c
Merge branch 'feature/devon4node-cicdgen' of https://github.com/dario…
dario-rodriguez 5d2a6ca
Modified node and cicdgen commands. Updated documentation for those c…
dario-rodriguez ffde339
Solved problems in node command
dario-rodriguez a35f1fa
Merge branch 'master' of https://github.com/devonfw/ide into feature/…
dario-rodriguez e3d6abb
Added cicd to java, ng, node commands
dario-rodriguez b22f42a
Merge branch 'master' into feature/devon4node-cicdgen
hohwille File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,19 @@ | ||
| :toc: | ||
| toc::[] | ||
|
|
||
| = cicdgen | ||
|
|
||
| The `cicdgen` commandlet allows to install and setup https://github.com/devonfw/cicdgen[cicdgen]. | ||
| The arguments (`devon cicdgen «args»`) are explained by the following table: | ||
|
|
||
| .Usage of `devon cicdgen` | ||
| [options="header"] | ||
| |======================= | ||
| |*Argument(s)* |*Meaning* | ||
| |`setup` |setup cicdgen (install and verify) | ||
| |`update` |update cicdgen (reinstall with @latest version and verify) | ||
| |`java «args»` |generate cicd files for the currect devon4java project | ||
| |`ng «args»` |generate cicd files for the currect devon4ng project | ||
| |`node «args»` |generate cicd files for the currect devon4node project | ||
| |`«args»` |call cicdgen with the specified arguments | ||
| |======================= | ||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,35 +1,35 @@ | ||
| = devonfw ide | ||
| == Integrated Development Environment | ||
| include::Home[leveloffset=2] | ||
| include::features[leveloffset=2] | ||
| include::setup[leveloffset=2] | ||
| include::usage[leveloffset=2] | ||
| include::license[leveloffset=2] | ||
| include::structure[leveloffset=2] | ||
| include::cli[leveloffset=2] | ||
| include::variables[leveloffset=2] | ||
| include::configuration[leveloffset=2] | ||
| include::scripts[leveloffset=2] | ||
| include::settings[leveloffset=2] | ||
| include::software[leveloffset=2] | ||
| include::integration[leveloffset=2] | ||
| include::advanced-tooling[leveloffset=2] | ||
| include::eclipse-plugins[leveloffset=2] | ||
| = devonfw ide | ||
|
|
||
| == Integrated Development Environment | ||
|
|
||
| include::Home[leveloffset=2] | ||
|
|
||
| include::features[leveloffset=2] | ||
|
|
||
| include::setup[leveloffset=2] | ||
|
|
||
| include::usage[leveloffset=2] | ||
|
|
||
| include::license[leveloffset=2] | ||
|
|
||
| include::structure[leveloffset=2] | ||
|
|
||
| include::cli[leveloffset=2] | ||
|
|
||
| include::variables[leveloffset=2] | ||
|
|
||
| include::configuration[leveloffset=2] | ||
|
|
||
| include::scripts[leveloffset=2] | ||
|
|
||
| include::settings[leveloffset=2] | ||
|
|
||
| include::software[leveloffset=2] | ||
|
|
||
| include::integration[leveloffset=2] | ||
|
|
||
| include::advanced-tooling[leveloffset=2] | ||
|
|
||
| include::eclipse-plugins[leveloffset=2] | ||
|
|
||
|
|
This file contains hidden or 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 hidden or 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 hidden or 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,72 @@ | ||
| #!/usr/bin/env bash | ||
| # shellcheck source=scripts/functions | ||
| source "$(dirname "${0}")"/../functions | ||
|
|
||
| # $1: optional setup | ||
| function doSetup() { | ||
| if command -v cicdgen &> /dev/null || [ "${1}" != "update" ] | ||
| then | ||
| if [ "${1}" = "setup" ] | ||
| then | ||
| echo "cicdgen is already installed at $(command -v cicdgen)" | ||
| exit | ||
| fi | ||
| else | ||
| doDevonCommand npm -q setup | ||
| local npm_command="${DEVON_IDE_HOME}/software/node/npm" | ||
| if [ ! -x "${npm_command}" ] | ||
| then | ||
| npm_command="${DEVON_IDE_HOME}/software/node/bin/npm" | ||
| fi | ||
| doRunCommand "'${npm_command}' install -g @devonfw/cicdgen@latest" "install cicdgen" | ||
| fi | ||
| } | ||
|
|
||
| doRunCicdgen() { | ||
| doSetup | ||
| cicdgen generate "${@}" | ||
| } | ||
|
|
||
| function printCicdgenHelp() { | ||
| echo "Setup or update cicdgen CLI." | ||
| echo | ||
| echo "Arguments:" | ||
| echo "setup setup cicdgen (install and verify)" | ||
| echo "update update cicdgen (reinstall with @latest version and verify)" | ||
| echo "java «args» generate cicd files for the currect devon4java project: $PWD" | ||
| echo "ng «args» generate cicd files for the currect devon4ng project: $PWD" | ||
| echo "node «args» generate cicd files for the currect devon4node project: $PWD" | ||
| echo "«args» call cicdgen with the specified arguments" | ||
| echo | ||
| echo "Options:" | ||
| exit | ||
| } | ||
|
|
||
| #CLI | ||
| case ${1} in | ||
| "help" | "-h") | ||
| printCicdgenHelp | ||
| ;; | ||
| "setup" | "s") | ||
| doSetup setup | ||
| ;; | ||
| "update") | ||
| doSetup update | ||
| ;; | ||
| "java") | ||
| shift | ||
| doRunCicdgen devon4j "${@}" | ||
| ;; | ||
| "ng") | ||
| shift | ||
| doRunCicdgen devon4ng "${@}" | ||
| ;; | ||
| "node") | ||
| shift | ||
| doRunCicdgen devon4node "${@}" | ||
| ;; | ||
| *) | ||
| doSetup | ||
| cicdgen "${@}" | ||
| ;; | ||
| esac |
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.