Is there any way to get information in a downstream job about SCM changes in the upstream one?
For example if we have a build job (with SCM polling) which triggers some testing jobs, how testing job could retrieve and show in dashboard information about SCM changes in build job which triggers this test job?
Not sure about Hudson, but for Jenkins we use Blame Subversion plugin.
Related
I have snyk integrated with my github repos which use npm, and it's a nice free tool to detect vulnerabilities in the repos, but I'm getting constant emails about updates in package.json and for simple things as a patch version update in a unimportant dependency.
Is there a possibility for the snyk account to automatically not only open Pull Requests, but also merge them without my intervention, as long as they pass the test?
I believe this can be done for the repo via GitHub itself, by checking the "Allow auto-merge" option:
How would one make a job in Jenkins that polls source
control (i.e. mercurial) as a triggers it to execute the job, but
without actually clone/pull the monitored repo?
If it already has a local clone and you just don't want to update it can run hg incoming whose exit code lets you know if there's new stuff. If you don't have a local clone you'll need to run something like hgweb on the box that's serving the repo and then poll the raw version of the latest commit and watch for changes: http://hg.intevation.org/mercurial/crew/raw-rev/tip
This link Is there a way to keep Hudson / Jenkins configuration files in source control? shows how to save Hudson configuration changes to an SCM (i.e. a "backup with history")
My question is: can the Hudson configuration be pulled from an SCM. In other words, to change a job configuration, you add a changeset to the SCM repository first. Hudson, at the start of a build, pulls the configuration from the SCM and runs as usual.
Of course, it would also be ideal to make the entire job configuration screen read-only (or as minimal as possible).
Why would I want this?
I want the SCM to be where a configuration change is begun. Why? So
the changesets in the SCM reflect when the configuration change was
done in the flow of changesets for the project, i.e. it imposes a
chronological ordering to the project changes.
I don't want to use the security feature (i.e. no need for a login, etc)
I searched and could only find plugins for backing up or saving the configuration, but none that "pulled" the .xml files.
Thanks,
John
I haven't tried it myself, but you might be able to do this with a custom build that does the following on a schedule:
Sync all of the job configuration files from your SCM into the Hudson jobs directory
Do an HTTP GET to [Your Hudson URL]/reload - this is the equivalent of clicking the "Reload Configuration from Disk" link on the "Manage Hudson" page.
I don't think you could have each job update its own configuration from SCM every time it runs, because the configuration will have already been loaded by the time the job polls the SCM for changes.
Is there a tool out there (preferably web-based) which would automatically detect commits to a BitBucket repository, and at that time, copy all files in the repository to a web-server via FTP?
I basically want a quick and painless way (if one exists) to set up continuous integration between my BitBucket repository and my website.
No build/compilation step would be necessary, since these are only front-end (HTML/CSS/Javascript) files.
The changegroup hook is the way to do this. See Hooks for info about what to do with it.
I've used changegroup hooks on my own hg repositories, but not in BitBucket; it's possible that the BitBucket servers are restricted in what you can do, I'm not sure. I do know a wget/curl attempt to rebuild a manual upon my server upon updating its contents in a repository on SourceForge failed for me because they've locked up their servers too tightly (sending an email from the hook would work but not http access). I would expect BitBucket to be set up better; a quick search for "bitbucket changegroup hook" doesn't seem to indicate that there are any problems with it. Try it and see!
I would like our Hudson deploy job to output a changelog of all Subversion changes since last deploy. Any ideas to how that is done?
It turns out that Hudson automatically generates a list of changes since last build.
And since we set up deployment in Hudson, each deployment has a list of commits along with their changes. The Hudson email-ext plugin makes them available as $CHANGES, so that it for instance can send an email with $CHANGES in the email body.
Of course, there are limits to this approach: Only changes since last deploy are here. So if you manually stop deployment, or the deployment build breaks, then the next changelog only contains changes since that. And not since last successful deployment.
Also see a related discussion in the Stackoverflow question Sending Subversion Change Log Info Via Hudson
Add a build step in your hudson job that runs a shell script:
svn log -r HEAD:PREV > ./changelog
To generate a change list of the changes since the last commit.
You can also do a log -r by date/date-range.
Can you determine your last deploy (I assume you may not deploy with every build.) Some more information about your process will help.
If you tag your deployments with a normalised pattern it would be fairly simple to create a counter that would allow you to get the right SVN revision.