Skip to content

Instantly share code, notes, and snippets.

View kellyrob99's full-sized avatar

Kelly Robinson kellyrob99

View GitHub Profile
import groovy.json.JsonSlurper
import org.sonatype.nexus.repository.storage.Asset
import org.sonatype.nexus.repository.storage.StorageFacet
def DOCKER_REPOSITORY_NAME = 'docker-hosted'
def dockerRepository = repository.repositoryManager.get(DOCKER_REPOSITORY_NAME)
def dockerBlobStore = blobStore.blobStoreManager.get(dockerRepository.configuration.attributes.storage.blobStoreName)
def storageTx = dockerRepository.facet(StorageFacet.class).txSupplier().get()
try {
@mkutz
mkutz / Jenkinsfile
Last active June 8, 2021 17:21
Configure global libraries in Jenkins (see https://jenkins.io/doc/book/pipeline/shared-libraries/) using a post-initialization script (see https://wiki.jenkins.io/display/JENKINS/Post-initialization+script)
@Library("my-other-jenkins-lib@other-version") _
pipeline {
agent any
environment {
SECRET_TEXT = credentials("googleChatWebhookCommonSystemTestsStatus")
}