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
#!/bin/bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
source /bath/to/bash-getopt | |
foo_dflt="wibble" | |
bash-getopt "$@" <<END_OPTS |
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/sh | |
############################################################################# | |
## Usage: cfvalidate file.template [ file ...] | |
############################################################################## | |
## Convenience wrapper script for aws cli 'cloudformation validate-template' | |
## which requires a inline, file URL or S3 url for templates to validate | |
## This script takes simple, absolute or relative filenames and validate them | |
## using the AWS API | |
## https://aws.amazon.com/cli/ | |
## |
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
/* | |
* Vairiadic Macros used in this form are portable to MSVC and GCC | |
* https://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html#Varia | |
* https://msdn.microsoft.com/en-us/library/ms177415(v=vs.100).aspx | |
*/ | |
#include <stdio.h> | |
#if __GNUC__ | |
#define __FUNCSIG__ __PRETTY_FUNCTION__ | |
#endif |
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
Demonstrate invoking the internal /eval xdbc endpoint on a HTTP server in MarkLogic to create a Redirect. | |
Note that there are simplier and easier ways to accomplish this, e.g using the user defined error handler or | |
rewriting to a endpoint that calls xdmp:redirect-response(). This example shows that it can be done 'out of the box' | |
by utilizing the builtin support for XDBC handling. | |
On Port 8000 in the default installation, and on any new REST servers a block of the declarative rewriter dispatches | |
XDBC requests to the internal XCDBC endpoints directly. | |
The xdbc.xml attached file shows the relevent block of XML. The enableing factor is the use of <dispatch xdbc="true">. | |
A custom rewriter can rewrite any request to one of the builtin endpoints ( /eval, /invoke , /spawn , /insert ) and then dispatch to xdbc. |
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 | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
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/35852475/how-to-use-the-default-aws-credentials-chain-for-an-s3-backed-maven-repository-i | |
apply plugin: 'java' | |
apply plugin: 'maven-publish' | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { |
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
#! /usr/bin/python | |
# Same as rpmname.sh but using rpmUtils python library | |
import sys | |
import re | |
import rpmUtils.transaction | |
from rpmUtils.miscutils import splitFilename | |
from rpmUtils.miscutils import hdrFromPackage | |
from rpmUtils.miscutils import pkgTupleFromHeader | |
ts = rpmUtils.transaction.initReadOnlyTransaction() |
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
#! /usr/bin/python | |
# Print the 'NEVRA' of an rpm file using its path only | |
# This is what yum tools does when given only an rpm filename | |
import sys | |
import re | |
from rpmUtils.miscutils import splitFilename | |
for path in sys.argv[1:]: | |
x = path[path.rfind( '/' )+1:] | |
# print "Path: {0} File: {1}".format(path,x) |
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
#! /usr/bin/python | |
# normalize an rpm path. | |
# Given an rpm file print its normalized path as name-version-release-arch.rpm | |
# Note: this reads the metadata from the rpm file itself to generate the path | |
import sys | |
import re | |
import rpmUtils.transaction | |
from rpmUtils.miscutils import splitFilename | |
from rpmUtils.miscutils import hdrFromPackage | |
from rpmUtils.miscutils import pkgTupleFromHeader |
OlderNewer