Skip to content
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

Fix for the Jenkins tables to divs migration #11

Merged
merged 6 commits into from
Dec 22, 2020
Merged

Fix for the Jenkins tables to divs migration #11

merged 6 commits into from
Dec 22, 2020

Conversation

FarmGeek4Life
Copy link

This fixes issues that occur as of Jenkins 2.264:

  • Formatting problems under the system managed files view (when creating/editing a managed script)
  • Major formatting issues with the project configuration and likely issues with saving configuration updates.

This PR will not successfully build on the Jenkins CI server until PR #9 is merged; PRs #7 and #10 should also be merged beforehand (after PR #9 is merged and they build successfully)

@timja
Copy link
Member

timja commented Nov 25, 2020

this is https://issues.jenkins.io/browse/JENKINS-64275

@imod are you still maintaining this / able to cut a release? the plugin is broken on > 2.263

@imod
Copy link
Member

imod commented Nov 30, 2020

@timja not actively anymore - this plugin is looking for a new maintainer

https://groups.google.com/g/jenkinsci-dev/c/aCmm2MyydNA/m/_WogLPs7AgAJ

@FarmGeek4Life
Copy link
Author

Force-pushed to fix commit metadata (My git config somehow managed to drop my email address)

@FarmGeek4Life
Copy link
Author

@timja - What's the best process to move this forward? I'm not interested in becoming the maintainer of this plugin, but these changes do need to be merged and released for continued support. Could we get someone with access to merge PR #9 so that these other PRs at least have a chance at passing the checks?

@timja
Copy link
Member

timja commented Dec 1, 2020

@imod happy for me to pick this up for one release? I have no interest in actually maintaining it, but i can get the tables to divs fix out and handle any regression related to it

@imod
Copy link
Member

imod commented Dec 1, 2020

@timja I'm happy to do so if everything would still work, but for some reason my credentials are not valid anymore - i can't upload new artifacts and i don't have the time to figure out what to do

@timja
Copy link
Member

timja commented Dec 1, 2020

@timja I'm happy to do so if everything would still work, but for some reason my credentials are not valid anymore - i can't upload new artifacts and i don't have the time to figure out what to do

all passwords were reset back in March or so,

Go to https://beta.accounts.jenkins.io/ to reset it

@imod
Copy link
Member

imod commented Dec 1, 2020

@timja i tried to reset the password - i did not get an email when requesting a reset (tried multiple times)

@timja
Copy link
Member

timja commented Dec 1, 2020

@MarkEWaite and @olblak either of you available to take a look

@FarmGeek4Life
Copy link
Author

FarmGeek4Life commented Dec 1, 2020

I was doing some job configuration today and noticed something that I should probably add to this, but won't have time today to look into it.
Detail - it was showing blank boxes around the argument specification, in this case for a managed script that didn't even have any arguments set.

But, this issue is not a breaking issue, just a bug.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for the patches!

@AjaxLeVallee
Copy link

Just waiting on the plugin maintainers to approve it, it looks?

@timja
Copy link
Member

timja commented Dec 22, 2020

@gbigenios you planning to 🚢 this soon?

@gbigenios gbigenios merged commit fe7bfc7 into jenkinsci:master Dec 22, 2020
@gbigenios
Copy link

@timja sorry, I'm new to this. I've merged pull requests #10 and #11. what happens next?

@timja
Copy link
Member

timja commented Dec 22, 2020

@timja sorry, I'm new to this. I've merged pull requests #10 and #11. what happens next?

@gbigenios https://www.jenkins.io/doc/developer/publishing/releasing/

@FarmGeek4Life FarmGeek4Life deleted the tables-to-divs branch December 23, 2020 08:01
@gbigenios
Copy link

@timja thanks for the link. I've tried lots of things out but can't get past the error below. Maybe it's windows/ssh key set up/maven config/git config. I'm not sure. I need to wait until next year for some assistance from my it-admin.
Sorry

Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project managed-scripts: Unable to commit files
Provider message:
The git-push command failed.
Command output:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

@timja
Copy link
Member

timja commented Dec 23, 2020

Basically you need to make it so that

ssh git@github.com works

@gbigenios
Copy link

I did ssh -vT git@github.com
and it works fine:

debug1: Authentication succeeded (publickey).
Authenticated to github.com ([140.82.121.3]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Hi gbigenios! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2720, received 2468 bytes, in 0.2 seconds
Bytes per second: sent 13816.9, received 12536.8
debug1: Exit status 1

@timja
Copy link
Member

timja commented Dec 23, 2020

Is there more output from the failed release?

@gbigenios
Copy link

C:\Java\jdk8u202-b08\bin\java.exe -Dmaven.multiModuleProjectDirectory=C:\Projects\managed-scripts-plugin "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.1\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.1\lib\idea_rt.jar=63239:C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.1\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2020.2.3 release:prepare release:perform [INFO] Scanning for projects... [INFO] [INFO] ---------------< org.jenkinsci.plugins:managed-scripts >---------------- [INFO] Building Managed Scripts 1.5-SNAPSHOT [INFO] --------------------------------[ hpi ]--------------------------------- [INFO] [INFO] --- maven-release-plugin:2.5.3:prepare (default-cli) @ managed-scripts --- [INFO] Verifying that there are no local modifications... [INFO] ignoring changes on: **\pom.xml.next, **\release.properties, **\pom.xml.branch, **\pom.xml.tag, **\pom.xml.backup, **\pom.xml.releaseBackup [INFO] Executing: cmd.exe /X /C "git rev-parse --show-toplevel" [INFO] Working directory: C:\Projects\managed-scripts-plugin [INFO] Executing: cmd.exe /X /C "git status --porcelain ." [INFO] Working directory: C:\Projects\managed-scripts-plugin [WARNING] Ignoring unrecognized line: ?? release.properties [INFO] Checking dependencies and plugins for snapshots ... What is the release version for "Managed Scripts"? (org.jenkinsci.plugins:managed-scripts) 1.5: : 1.5.1 What is SCM release tag or label for "Managed Scripts"? (org.jenkinsci.plugins:managed-scripts) managed-scripts-1.5.1: : managed-scripts-1.5.1 What is the new development version for "Managed Scripts"? (org.jenkinsci.plugins:managed-scripts) 1.5.2-SNAPSHOT: : 1.6-SNAPSHOT [INFO] Transforming 'Managed Scripts'... [INFO] Not generating release POMs [INFO] Executing goals 'clean install'... [INFO] Executing: cmd.exe /X /C ""C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.1\plugins\maven\lib\maven3\bin\mvn" -s C:\Users\whitej\AppData\Local\Temp\release-settings5875224585527664876.xml clean install --no-plugin-updates" [WARNING] Command line option -npu is deprecated and will be removed in future Maven versions. [INFO] Scanning for projects... [INFO] [INFO] ---------------< org.jenkinsci.plugins:managed-scripts >---------------- [INFO] Building Managed Scripts 1.5.1 [INFO] --------------------------------[ hpi ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ managed-scripts --- [INFO] Deleting C:\Projects\managed-scripts-plugin\target [INFO] [INFO] --- maven-hpi-plugin:3.17:validate (default-validate) @ managed-scripts --- [INFO] [INFO] --- maven-hpi-plugin:3.17:validate-hpi (default-validate-hpi) @ managed-scripts --- [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:display-info (display-info) @ managed-scripts --- [INFO] Maven Version: 3.6.3 [INFO] JDK Version: 1.8.0_202 normalized as: 1.8.0-202 [INFO] OS Info: Arch: amd64 Family: windows Name: windows 10 Version: 10.0 [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (display-info) @ managed-scripts --- [INFO] Adding ignore: module-info [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (no-snapshots-in-release) @ managed-scripts --- [INFO] [INFO] --- gmavenplus-plugin:1.11.0:addTestSources (test-in-groovy) @ managed-scripts --- [INFO] [INFO] --- maven-localizer-plugin:1.26:generate (default) @ managed-scripts --- [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ managed-scripts --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 26 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ managed-scripts --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 8 source files to C:\Projects\managed-scripts-plugin\target\classes [INFO] /C:/Projects/managed-scripts-plugin/src/main/java/org/jenkinsci/plugins/managedscripts/PowerShellConfig.java: Some input files use or override a deprecated API. [INFO] /C:/Projects/managed-scripts-plugin/src/main/java/org/jenkinsci/plugins/managedscripts/PowerShellConfig.java: Recompile with -Xlint:deprecation for details. [INFO] [INFO] --- access-modifier-checker:1.16:enforce (default-enforce) @ managed-scripts --- [INFO] [INFO] --- maven-hpi-plugin:3.17:insert-test (default-insert-test) @ managed-scripts --- [INFO] [INFO] --- gmavenplus-plugin:1.11.0:generateTestStubs (test-in-groovy) @ managed-scripts --- [INFO] No sources specified for stub generation. Skipping. [INFO] Generated 0 stubs. [INFO] [INFO] --- maven-antrun-plugin:3.0.0:run (createTempDir) @ managed-scripts --- [INFO] Executing tasks [INFO] [mkdir] Created dir: C:\Projects\managed-scripts-plugin\target\tmp [INFO] Executed tasks [INFO] [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ managed-scripts --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory C:\Projects\managed-scripts-plugin\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ managed-scripts --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to C:\Projects\managed-scripts-plugin\target\test-classes [INFO] [INFO] --- maven-hpi-plugin:3.17:test-hpl (default-test-hpl) @ managed-scripts --- [INFO] Generating C:\Projects\managed-scripts-plugin\target\test-classes\the.hpl [INFO] [INFO] --- maven-hpi-plugin:3.17:resolve-test-dependencies (default-resolve-test-dependencies) @ managed-scripts --- [INFO] [INFO] --- gmavenplus-plugin:1.11.0:compileTests (test-in-groovy) @ managed-scripts --- [INFO] No sources specified for compilation. Skipping. [INFO] [INFO] --- maven-surefire-plugin:3.0.0-M4:test (default-test) @ managed-scripts --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running InjectedTest [INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.419 s - in InjectedTest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- animal-sniffer-maven-plugin:1.19:check (check) @ managed-scripts --- [INFO] Resolved signature org.codehaus.mojo.signature:java18 version as 1.0 from dependencyManagement [INFO] Checking unresolved references to org.codehaus.mojo.signature:java18:1.0 [INFO] [INFO] --- maven-license-plugin:1.8:process (default) @ managed-scripts --- [INFO] Generated C:\Projects\managed-scripts-plugin\target\managed-scripts\WEB-INF\licenses.xml [INFO] [INFO] --- maven-hpi-plugin:3.17:hpi (default-hpi) @ managed-scripts --- [INFO] Generating C:\Projects\managed-scripts-plugin\target\managed-scripts\META-INF\MANIFEST.MF [INFO] Checking for attached .jar artifact ... [INFO] Generating jar C:\Projects\managed-scripts-plugin\target\managed-scripts.jar [INFO] Building jar: C:\Projects\managed-scripts-plugin\target\managed-scripts.jar [INFO] Exploding webapp... [INFO] Copy webapp webResources to C:\Projects\managed-scripts-plugin\target\managed-scripts [INFO] Assembling webapp managed-scripts in C:\Projects\managed-scripts-plugin\target\managed-scripts [INFO] Generating hpi C:\Projects\managed-scripts-plugin\target\managed-scripts.hpi [INFO] Building jar: C:\Projects\managed-scripts-plugin\target\managed-scripts.hpi [INFO] [INFO] --- maven-jar-plugin:3.2.0:test-jar (maybe-test-jar) @ managed-scripts --- [INFO] Skipping packaging of the test-jar [INFO] [INFO] >>> spotbugs-maven-plugin:4.1.4:check (spotbugs) > :spotbugs @ managed-scripts >>> [INFO] [INFO] --- spotbugs-maven-plugin:4.1.4:spotbugs (spotbugs) @ managed-scripts --- [INFO] Fork Value is true [INFO] Done SpotBugs Analysis.... [INFO] [INFO] <<< spotbugs-maven-plugin:4.1.4:check (spotbugs) < :spotbugs @ managed-scripts <<< [INFO] [INFO] [INFO] --- spotbugs-maven-plugin:4.1.4:check (spotbugs) @ managed-scripts --- [INFO] BugInstance size is 0 [INFO] Error size is 0 [INFO] No errors/warnings found [INFO] [INFO] --- maven-install-plugin:3.0.0-M1:install (default-install) @ managed-scripts --- [INFO] Installing C:\Projects\managed-scripts-plugin\target\managed-scripts.hpi to C:\Users\whitej\.m2\repository\org\jenkinsci\plugins\managed-scripts\1.5.1\managed-scripts-1.5.1.hpi [INFO] Installing C:\Projects\managed-scripts-plugin\pom.xml to C:\Users\whitej\.m2\repository\org\jenkinsci\plugins\managed-scripts\1.5.1\managed-scripts-1.5.1.pom [INFO] Installing C:\Projects\managed-scripts-plugin\target\managed-scripts.jar to C:\Users\whitej\.m2\repository\org\jenkinsci\plugins\managed-scripts\1.5.1\managed-scripts-1.5.1.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 24.062 s [INFO] Finished at: 2020-12-23T14:55:32+01:00 [INFO] ------------------------------------------------------------------------ [INFO] Checking in modified POMs... [INFO] Executing: cmd.exe /X /C "git add -- pom.xml" [INFO] Working directory: C:\Projects\managed-scripts-plugin [INFO] Executing: cmd.exe /X /C "git rev-parse --show-toplevel" [INFO] Working directory: C:\Projects\managed-scripts-plugin [INFO] Executing: cmd.exe /X /C "git status --porcelain ." [INFO] Working directory: C:\Projects\managed-scripts-plugin [WARNING] Ignoring unrecognized line: ?? pom.xml.releaseBackup [WARNING] Ignoring unrecognized line: ?? release.properties [INFO] Executing: cmd.exe /X /C "git commit --verbose -F C:\Users\whitej\AppData\Local\Temp\maven-scm-1758342707.commit pom.xml" [INFO] Working directory: C:\Projects\managed-scripts-plugin [INFO] Executing: cmd.exe /X /C "git symbolic-ref HEAD" [INFO] Working directory: C:\Projects\managed-scripts-plugin [INFO] Executing: cmd.exe /X /C "git push git@github.com:jenkinsci/managed-scripts-plugin.git refs/heads/master:refs/heads/master" [INFO] Working directory: C:\Projects\managed-scripts-plugin [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 53.356 s [INFO] Finished at: 2020-12-23T14:55:34+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project managed-scripts: Unable to commit files [ERROR] Provider message: [ERROR] The git-push command failed. [ERROR] Command output: [ERROR] git@github.com: Permission denied (publickey). [ERROR] fatal: Could not read from remote repository. [ERROR] [ERROR] Please make sure you have the correct access rights [ERROR] and the repository exists. [ERROR] [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@timja
Copy link
Member

timja commented Dec 23, 2020

Did you run the ssh command from the same terminal as the release? Wondering if there’s something in your IntelliJ terminal that isn’t working right

@juliohm1978
Copy link

Hi, I've been following the release of this new version with interest.

The error message relates to the ssh key used to access github.

Command output: [ERROR] git@github.com: Permission denied (publickey).

IntelliJ should inherit the environment from the shell that spawned it. I'm not sure, but it looks like your ssh key is protected with a passphrase. In that case, it is possible that the keys are not loaded in the context where IntellJ is running. One thing you could try is to load ssh keys into the ssh-agent using a terminal window (that leads to passphrase prompt) and start IntelliJ from that same session.

@gbigenios
Copy link

@juliohm1978 thanks for your help. It took a fair bit of trial and error but that was definitely the direction to go. I reconfigured my IntelliJ to use git bash as the terminal. Then in the IntelliJ-Terminal window I could start the ssh agent in the background:
eval $(ssh-agent -s)
then load the key into the agent
ssh-add ~/.ssh/id_rsa
after that the ssh -vT git@github.com ran without me having to enter the passphrase. And finally I could run the mvn release step: mvn release:prepare release:perform

I think one of my trial-runs messed up with the Tag "1.5" so I created this build as managed-scripts-1.5.1 and the next one is 1.6-SNAPSHOT.

The output of the release step is here (looks okay to me):
git-bash-terminal-mvn-release.txt

So I'm hoping it will magically appear here at some point: https://plugins.jenkins.io/managed-scripts/#releases
(at least I don't see any more steps in the doc: https://www.jenkins.io/doc/developer/publishing/releasing/ )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants