The artifactory gradle plugin ( https://www.jfrog.com/confluence/display/RTF/Gradle+Artifactory+Plugin )
documents a property to skip publications.
artifactoryPublish.skip = true
However this doesnt fully disable artifactory. It still publishes a "Build" with no artifacts.
To conditionally skip a publication the following code block seems to work.
This is useful, for example, if you want the same build to run in a CI server and standalone
and/or if you want to run test or dev builds without publishing then rerun the same build
with only a property change to have it publish - reguardless of if artifactoryPublish task is invoked.
This file contains 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
# backup files from a docker volume into /tmp/backup.tar.gz | |
# from http://stackoverflow.com/questions/21597463/how-to-port-data-only-volumes-from-one-host-to-another | |
function docker-volume-backup-compressed() { | |
docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie tar -czvf /backup/backup.tar.gz "${@:2}" | |
} | |
# restore files from /tmp/backup.tar.gz into a docker volume | |
function docker-volume-restore-compressed() { | |
docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie tar -xzvf /backup/backup.tar.gz "${@:2}" | |
echo "Double checking files..." | |
docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie ls -lh "${@:2}" |
This file contains 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
// from: http://stackoverflow.com/questions/3732109/simple-http-server-in-java-using-only-java-se-api | |
import java.io.*; | |
import javax.xml.ws.*; | |
import javax.xml.ws.http.*; | |
import javax.xml.transform.*; | |
import javax.xml.transform.stream.*; | |
@WebServiceProvider | |
@ServiceMode(value = Service.Mode.PAYLOAD) | |
public class Server implements Provider<Source> { |
This file contains 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
Docker defauilts to taking over netowrks 172.17.0.0. | |
If this conflicts with other tools such as a VPN which you cannot control, | |
you can change the default bridge. This is easier if you have never started docker. | |
You wouldnt be reading this if that were the case. | |
So how to get out of the mess ? | |
# Bug reports / rfc | |
https://github.com/docker/docker/issues/8696 | |
# Set the ip of the Docker bridge with Systemd |
This file contains 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
# Convert an existing docker container into a "docker run" command line. | |
# | |
# This is useful when trying to debug containers that have been created | |
# by orchestration tools. | |
# | |
# Install jq: stedolan.github.io/jq/ | |
# Improved version that handles ports, volumes, binds | |
function format_run() { | |
cid=$1 |
This file contains 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
#!/bin/bash | |
aws ec2 describe-images --owners amazon --filters "Name=state,Values=available" \ | |
"Name=architecture,Values=x86_64" \ | |
"Name=root-device-type,Values=ebs" \ | |
"Name=virtualization-type,Values=hvm" \ | |
"Name=block-device-mapping.volume-type,Values=gp2" \ | |
"Name=hypervisor,Values=xen" \ | |
--query 'Images[?Description!=null]|[?contains(Description,`Amazon Linux`) == `true`]|\ | |
[?contains(Description,` NAT `)==`false`]|[?contains(Description,` ECS `)==`false`]|\ | |
sort_by(@, &CreationDate)[-1]' |
This file contains 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
// from: http://www.rgagnon.com/javadetails/java-have-a-simple-http-server.html | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.net.InetSocketAddress; | |
import com.sun.net.httpserver.HttpExchange; | |
import com.sun.net.httpserver.HttpHandler; | |
import com.sun.net.httpserver.HttpServer; | |
/* |
This file contains 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
{ "variables": { | |
"amznrepo" : "file:///var/repo", | |
"version" : "1.0", | |
"repository" : "nexstra/createrepo", | |
"baseImage" : "amazonlinux:latest", | |
"yumrepo" : "", | |
"amznrepo" : "/space/amazonlinux/repo", | |
"yumrepod" : "{{pwd}}/../yum.repos.d", | |
"awsEcr" : "{{env `AWS_ECR`}}", | |
"doEcrLogin" : "true" |
This file contains 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
2017/09/14 22:19:50 [INFO] Packer version: 1.1.0 | |
2017/09/14 22:19:50 Packer Target OS/Arch: linux amd64 | |
2017/09/14 22:19:50 Built with Go Version: go1.9 | |
2017/09/14 22:19:50 Detected home directory from env var: /home/dlee | |
2017/09/14 22:19:50 Using internal plugin for alicloud-ecs | |
2017/09/14 22:19:50 Using internal plugin for amazon-ebs | |
2017/09/14 22:19:50 Using internal plugin for azure-arm | |
2017/09/14 22:19:50 Using internal plugin for lxc | |
2017/09/14 22:19:50 Using internal plugin for vmware-vmx | |
2017/09/14 22:19:50 Using internal plugin for file |
This file contains 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
#!/bin/env python | |
import yaml | |
import sys | |
import json | |
import argparse | |
from subprocess import Popen, PIPE | |
import argparse | |
import os |
NewerOlder