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

Upgrade plugin to parent version 1.424 #12

Merged
merged 11 commits into from
Jul 25, 2013

Conversation

olivierdagenais
Copy link
Member

Implemented the new SCM methods, including the new method of polling for changes.

Also refactored a bit of code to reduce duplication.

Manual testing:

  1. Ran mvn and copied the resulting target/tfs.hpi to a Jenkins server running version 1.424, restarting it to make sure my version was picked up. (the Jenkins server is running under Windows)
  2. Double-checked same by navigating to http://jenkins.example.com/pluginManager/installed and confirming that the version listed was 1.21-SNAPSHOT (private-06/24/2013 20:52-odagenais).
  3. Created a job that uses the TFS SCM, forced it to execute on a Linux agent (which has TEE CLC installed) and manually triggered its build. Success. Recorded changeset number displayed in log (let's call it 42).
  4. Configured that job's polling to every minute and saved it. Refreshed http://jenkins.example.com/job/<jobName>/scmPollLog/ until I saw that it ran. The log contains -version:C42~D2013-06-18T19:43:40Z which confirms the new polling method is being run. Awesome.
  5. Edit the job and changed its Project path to an entirely different path and saved the job again. Refreshed the Polling Log page until the "Started on" time was different. When it was different, this time the log didn't even include a call to tf history, it completed in 6 ms with "Changes found". Double awesome. A build was automatically triggered, whose console output contained the line Deleting workspace as the configuration has changed since a build was performed on this computer.. Recorded changeset number displayed in log (let's call it 27).
  6. Visited the Polling Log page one last time, confirming that it again was using the new method and that there were no changes: -version:C27~D2013-06-18T19:50:40Z
  7. Checked that jobs created before the TFS plugin was upgraded gracefully degraded to the old method of polling after upgrading the plugin and that the upgrade did not needlessly cause new builds to be triggered. Triggered builds both by SCM change and manually and confirmed that in both cases, they switched to the new polling method afterwards.
    Mission accomplished!

1 - Extracted the getExclusiveToTimestamp() method to prevent copy-pasting.
2 - Extracted the getRangeSpecification() method to remove duplication and add support for changesets.
3 - Added new constructor overloads.
4 - Made the CC-735 workaround more consistent between both the detailed and brief history implementations, and added support for fromTimestamp being null.
5 - Added tests.
1 - Added getBriefHistory() method overload that wraps command when querying from a given changeset.
2 - Added TODOs for upcoming work.
@buildhive
Copy link

Jenkins » tfs-plugin #12 SUCCESS
This pull request looks good
(what's this?)

In those cases, baseline is SCMRevisionState.None and thus we fall back to the old polling method.
@buildhive
Copy link

Jenkins » tfs-plugin #13 SUCCESS
This pull request looks good
(what's this?)

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

<artifactId>plugin</artifactId>
<version>1.324</version>
<relativePath>../pom.xml</relativePath>
<version>1.519</version>
Copy link
Member

Choose a reason for hiding this comment

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

Is such a new version of Jenkins really required? E.g., try to use an old LTS version, e.g. 1.424.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, no problem.

@buildhive
Copy link

Jenkins » tfs-plugin #14 SUCCESS
This pull request looks good
(what's this?)

olivierdagenais added a commit that referenced this pull request Jul 25, 2013
Upgrade plugin to parent version 1.424
@olivierdagenais olivierdagenais merged commit 67a4fe8 into jenkinsci:master Jul 25, 2013
@olivierdagenais olivierdagenais deleted the upgradePlugin branch July 25, 2013 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants