diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..8e71033 Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index cece00e..2a9fd09 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ If `yes`, require remote host SSH key is defined in the `~/.ssh/known_hosts` fil ### Limitations * The plugin needs to clone the full repo on the local directory path (Base Directory option) to get the file that will be added to the resource model. -* Any time that you edit the nodes on the GUI, the commit will be perfomed with the message `Edit node from GUI` (it is not editable) +* Any time that you edit the nodes on the GUI, the commit will be performed with the message `Edit node from GUI` (it is not editable) ## Workflow Steps @@ -78,13 +78,13 @@ This plugin can clone/pull, add, commit, and push a git repository via 4 Workflo * `ssh://[user@]host.xz[:port]/path/to/repo.git/` * `git://host.xz[:port]/path/to/repo.git/` * `http[s]://host.xz[:port]/path/to/repo.git/` + * `https[s]://user@github.com/account/repo.git` * `ftp[s]://host.xz[:port]/path/to/repo.git/` * `rsync://host.xz/path/to/repo.git/` - ##### Authentication -* **Password Storage Path**: Password storage path to authenticate remotely +* **Password Storage Path**: Password storage path to authenticate remotely. This can be an Access Token - such as a Github access token. * **SSH: Strict Host Key Checking**: Use strict host key checking. If `yes`, require remote host SSH key is defined in the `~/.ssh/known_hosts` file, otherwise do not verify. * **SSH Key Storage Path**: SSH Key storage path to authenticate diff --git a/build.gradle b/build.gradle index 4f48eed..fc6fd9d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'pl.allegro.tech.build.axion-release' version '1.15.4' + id 'pl.allegro.tech.build.axion-release' version '1.16.1' } group 'com.rundeck' @@ -36,12 +36,12 @@ configurations { dependencies { implementation 'org.codehaus.groovy:groovy-all:3.0.9' - testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation group: 'junit', name: 'junit', version: '4.13.1' - implementation group: 'org.rundeck', name: 'rundeck-core', version: '4.15.0-20230725' + implementation group: 'org.rundeck', name: 'rundeck-core', version: '5.1.0-rc2-20240124' implementation 'org.slf4j:slf4j-api:1.7.30' - pluginLibs( 'org.eclipse.jgit:org.eclipse.jgit:5.13.2.202306221912-r') { + pluginLibs('org.eclipse.jgit:org.eclipse.jgit:6.6.1.202309021850-r') { exclude module: 'slf4j-api' exclude module: 'jsch' exclude module: 'commons-logging' diff --git a/images/.DS_Store b/images/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/images/.DS_Store differ diff --git a/images/clone-workflow-step.png b/images/clone-workflow-step.png index f498581..636d5ab 100644 Binary files a/images/clone-workflow-step.png and b/images/clone-workflow-step.png differ diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000..5c7cb3f Binary files /dev/null and b/src/.DS_Store differ diff --git a/src/main/groovy/com/rundeck/plugin/GitAddWorkflowStep.groovy b/src/main/groovy/com/rundeck/plugin/GitAddWorkflowStep.groovy index 2c9ec85..6acdc72 100644 --- a/src/main/groovy/com/rundeck/plugin/GitAddWorkflowStep.groovy +++ b/src/main/groovy/com/rundeck/plugin/GitAddWorkflowStep.groovy @@ -43,7 +43,7 @@ class GitAddWorkflowStep implements StepPlugin, Describable{ PropertyUtil.string(GIT_BASE_DIRECTORY, "Base Directory", "Directory to add to.", true, null, null, null, renderingOptionsConfig)) .property(PropertyUtil.string(GIT_ADD_FILE_PATTERN, "File Pattern", '''File Pattern of files to be added. - See [addFilepattern](http://archive.eclipse.org/jgit/docs/jgit-2.0.0.201206130900-r/apidocs/org/eclipse/jgit/api/AddCommand.html#addFilepattern(java.lang.String)) for more details.''', true, +See [addFilepattern](http://archive.eclipse.org/jgit/docs/jgit-2.0.0.201206130900-r/apidocs/org/eclipse/jgit/api/AddCommand.html#addFilepattern(java.lang.String)) for more details.''', true, ".",null,null, renderingOptionsConfig)) .property(PropertyUtil.bool(GIT_LOG_DISABLE, "Disable log output", "Enabling this flag, the plugin will not show the output log", true, "false",null, renderingOptionsConfig)) diff --git a/src/main/groovy/com/rundeck/plugin/GitCloneWorkflowStep.groovy b/src/main/groovy/com/rundeck/plugin/GitCloneWorkflowStep.groovy index 20e29a8..d33045a 100644 --- a/src/main/groovy/com/rundeck/plugin/GitCloneWorkflowStep.groovy +++ b/src/main/groovy/com/rundeck/plugin/GitCloneWorkflowStep.groovy @@ -52,14 +52,14 @@ class GitCloneWorkflowStep implements StepPlugin, Describable{ PropertyUtil.string(GIT_BASE_DIRECTORY, "Base Directory", "Directory for checkout.", true, null, null, null, renderingOptionsConfig)) .property(PropertyUtil.string(GIT_URL, "Git URL", '''Checkout url. - See [git-clone](https://www.kernel.org/pub/software/scm/git/docs/git-clone.html) - specifically the [GIT URLS](https://www.kernel.org/pub/software/scm/git/docs/git-clone.html#URLS) section. - Some examples: - * `ssh://[user@]host.xz[:port]/path/to/repo.git/` - * `git://host.xz[:port]/path/to/repo.git/` - * `http[s]://host.xz[:port]/path/to/repo.git/` - * `ftp[s]://host.xz[:port]/path/to/repo.git/` - * `rsync://host.xz/path/to/repo.git/`''', true, +See [git-clone](https://www.kernel.org/pub/software/scm/git/docs/git-clone.html) +specifically the [GIT URLS](https://www.kernel.org/pub/software/scm/git/docs/git-clone.html#URLS) section. +Some examples: +* `ssh://[user@]host.xz[:port]/path/to/repo.git/` +* `git://host.xz[:port]/path/to/repo.git/` +* `http[s]://host.xz[:port]/path/to/repo.git/` +* `ftp[s]://host.xz[:port]/path/to/repo.git/` +* `rsync://host.xz/path/to/repo.git/`''', true, null,null,null, renderingOptionsConfig)) .property(PropertyUtil.string(GIT_BRANCH, "Branch", "Checkout branch.", true, "master",null,null, renderingOptionsConfig)) @@ -139,7 +139,7 @@ If `yes`, require remote host SSH key is defined in the `~/.ssh/known_hosts` fil }catch(Exception e){ logger.log(0, e.getMessage()) - throw new StepException("Error ${op} VM.", GitFailureReason.AuthenticationError) + throw new StepException("Error with Authentication ${e.getMessage()}", GitFailureReason.AuthenticationError) } diff --git a/src/main/groovy/com/rundeck/plugin/GitCommitWorkflowStep.groovy b/src/main/groovy/com/rundeck/plugin/GitCommitWorkflowStep.groovy index 0f5b4f7..7add372 100644 --- a/src/main/groovy/com/rundeck/plugin/GitCommitWorkflowStep.groovy +++ b/src/main/groovy/com/rundeck/plugin/GitCommitWorkflowStep.groovy @@ -54,14 +54,14 @@ class GitCommitWorkflowStep implements StepPlugin, Describable{ PropertyUtil.string(GIT_BASE_DIRECTORY, "Base Directory", "Directory to commit.", true, null, null, null, renderingOptionsConfig)) .property(PropertyUtil.string(GIT_URL, "Git URL", '''Checkout url. - See [git-commit](https://www.kernel.org/pub/software/scm/git/docs/git-commit.html) - specifically the [GIT URLS](https://www.kernel.org/pub/software/scm/git/docs/git-push.html#URLS) section. - Some examples: - * `ssh://[user@]host.xz[:port]/path/to/repo.git/` - * `git://host.xz[:port]/path/to/repo.git/` - * `http[s]://host.xz[:port]/path/to/repo.git/` - * `ftp[s]://host.xz[:port]/path/to/repo.git/` - * `rsync://host.xz/path/to/repo.git/`''', true, +See [git-commit](https://www.kernel.org/pub/software/scm/git/docs/git-commit.html) +specifically the [GIT URLS](https://www.kernel.org/pub/software/scm/git/docs/git-push.html#URLS) section. +Some examples: +* `ssh://[user@]host.xz[:port]/path/to/repo.git/` +* `git://host.xz[:port]/path/to/repo.git/` +* `http[s]://host.xz[:port]/path/to/repo.git/` +* `ftp[s]://host.xz[:port]/path/to/repo.git/` +* `rsync://host.xz/path/to/repo.git/`''', true, null,null,null, renderingOptionsConfig)) .property(PropertyUtil.string(GIT_MESSAGE, "Message", "Commit Message.", true, "Rundeck Commit",null,null, renderingOptionsConfig)) diff --git a/src/main/groovy/com/rundeck/plugin/GitPushWorkflowStep.groovy b/src/main/groovy/com/rundeck/plugin/GitPushWorkflowStep.groovy index 9f8ccde..5a17402 100644 --- a/src/main/groovy/com/rundeck/plugin/GitPushWorkflowStep.groovy +++ b/src/main/groovy/com/rundeck/plugin/GitPushWorkflowStep.groovy @@ -51,14 +51,14 @@ class GitPushWorkflowStep implements StepPlugin, Describable{ PropertyUtil.string(GIT_BASE_DIRECTORY, "Base Directory", "Directory to push.", true, null, null, null, renderingOptionsConfig)) .property(PropertyUtil.string(GIT_URL, "Git URL", '''Checkout url. - See [git-push](https://www.kernel.org/pub/software/scm/git/docs/git-push.html) - specifically the [GIT URLS](https://www.kernel.org/pub/software/scm/git/docs/git-push.html#URLS) section. - Some examples: - * `ssh://[user@]host.xz[:port]/path/to/repo.git/` - * `git://host.xz[:port]/path/to/repo.git/` - * `http[s]://host.xz[:port]/path/to/repo.git/` - * `ftp[s]://host.xz[:port]/path/to/repo.git/` - * `rsync://host.xz/path/to/repo.git/`''', true, +See [git-push](https://www.kernel.org/pub/software/scm/git/docs/git-push.html) +specifically the [GIT URLS](https://www.kernel.org/pub/software/scm/git/docs/git-push.html#URLS) section. +Some examples: +* `ssh://[user@]host.xz[:port]/path/to/repo.git/` +* `git://host.xz[:port]/path/to/repo.git/` +* `http[s]://host.xz[:port]/path/to/repo.git/` +* `ftp[s]://host.xz[:port]/path/to/repo.git/` +* `rsync://host.xz/path/to/repo.git/`''', true, null,null,null, renderingOptionsConfig)) .property(PropertyUtil.bool(GIT_LOG_DISABLE, "Disable log output", "Enabling this flag, the plugin will not show the output log", true, "false",null, renderingOptionsConfig))