This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.time.TimeCategory | |
import org.sonatype.nexus.repository.storage.Asset | |
import org.sonatype.nexus.repository.storage.Component | |
import org.sonatype.nexus.repository.storage.Query | |
import org.sonatype.nexus.repository.storage.StorageFacet | |
def repo = repository.repositoryManager.get("sq-docker") | |
StorageFacet storageFacet = repo.facet(StorageFacet) | |
def tx = storageFacet.txSupplier().get() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node('yona'){ | |
stage('Build'){ | |
... | |
} | |
} | |
stage('Decide tag on Docker Hub'){ | |
env.TAG_ON_DOCKER_HUB = input message: 'User input required', | |
parameters: [choice(name: 'Tag on Docker Hub', choices: 'no\nyes', description: 'Choose "yes" if you want to deploy this build')] | |
} | |
if (env.TAG_ON_DOCKER_HUB == 'yes'){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby_block "Wait for the broker to finish starting up" do | |
block do | |
attempts = 0 | |
while (attempts < 120) | |
res = Chef::ShellOut.new("cat /logs/jmsbroker.log | grep B1039") | |
res.run_command | |
if (res.exitstatus == 0) | |
break | |
end | |
attempts += 1 |