Link to these links: https://git.io/vKSVZ
Module 1:
- Run jenkins from war file:
jenkins -jar jenkins.war
- Run jenkins from docker:
docker run -d \
--restart unless-stopped \
--name jenkins \
stage 'CI' | |
node { | |
git branch: 'jenkins2-course', | |
url: 'https://github.com/g0t4/solitaire-systemjs-course' | |
// pull dependencies from npm | |
// on windows use: bat 'npm install' | |
sh 'npm install' |
Link to these links: https://git.io/vKSVZ
Module 1:
jenkins -jar jenkins.war
docker run -d \
--restart unless-stopped \
--name jenkins \
<?xml version='1.0' encoding='UTF-8'?> | |
<project> | |
<actions/> | |
<description></description> | |
<keepDependencies>false</keepDependencies> | |
<properties/> | |
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.5.2"> | |
<configVersion>2</configVersion> | |
<userRemoteConfigs> | |
<hudson.plugins.git.UserRemoteConfig> |
From my Pluralsight course: https://app.pluralsight.com/library/courses/asynchronous-javascript-reasoning/table-of-contents
version: '2' | |
services: | |
teamcity: | |
image: sjoerdmulder/teamcity | |
ports: | |
- 8111:8111 | |
teamcity-agent: | |
image: sjoerdmulder/teamcity-agent | |
environment: |
var normalize = System.normalize; | |
System.normalize = function (name, parentName, parentAddress) { | |
console.log("normalize: " + JSON.stringify({ | |
name: name, | |
parentName: parentName, | |
parentAddress: parentAddress | |
})); | |
return normalize.call(this, name, parentName, parentAddress); | |
}; |
private QueryAnalysis[] GetQueriesToAnalyze() | |
{ | |
var queries = _Project.GetRulesInProjectFileAndInRuleFilesAndDeclaredInSourceCode(_Analysis.RulesExtractedFromCode).RootParent; | |
var activeQueries = queries.GetActiveQueries(); | |
var compiledQueriesByQueryString = GetCompiledQueriesByQueryString(activeQueries); | |
var justMyCode = queries.ComputeJustMyCode(_Analysis.CodeBase); | |
return activeQueries | |
.Select(query => new QueryAnalysis(query, compiledQueriesByQueryString[query.QueryString], justMyCode, _Project)) | |
.ToArray(); |
public class ArgumentBuilder(private val runnerParameters: Map<String, String>) { | |
public fun build(): List<String> { | |
return arrayListOf<String>() | |
.addIfSet("--Project", RunnerSettings.PROJECT_FILE) | |
.addIfSet("--Output", RunnerSettings.OUTPUT) | |
.addFlagIfSet("--Flag1", RunnerSettings.FLAG_1) | |
.addFlagIfSet("--Flag2", RunnerSettings.FLAG_2) | |
.addFlagIfSet("--Flag3", RunnerSettings.FLAG_3) | |
.addMultipleIfSet("--InputFiles", RunnerSettings.INPUTS) |
/** | |
* Provide a means to fluently tap into a chain of method calls so as not to need to declare unnecessary variables | |
* */ | |
public fun <T : Any, R> T.tap(tap: (T) -> R): T { | |
tap(this) | |
return this | |
} | |
// here's an example where I'm in a fluent builder and I'd like to log the URI of the request without introducing a variable | |
val response = this.builds.queryParam("locator", "buildType:{buildTypeId},count:1,personal:false,canceled:false") |