Put in pom.xml
a variable version:
<version>${my.artifact.version}</version>
And set this variable in mvn
command line:
mvn -Dmy.artifact.version=1.0-$(date +%Y%m%d%H%M%S) deploy
yum install -y gcc python-devel openssl-devel epel-release | |
yum install -y python-pip | |
pip install ansible |
Put in pom.xml
a variable version:
<version>${my.artifact.version}</version>
And set this variable in mvn
command line:
mvn -Dmy.artifact.version=1.0-$(date +%Y%m%d%H%M%S) deploy
10.0.0.1.nip.io maps to 10.0.0.1
app.10.0.0.1.nip.io maps to 10.0.0.1
customer1.app.10.0.0.1.nip.io maps to 10.0.0.1
customer2.app.10.0.0.1.nip.io maps to 10.0.0.1
otherapp.10.0.0.1.nip.io maps to 10.0.0.1
mvn dependency:copy -Dartifact=org.yaml:snakeyaml:1.18 -DoutputDirectory=. -Dmdep.stripVersion=true |
import hudson.model.* | |
// in order to pass environment variables into build, EnvInjectPlugin should be installed | |
import org.jenkinsci.plugins.envinject.EnvInjectPluginAction | |
println Hudson.instance.getItem('down_stream_job_name').scheduleBuild2( | |
5, // quiet period | |
new ParametersAction( // build parameters | |
new StringParameterValue('STR_PARAM', 'Its value'), // string parameter | |
new BooleanParameterValue('BOOL_PARAM', true) // boolean parameter | |
), |
- connection: local | |
hosts: localhost | |
tasks: | |
- debug: | |
msg: "{{ ('secretword' | password_hash('sha256', 'salt_string')).split('$')[-1][:16] }}" | |
var ADMIN_USER = 'root'; | |
var ADMIN_PASS = 'ass4' + ADMIN_USER | |
var NEW_USER = 'dummy'; | |
var TARGET_DB = 'mydb'; | |
var conn = new Mongo(); | |
var admDb = conn.getDB('admin'); | |
try { | |
admDb.createUser({user: ADMIN_USER, | |
pwd: ADMIN_PASS, |
#!/usr/bin/env python | |
# to connect it using curl: | |
# curl -H 'Authorization: Token 9d003d9a-2288-46b8-bfeb-7cec1eb53074' http://my.host.name/api/my_collection/ | |
import eve | |
class MyTokenAuth(eve.auth.TokenAuth): | |
def check_auth(self, token, allowed_roles, resource, method): | |
return token == '9d003d9a-2288-46b8-bfeb-7cec1eb53074' |
ALLOW_UNKNOWN = True | |
DOMAIN = {'col01': {'schema': {}}} | |
IF_MATCH = False | |
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE'] | |
MONGO_DBNAME = 'db01' | |
RESOURCE_METHODS = ['GET', 'POST', 'DELETE'] | |
URL_PREFIX = 'api' |
import org.yaml.snakeyaml.Yaml | |
new Yaml().load(new FileReader('path/to/your/yaml/file')) | |
// and do whatenver your want with the returned map |