Skip to content

Instantly share code, notes, and snippets.

View andrast0th's full-sized avatar
🐷
Focusing

Andras Toth andrast0th

🐷
Focusing
  • Cluj-Napoca, Romania
View GitHub Profile
@oliverdaff
oliverdaff / NexusArtifactCleanup.groovy
Created March 29, 2012 05:47
Clean up nexus artifacts with API
import groovyx.net.http.*;
import static groovyx.net.http.ContentType.*;
import static groovyx.net.http.Method.*;
class NexusArtifactCleanup {
/**
* Settings in which to run script.
*/
@ftclausen
ftclausen / Jenkinsfile
Created April 13, 2017 05:36
Jenkins pipeline - An approach to get all commits since the last successful build.
// -*- mode: groovy -*-
// vim: set filetype=groovy :
node( 'some_node' ) {
stage( "Phase 1" ) {
sshagent( credentials: [ 'some_creds' ] ) {
checkout scm
def lastSuccessfulCommit = getLastSuccessfulCommit()
def currentCommit = commitHashForBuild( currentBuild.rawBuild )
if (lastSuccessfulCommit) {