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
#!/usr/bin/env bash | |
source tc-props.bash | |
echo "Running on $agent_name" | |
echo "Deploying $org_app_version to $org_deploy_server..." | |
# ... |
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
#!/bin/bash | |
#kcpasswordEncode (20210911) Copyright (c) 2021 Joel Bruner (https://github.com/brunerd) | |
#Licensed under the MIT License | |
#given a string creates data for /etc/kcpassword | |
function kcpasswordEncode { | |
#ascii string | |
local thisString="${1}" | |
local i |
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
#!/bin/bash | |
set -e | |
CONFIG=$@ | |
for line in $CONFIG; do | |
eval "$line" | |
done | |
AUTH="X-API-Token: $token" | |
CONTENT_TYPE=application/vnd.android.package-archive |
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
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
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 hudson.model.* | |
// extract the version tag from the console log | |
def version_pattern = ".*\\[\\s*INFO\\s*\\]\\s+VERSION=(.*)\\s*\$" | |
def matcher = manager.getLogMatcher( version_pattern ) | |
if ( matcher?.matches() ) { | |
// add the version string to the job summary | |
def ver = matcher.group(1) | |
manager.addInfoBadge( "Version: $ver" ) |
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 hudson.FilePath | |
import jenkins.model.Jenkins | |
import com.cloudbees.hudson.plugins.folder.* | |
Jenkins jkns = Jenkins.instance | |
def build_vars = build.buildVariables | |
def base_folder_name = build_vars['baseFolderName'] | |
def build_proj_file = 'ServerBuild.proj' | |
def tier = (build_vars['assembliesTier'].toInteger() - 1) |
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
source "https://rubygems.org" | |
gem "octokit" |
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['agent']['visualstudio']['versions'].each do |vs| | |
directory "#{Chef::Config[:file_cache_path]}\\visualstudio\\#{vs.version}\\" do | |
action :create | |
recursive true | |
end | |
remote_file "#{Chef::Config[:file_cache_path]}\\visualstudio\\#{vs.version}\\#{vs.installer}" do | |
action :create | |
source "#{node['agent']['software_repo_root']}/microsoft/vs#{vs.version}/#{vs.installer}" | |
checksum vs.checksum |
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
#!/usr/bin/knife exec | |
# Knife exec script to put the contents of a file into a data bag, then encrypt it. | |
# Care of : https://www.coveros.com/chef-knife-script-for-encrypting-a-file-a-data-bag/ | |
########### USAGE ############ | |
this_file = File.basename(__FILE__) | |
usage = <<-EOS | |
#{this_file}: Encrypts and stores the contents of a file into a data bag item. This | |
is typically used to encrypt and store the contents of a PEM file. | |
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
Commands | |
-------- | |
Run on nodes | |
# knife ssh "name:macOS2*" "sudo DEVELOPER_DIR=/Library/Developer/CommandLineTools/ chef-client" -x [user] -P | |
Data Bags | |
--------- | |
If not already have secret key: |
NewerOlder