Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
ansible Add Ansible support - initial MVP (#175) Aug 3, 2018
custom Generates documentation for bash scripts; fixes gh-165 Jul 16, 2018
k8s Added support for Kubernetes with Minikube for Jenkins (#86) Sep 15, 2017
projectType Added support for dotnet Aug 7, 2018
zsdoc Added support for dotnet Aug 7, 2018
.gitignore Generates documentation for bash scripts; fixes gh-165 Jul 16, 2018
BASH_SCRIPTS.adoc Added dotnet to readme Aug 7, 2018
README.adoc Added dotnet to readme Aug 7, 2018
build_and_upload.sh More rigorous script execution Jul 25, 2018
build_api_compatibility_check.sh More rigorous script execution Jul 25, 2018
pipeline-ansible.sh Add Ansible support - initial MVP (#175) Aug 3, 2018
pipeline-cf.sh using -r switch in jq to get rid of double quotes in json (#185) Aug 10, 2018
pipeline-k8s.sh using -r switch in jq to get rid of double quotes in json (#185) Aug 10, 2018
pipeline.sh Added support for dotnet Aug 7, 2018
prod_complete.sh More rigorous script execution Jul 25, 2018
prod_deploy.sh More rigorous script execution Jul 25, 2018
prod_rollback.sh Spinnaker (#181) Aug 3, 2018
stage_deploy.sh More rigorous script execution Jul 25, 2018
stage_e2e.sh More rigorous script execution Jul 25, 2018
test_deploy.sh More rigorous script execution Jul 25, 2018
test_rollback_deploy.sh Spinnaker (#181) Aug 3, 2018
test_rollback_smoke.sh More rigorous script execution Jul 25, 2018
test_smoke.sh More rigorous script execution Jul 25, 2018

README.adoc

SCRIPTS

Table of Contents

pipeline.sh(1)

NAME

pipeline.sh - a shell script

SYNOPSIS

Contains interfaces for all essential functions for different steps of deployment pipeline.

Sources: - projectType/pipeline-projectType.sh - pipeline-${paasType}.sh (e.g. pipeline-cf.sh) - custom/${scriptName}.sh (e.g. custom/build_and_upload.sh)

Essentially, the scripts implementing the functions can be divided into 2 types.

1) Build related 2) Deployment related

The build related scripts need to define how to build an application. E.g. for Java we’re using Maven or Gradle to build a project. For other languages other frameworks and approaches would be applicable. You can arbitrarily chose the language type via the LANGUAGE_TYPE env variable or via the language_type pipeline descriptor entry. That value, via convention, gets applied to the string [projectType/pipeline-${languageType}.sh] that represents a file that we will source in order to apply all the build functions. The deployment related scripts need to define how to upload the application. For Java and Cloud Foundry we’re using the CF CLI to push the binary to PAAS. For NPM we’re pushing sources. You can arbitrarily chose the platform type via the PAAS_TYPE env variable That value, via convention, gets applied to the string [pipeline-${paasType}.sh] that represents a file that we will source in order to apply all the deployment functions.

FUNCTIONS

apiCompatibilityCheck
build
completeSwitchOver
defineProjectSetup
deleteService
deployService
deployServices
envNodeExists
executeApiCompatibilityCheck
extractVersionFromProdTag
findLatestProdTag
getMainModulePath
latestProdTagFromGit
outputFolder
parsePipelineDescriptor
prepareForE2eTests
prepareForSmokeTests
prodDeploy
projectType
removeProdTag
retrieveAppName
retrieveGroupId
retrieveStubRunnerIds
rollbackToPreviousVersion
runE2eTests
runSmokeTests
serviceExists
stageDeploy
testDeploy
testResultsAntPattern
testRollbackDeploy
toLowerCase
trimRefsTag
yaml2json

DETAILS

Script Body

Has 49 line(s). Calls functions:

Script-Body
|-- defineProjectSetup
|   `-- parsePipelineDescriptor
`-- parsePipelineDescriptor

Uses feature(s): export, source

Exports (environment): BINARY_ARTIFACT_TYPE_NAME // CUSTOM_SCRIPT_IDENTIFIER // DEFAULT_PROJECT_NAME // DOWNLOADABLE_SOURCES // GIT_BIN // LANGUAGE_TYPE // LOWERCASE_ENV // OUTPUT_FOLDER // PAAS_TYPE // PIPELINE_DESCRIPTOR // PROJECT_NAME // PROJECT_SETUP // ROOT_PROJECT_DIR // SOURCE_ARTIFACT_TYPE_NAME // TEST_REPORTS_FOLDER

apiCompatibilityCheck

# Execute api compatibility check step. Uses the LATEST_PROD_TAG or PASSED_LATEST_PROD_TAG
# env vars if latest production tag has already been retrieved. If not will call the
# [findLatestProdTag] function to retrieve the latest production tag.
#
# Requires the [PROJECT_NAME] env variable to be set. Otherwise will not be able to
# parse the latest production tag. As a reminder, latest production tag should be of
# structure [dev/appName/version] or [prod/appName/version].

Has 20 line(s). Calls functions:

apiCompatibilityCheck
`-- executeApiCompatibilityCheck

Uses feature(s): export

Called by:

build_api_compatibility_check.sh/Script-Body

List of exports (to environment): LATEST_PROD_TAG // PASSED_LATEST_PROD_TAG

Environment variables used: OUTPUT_FOLDER // PROJECT_NAME // LATEST_PROD_TAG // PASSED_LATEST_PROD_TAG

build

# Build the application and produce a binary. Most likely you'll upload that binary somewhere

Has 3 line(s). Doesn’t call other functions.

Called by:

build_and_upload.sh/Script-Body

completeSwitchOver

# Deletes the old, Blue binary from the production environment

Has 2 line(s). Doesn’t call other functions.

Called by:

prod_complete.sh/Script-Body

defineProjectSetup

# Defines the project setup. Takes into consideration the location of the pipeline
# descriptor, project name, main module path etc.
# Sets the [PROJECT_SETUP], [ROOT_PROJECT_DIR] env vars.
# Uses [PROJECT_NAME] env var and [getMainModulePath] functions

Has 32 line(s). Calls functions:

defineProjectSetup
`-- parsePipelineDescriptor

Called by:

Script-Body

Environment variables used: PROJECT_NAME // PROJECT_SETUP // PIPELINE_DESCRIPTOR_PRESENT

deleteService

# Contract for deleting a service with name $1 and type $2
#
# $1 - service name
# $2 - service type

Has 5 line(s). Doesn’t call other functions.

Called by:

deployServices

deployService

# Contract for deploying a single service with name $1 and type $2
#
# $1 - service name
# $2 - service type

Has 5 line(s). Doesn’t call other functions.

Called by:

deployServices

deployServices

# Deploys services assuming that pipeline descriptor exists
# For TEST environment first deletes, then deploys services
# For other environments only deploys a service if it wasn't there.
# Uses ruby and jq

Has 28 line(s). Calls functions:

deployServices
|-- deleteService
|-- deployService
|-- envNodeExists
`-- parsePipelineDescriptor

Uses feature(s): read

Called by:

pipeline-cf.sh/stageDeploy
pipeline-cf.sh/testDeploy
pipeline-k8s.sh/testDeploy

Environment variables used: LOWERCASE_ENV // PARSED_YAML // test_smoke.sh → ENVIRONMENT

envNodeExists

# Returns 0 if environment $1 node exists in the pipeline descriptor, 1 if it doesn't.
# Requires the [PARSED_YAML] env var to contain the parsed descriptor
#
# $1 - name of the environment (e.g. test)

Has 8 line(s). Doesn’t call other functions.

Called by:

deployServices
pipeline-cf.sh/propagatePropertiesForTests

Environment variables used: PARSED_YAML

executeApiCompatibilityCheck

# Execute api compatibility check step for the given latest production version $1
#
# $1 - retrieved latest production version

Has 3 line(s). Doesn’t call other functions.

Called by:

apiCompatibilityCheck

extractVersionFromProdTag

# Extracts the version from the production tag

Has 2 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

findLatestProdTag

# Echoes the latest prod tag from git with trimmed refs part. Uses the
# LATEST_PROD_TAG and PASSED_LATEST_PROD_TAG env vars if latest production tag
# was already found. If not, retrieves the latest prod tag via [latestProdTagFromGit]
# function and sets the [PASSED_LATEST_PROD_TAG] and [LATEST_PROD_TAG] env vars with
# the trimmed prod tag. Trimming occurs via the [trimRefsTag] function

Has 11 line(s). Doesn’t call other functions.

Uses feature(s): export

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

List of exports (to environment): LATEST_PROD_TAG // PASSED_LATEST_PROD_TAG

Environment variables used: LATEST_PROD_TAG // PASSED_LATEST_PROD_TAG

getMainModulePath

# Gets the build coordinates from descriptor. Requires the [PARSED_YAML] to parse
# otherwise returns empty main module

Has 10 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: PARSED_YAML

latestProdTagFromGit

# Echos latest productino tag from git

Has 3 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: GIT_BIN // PROJECT_NAME

outputFolder

# Returns the folder where the built binary will be stored.
# Example: 'target/' - for Maven, 'build/' - for Gradle etc.

Has 3 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

parsePipelineDescriptor

# Sets the [PARSED_YAML] environment variable with contents of the parsed pipeline
# descriptor assuming that the file described by the [PIPELINE_DESCRIPTOR] env variable
# is present. If that's the case sets the [PIPELINE_DESCRIPTOR_PRESENT] to [true]
# shellcheck disable=SC2120

Has 13 line(s). Doesn’t call other functions.

Uses feature(s): export

Called by:

Script-Body
defineProjectSetup
deployServices
pipeline-cf.sh/prepareForSmokeTests
pipeline-cf.sh/testRollbackDeploy
pipeline-k8s.sh/testRollbackDeploy

List of exports (to environment): PARSED_YAML // PIPELINE_DESCRIPTOR_PRESENT

Environment variables used: PIPELINE_DESCRIPTOR // PARSED_YAML

prepareForE2eTests

# Prepares environment for smoke tests. Logs in to PAAS etc.

Has 2 line(s). Doesn’t call other functions.

Called by:

stage_e2e.sh/Script-Body

prepareForSmokeTests

# Prepares environment for smoke tests. Retrieves the latest production
# tags, exports all URLs required for smoke tests, etc.

Has 3 line(s). Doesn’t call other functions.

Called by:

test_rollback_smoke.sh/Script-Body
test_smoke.sh/Script-Body

prodDeploy

# Will deploy the Green binary next to the Blue one, on the production environment

Has 2 line(s). Doesn’t call other functions.

Called by:

prod_deploy.sh/Script-Body

projectType

# Returns the type of the project basing on the cloned sources.
# Example: MAVEN, GRADLE etc

Has 3 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

removeProdTag

# Removes production tag.
# Uses [PROJECT_NAME] and [PIPELINE_VERSION]

Has 4 line(s). Doesn’t call other functions.

Called by:

prod_rollback.sh/Script-Body

Environment variables used: GIT_BIN // PROJECT_NAME

retrieveAppName

# Echos the name of the application
# JVM world corresponds to a group id of a project

Has 2 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

retrieveGroupId

# Echos the namespace that corresponds to the given application. In the
# JVM world corresponds to a group id of a project

Has 3 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

retrieveStubRunnerIds

# Retrieves the ids for Spring Cloud Contract Stub Runner. If you don't use
# Stub Runner, overriding this method is not mandatory. The format of the IDS is
# [groupId:artifactId:version:classifier:port]. E.g. [com.example:foo:1.0.0.RELEASE:stubs:1234]

Has 3 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

rollbackToPreviousVersion

# Will rollback to blue instance

Has 2 line(s). Doesn’t call other functions.

Called by:

prod_rollback.sh/Script-Body

runE2eTests

# Executes end to end tests. Profits from env vars set by 'prepareForE2eTests'

Has 2 line(s). Doesn’t call other functions.

Called by:

stage_e2e.sh/Script-Body

runSmokeTests

# Executes smoke tests. Profits from env vars set by 'prepareForSmokeTests'

Has 2 line(s). Doesn’t call other functions.

Called by:

test_rollback_smoke.sh/Script-Body
test_smoke.sh/Script-Body

serviceExists

# Contract for verification if a service exists
#
# $1 - service type
# $2 - service name

Has 6 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

stageDeploy

# Deploy binaries and required services to stage environment

Has 2 line(s). Doesn’t call other functions.

Called by:

stage_deploy.sh/Script-Body

testDeploy

# Deploy binaries and required services to test environment

Has 2 line(s). Doesn’t call other functions.

Called by:

test_deploy.sh/Script-Body

testResultsAntPattern

# Returns the ant pattern for the test results.
# Example: '**/test-results/*.xml' - for Maven, '**/surefire-reports/*' - for Gradle etc.

Has 3 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

testRollbackDeploy

# Deploy binaries and required services to test environment for rollback testing

Has 2 line(s). Doesn’t call other functions.

Called by:

test_rollback_deploy.sh/Script-Body

toLowerCase

# Converts a string $1 to lower case
#
# $1 - string to convert

Has 1 line(s). Doesn’t call other functions.

Called by:

pipeline-cf.sh/getArtifactType

trimRefsTag

# Extracts latest prod tag

Has 2 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

yaml2json

# Converts YAML to JSON - uses ruby

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

pipeline-projectType.sh(1)

NAME

pipeline-projectType.sh - a shell script

SYNOPSIS

Script that knows how to define the type of the project. Scans for presence of files or the language type configuration.

FUNCTIONS

getLanguageType
guessLanguageType

DETAILS

Script Body

Has 24 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).

Uses feature(s): source

getLanguageType

# Gets the language type from the parsed descriptor. Returns empty if it's not present
# or if [language_type] node is not present in the descriptor.
# Uses [PARSER_YAML] env var

Has 10 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

guessLanguageType

# Tries to guess the language type basing on the contents of the repository

Has 11 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

pipeline-jvm.sh(1)

NAME

pipeline-jvm.sh - a shell script

SYNOPSIS

Script that knows how to define the concrete type of the JVM project. Scans for presence of files.

FUNCTIONS

downloadAppBinary
isGradleProject
isMavenProject
projectType

DETAILS

Script Body

Has 21 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).

Uses feature(s): export, source

Exports (environment): BINARY_EXTENSION // MAVEN_OPTS // PROJECT_TYPE // projectType

downloadAppBinary

# Fetches a JAR from a binary storage
#
# $1 - URL to repo with binaries
# $2 - group id of the packaged sources
# $3 - artifact id of the packaged sources
# $4 - version of the packaged sources

Has 21 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: BINARY_EXTENSION

isGradleProject

# Returns true if Gradle Wrapper is used

Has 1 line(s). Doesn’t call other functions.

Called by:

projectType

isMavenProject

# Returns true if Maven Wrapper is used

Has 1 line(s). Doesn’t call other functions.

Called by:

projectType

projectType

# JVM implementation of projectType

Has 7 line(s). Calls functions:

projectType
|-- isGradleProject
`-- isMavenProject

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

pipeline-maven.sh(1)

NAME

pipeline-maven.sh - a shell script

SYNOPSIS

Contains all Maven related build functions

FUNCTIONS

build
executeApiCompatibilityCheck
extractMavenProperty
outputFolder
printTestResults
retrieveAppName
retrieveGroupId
retrieveStubRunnerIds
runE2eTests
runSmokeTests
testResultsAntPattern

DETAILS

Script Body

Has 24 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).

Uses feature(s): export

Exports (environment): BUILD_OPTIONS // MAVENW_BIN // build // executeApiCompatibilityCheck // outputFolder // retrieveAppName // retrieveGroupId // runE2eTests // runSmokeTests // testResultsAntPattern

build

# Maven implementation of build. Sets version, passes build options and distribution management properties.
# Uses [PIPELINE_VERSION], [PASSED_PIPELINE_VERSION] and [M2_SETTINGS...], [REPO_WITH_BINARIES...] related env vars

Has 8 line(s). Calls functions:

build
`-- printTestResults

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: BUILD_OPTIONS // MAVENW_BIN

executeApiCompatibilityCheck

# Maven implementation of executing API compatibility check

Has 6 line(s). Calls functions:

executeApiCompatibilityCheck
`-- printTestResults

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: BUILD_OPTIONS // MAVENW_BIN

extractMavenProperty

# The function uses Maven Wrapper to extract property with name $1
#
# $1 - name of the property to extract

Has 12 line(s). Doesn’t call other functions.

Called by:

retrieveStubRunnerIds

Environment variables used: MAVENW_BIN

outputFolder

# Maven implementation of output folder

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

printTestResults

# Prints test results. Used by Concourse.

Has 1 line(s). Doesn’t call other functions.

Called by:

build
executeApiCompatibilityCheck
runE2eTests
runSmokeTests

retrieveAppName

# For the given main module (if [getMainModulePath] function exists, it will return the path
# to the main module), will use [ruby] if possible to return the application name. If that
# doesn't bring a result, will use Maven to extract the artifact id.
#
# $1 - path to main module

Has 14 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: MAVENW_BIN

retrieveGroupId

# Maven implementation of group id retrieval. First tries to use [ruby] to extract the
# group id, if that's not possible uses Maven to do it. Requires path $1 to pom.xml
#
# $1 - path to pom.xml

Has 8 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: MAVENW_BIN

retrieveStubRunnerIds

# Extracts the stub runner ids from the Maven properties

Has 1 line(s). Calls functions:

retrieveStubRunnerIds
`-- extractMavenProperty

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

runE2eTests

# Given [APPLICATION_URL] will run the tests with [e2e] profile

Has 8 line(s). Calls functions:

runE2eTests
`-- printTestResults

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: BUILD_OPTIONS // MAVENW_BIN

runSmokeTests

# Given [APPLICATION_URL] and [STUBRUNNER_URL] will run the tests with [smoke] profile

Has 9 line(s). Calls functions:

runSmokeTests
`-- printTestResults

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: BUILD_OPTIONS // MAVENW_BIN

testResultsAntPattern

# Maven implementation of test results ant pattern

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

pipeline-gradle.sh(1)

NAME

pipeline-gradle.sh - a shell script

SYNOPSIS

Contains all Gradle related build functions

FUNCTIONS

build
executeApiCompatibilityCheck
outputFolder
printTestResults
retrieveAppName
retrieveGroupId
retrieveStubRunnerIds
runE2eTests
runSmokeTests
testResultsAntPattern

DETAILS

Script Body

Has 24 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).

Uses feature(s): export

Exports (environment): BUILD_OPTIONS // GRADLEW_BIN // build // executeApiCompatibilityCheck // outputFolder // retrieveAppName // retrieveGroupId // runE2eTests // runSmokeTests // testResultsAntPattern

build

# Gradle implementation of build. Sets version, passes build options and distribution management properties.
# Uses [PIPELINE_VERSION], [PASSED_PIPELINE_VERSION] and [M2_SETTINGS...], [REPO_WITH_BINARIES...] related env vars

Has 7 line(s). Calls functions:

build
`-- printTestResults

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: GRADLEW_BIN // pipeline-maven.sh → BUILD_OPTIONS

executeApiCompatibilityCheck

# Gradle implementation of executing API compatibility check

Has 6 line(s). Calls functions:

executeApiCompatibilityCheck
`-- printTestResults

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: GRADLEW_BIN // pipeline-maven.sh → BUILD_OPTIONS

outputFolder

# Gradle implementation of output folder

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

printTestResults

# Prints test results. Used by Concourse.

Has 1 line(s). Doesn’t call other functions.

Called by:

build
executeApiCompatibilityCheck
runE2eTests
runSmokeTests

retrieveAppName

# Gradle implementation of app name retrieval

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: GRADLEW_BIN

retrieveGroupId

# Gradle implementation of group id retrieval

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: GRADLEW_BIN

retrieveStubRunnerIds

# Extracts the stub runner ids from the Gradle properties

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: GRADLEW_BIN

runE2eTests

# Given [APPLICATION_URL] will run the tests via [e2e] task

Has 9 line(s). Calls functions:

runE2eTests
`-- printTestResults

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: GRADLEW_BIN // pipeline-maven.sh → BUILD_OPTIONS

runSmokeTests

# Given [APPLICATION_URL] and [STUBRUNNER_URL] will run the tests via [smoke] task

Has 10 line(s). Calls functions:

runSmokeTests
`-- printTestResults

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: GRADLEW_BIN // pipeline-maven.sh → BUILD_OPTIONS

testResultsAntPattern

# Gradle implementation of test results ant pattern

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

pipeline-php.sh(1)

NAME

pipeline-php.sh - a shell script

SYNOPSIS

Contains all PHP related build functions

FUNCTIONS

build
downloadAppBinary
downloadComposerIfMissing
executeApiCompatibilityCheck
installPhpIfMissing
outputFolder
projectType
retrieveAppName
retrieveGroupId
retrieveStubRunnerIds
runE2eTests
runSmokeTests
testResultsAntPattern

DETAILS

Script Body

Has 20 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).

Uses feature(s): export

Exports (environment): ARTIFACT_TYPE // COMPOSER_BIN // DOWNLOADABLE_SOURCES // PHP_BIN

build

# PHP implementation of the build function.
# Requires [composer] and [php]. Installs those if possible

Has 30 line(s). Calls functions:

build
`-- downloadComposerIfMissing
    `-- installPhpIfMissing

Uses feature(s): trap

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: pipeline-jvm.sh → BINARY_EXTENSION // COMPOSER_BIN

downloadAppBinary

# Fetches PHP tar.gz sources from a binary storage
#
# $1 - URL to repo with binaries
# $2 - group id of the packaged sources
# $3 - artifact id of the packaged sources
# $4 - version of the packaged sources

Has 26 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: pipeline-jvm.sh → BINARY_EXTENSION

downloadComposerIfMissing

# Downloads and installs PHP and Composer if missing

Has 13 line(s). Calls functions:

downloadComposerIfMissing
`-- installPhpIfMissing

Called by:

build
executeApiCompatibilityCheck
retrieveAppName
retrieveGroupId
retrieveStubRunnerIds
runE2eTests
runSmokeTests

Environment variables used: COMPOSER_BIN // PHP_BIN

executeApiCompatibilityCheck

# PHP implementation of the execute API compatibility check

Has 2 line(s). Calls functions:

executeApiCompatibilityCheck
`-- downloadComposerIfMissing
    `-- installPhpIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: COMPOSER_BIN

installPhpIfMissing

# Downloads and installs PHP if missing

Has 9 line(s). Doesn’t call other functions.

Uses feature(s): export

Called by:

downloadComposerIfMissing

List of exports (to environment): LANG

Environment variables used: PHP_BIN

outputFolder

# PHP implementation of the output folder

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

projectType

# PHP implementation of the project type

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

retrieveAppName

# PHP implementation of the retrieve application name

Has 6 line(s). Calls functions:

retrieveAppName
`-- downloadComposerIfMissing
    `-- installPhpIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: pipeline-dotnet.sh → PROJECT_NAME // COMPOSER_BIN

retrieveGroupId

# PHP implementation of the retrieve group id

Has 2 line(s). Calls functions:

retrieveGroupId
`-- downloadComposerIfMissing
    `-- installPhpIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: COMPOSER_BIN

retrieveStubRunnerIds

# PHP implementation of the retrieve stub runner ids

Has 2 line(s). Calls functions:

retrieveStubRunnerIds
`-- downloadComposerIfMissing
    `-- installPhpIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: COMPOSER_BIN

runE2eTests

# PHP implementation of the run e2e tests

Has 2 line(s). Calls functions:

runE2eTests
`-- downloadComposerIfMissing
    `-- installPhpIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: COMPOSER_BIN

runSmokeTests

# PHP implementation of the run smoke tests

Has 2 line(s). Calls functions:

runSmokeTests
`-- downloadComposerIfMissing
    `-- installPhpIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: COMPOSER_BIN

testResultsAntPattern

# PHP implementation of the test results ant pattern

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

pipeline-npm.sh(1)

NAME

pipeline-npm.sh - a shell script

SYNOPSIS

Contains all NPM related build functions

FUNCTIONS

build
downloadAppBinary
downloadNpmIfMissing
executeApiCompatibilityCheck
installNodeIfMissing
outputFolder
projectType
retrieveAppName
retrieveGroupId
retrieveStubRunnerIds
runE2eTests
runSmokeTests
testResultsAntPattern

DETAILS

Script Body

Has 15 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).

Uses feature(s): export

Exports (environment): ARTIFACT_TYPE // NODE_BIN // NPM_BIN

build

# npm implementation of the build function.
# Requires [npm] and [node]. Installs those if possible

Has 3 line(s). Calls functions:

build
`-- downloadNpmIfMissing
    `-- installNodeIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: NPM_BIN

downloadAppBinary

# Just downloads the npm libraries. We will use sources

Has 2 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: NPM_BIN

downloadNpmIfMissing

# Downloads and installs node and npm if missing

Has 6 line(s). Calls functions:

downloadNpmIfMissing
`-- installNodeIfMissing

Called by:

build
executeApiCompatibilityCheck
retrieveAppName
retrieveGroupId
retrieveStubRunnerIds
runE2eTests
runSmokeTests

Environment variables used: NPM_BIN

executeApiCompatibilityCheck

# npm implementation of the execute API compatibility check

Has 2 line(s). Calls functions:

executeApiCompatibilityCheck
`-- downloadNpmIfMissing
    `-- installNodeIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: NPM_BIN

installNodeIfMissing

# Installs node if missing

Has 7 line(s). Doesn’t call other functions.

Uses feature(s): export

Called by:

downloadNpmIfMissing

List of exports (to environment): LANG

Environment variables used: NODE_BIN

outputFolder

# npm implementation of the output folder

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

projectType

# npm implementation of the project type

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

retrieveAppName

# npm implementation of the retrieve app name

Has 6 line(s). Calls functions:

retrieveAppName
`-- downloadNpmIfMissing
    `-- installNodeIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: pipeline-dotnet.sh → PROJECT_NAME // NPM_BIN

retrieveGroupId

# npm implementation of the retrieve group id

Has 2 line(s). Calls functions:

retrieveGroupId
`-- downloadNpmIfMissing
    `-- installNodeIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: NPM_BIN

retrieveStubRunnerIds

# npm implementation of the retrieve stub runner ids

Has 2 line(s). Calls functions:

retrieveStubRunnerIds
`-- downloadNpmIfMissing
    `-- installNodeIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: NPM_BIN

runE2eTests

# npm implementation of the e2e tests

Has 2 line(s). Calls functions:

runE2eTests
`-- downloadNpmIfMissing
    `-- installNodeIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: NPM_BIN

runSmokeTests

# npm implementation of the run smoke tests

Has 2 line(s). Calls functions:

runSmokeTests
`-- downloadNpmIfMissing
    `-- installNodeIfMissing

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: NPM_BIN

testResultsAntPattern

# npm implementation of the test results ant pattern

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

pipeline-dotnet.sh(1)

NAME

pipeline-dotnet.sh - a shell script

SYNOPSIS

Contains all PHP related build functions

FUNCTIONS

build
downloadAppBinary
executeApiCompatibilityCheck
outputFolder
projectType
retrieveAppName
retrieveGroupId
retrieveStubRunnerIds
runE2eTests
runSmokeTests
testResultsAntPattern

DETAILS

Script Body

Has 20 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).

Uses feature(s): export

Exports (environment): ARTIFACT_TYPE // DOTNET_BIN // DOWNLOADABLE_SOURCES

build

# Dotnet implementation of the build function.

Has 12 line(s). Doesn’t call other functions.

Uses feature(s): export

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

List of exports (to environment): PROJECT_GROUP // PROJECT_NAME // PROJECT_VERSION

Environment variables used: DOTNET_BIN

downloadAppBinary

# Fetches DotNet publication from a binary storage
#
# $1 - URL to repo with binaries
# $2 - group id of the packaged sources
# $3 - artifact id of the packaged sources
# $4 - version of the packaged sources

Has 26 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: pipeline-jvm.sh → BINARY_EXTENSION

executeApiCompatibilityCheck

# Dotnet implementation of the execute API compatibility check

Has 11 line(s). Doesn’t call other functions.

Uses feature(s): export

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

List of exports (to environment): EXTERNAL_CONTRACTS_ARTIFACT_ID // EXTERNAL_CONTRACTS_CLASSIFIER // EXTERNAL_CONTRACTS_GROUP_ID // EXTERNAL_CONTRACTS_PATH // EXTERNAL_CONTRACTS_VERSION // LATEST_PROD_VERSION

Environment variables used: DOTNET_BIN

outputFolder

# Dotnet implementation of the output folder

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

projectType

# Dotnet implementation of the project type

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

retrieveAppName

# Dotnet implementation of the retrieve application name

Has 5 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: DOTNET_BIN // PROJECT_NAME

retrieveGroupId

# Dotnet implementation of the retrieve group id

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: DOTNET_BIN

retrieveStubRunnerIds

# Dotnet implementation of the retrieve stub runner ids

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: DOTNET_BIN

runE2eTests

# Dotnet implementation of the run e2e tests

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: DOTNET_BIN

runSmokeTests

# Dotnet implementation of the run smoke tests

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: DOTNET_BIN

testResultsAntPattern

# Dotnet implementation of the test results ant pattern

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

pipeline-cf.sh(1)

NAME

pipeline-cf.sh - a shell script

SYNOPSIS

Contains all Cloud Foundry related deployment functions

FUNCTIONS

addMultiplePortsSupport
bindService
completeSwitchOver
createServiceWithName
deleteApp
deleteService
deployAndRestartAppWithName
deployAppAsService
deployAppNoStart
deployBrokeredService
deployCupsService
deployService
deployStubRunnerBoot
getAppHostFromPaas
getArtifactType
getDomain
getHostFromManifest
getInstancesFromManifest
getProfilesFromManifest
hostname
logInToPaas
parseManifest
pathToPushToCf
pathToUnpackedSources
performProductionDeploymentOfTestedApplication
prepareForE2eTests
prepareForSmokeTests
prodDeploy
propagatePropertiesForTests
readTestPropertiesFromFile
restartApp
retrieveApplicationUrl
rollbackToPreviousVersion
setEnvVar
setEnvVarIfMissing
stageDeploy
testCleanup
testDeploy
testRollbackDeploy
waitForServicesToInitialize

DETAILS

Script Body

Has 11 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).

Uses feature(s): export

Exports (environment): CF_BIN // CF_CLI_URL // RETRIEVE_STUBRUNNER_IDS_FUNCTION

addMultiplePortsSupport

# Adds multiple ports support for Stub Runner Boot
# Uses [PAAS_TEST_SPACE_PREFIX], [ENVIRONMENT] env vars
#
# $1 - Stub Runner name
# $2 - IDs of stubs to be downloaded
# $3 - path to Stub Runner manifest

Has 49 line(s). Calls functions:

addMultiplePortsSupport
`-- setEnvVar

Called by:

deployStubRunnerBoot

Environment variables used: CF_BIN // test_smoke.sh → ENVIRONMENT

bindService

# Binds service $1 to application $2
#
# $1 - service name
# $2 - application name

Has 9 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: CF_BIN

completeSwitchOver

# Performs switch over of the venerable app (VEN) and leaves only current one (APP) running
# APP - current app to deploy, VEN - old (venerable), currently running app on production
# [Clicked COMPLETE] -> APP running, VEN stopped

Has 12 line(s). Calls functions:

completeSwitchOver
`-- logInToPaas

Called by:

prod_complete.sh/Script-Body

Environment variables used: CF_BIN

createServiceWithName

# Creates a CUPS (user provided service) for service with name $1
#
# $1 - service name

Has 5 line(s). Calls functions:

createServiceWithName
`-- deployCupsService

Called by:

deployAppAsService

deleteApp

# Deletes app with name $1 from CF
#
# $1 - app name

Has 6 line(s). Doesn’t call other functions.

Called by:

testRollbackDeploy

Environment variables used: CF_BIN

deleteService

# Implementation of the CF delete service
#
# $1 - service name
# $2 - service type

Has 5 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: CF_BIN

deployAndRestartAppWithName

# Deploys and restarts app with name $1 and binary name $2
#
# $1 - app name
# $2 - binary name

Has 22 line(s). Calls functions:

deployAndRestartAppWithName
|-- deployAppNoStart
|   `-- setEnvVar
|-- parseManifest
|-- restartApp
`-- setEnvVar

Called by:

performProductionDeploymentOfTestedApplication
stageDeploy
testDeploy
testRollbackDeploy

Environment variables used: test_smoke.sh → ENVIRONMENT

deployAppAsService

# For app with binary name $1, app name $2 and manifest location $3, deploys the app to CF
# and creates a user provided services for it
#
# $1 - binary name
# $2 - app name
# $3 - manifest location

Has 11 line(s). Calls functions:

deployAppAsService
|-- createServiceWithName
|   `-- deployCupsService
|-- deployAppNoStart
|   `-- setEnvVar
`-- restartApp

Called by:

deployService

Environment variables used: pipeline.sh → LOWERCASE_ENV // test_smoke.sh → ENVIRONMENT

deployAppNoStart

# Deploys an app without starting it
#
# $1 - app name
# $2 - artifact name
# $3 - environment name
# $4 - path to manifest
# $5 - host name suffix

Has 37 line(s). Calls functions:

deployAppNoStart
`-- setEnvVar

Called by:

deployAndRestartAppWithName
deployAppAsService
deployStubRunnerBoot

Environment variables used: CF_BIN // pipeline.sh → DOWNLOADABLE_SOURCES // pipeline.sh → SOURCE_ARTIFACT_TYPE_NAME

deployBrokeredService

# Deploys a brokered service with name $1, broker service type $2, plan $3 and parameters $4
#
# $1 - service name
# $2 - broker service type
# $3 - broker service plan
# $4 - broker service parameters

Has 17 line(s). Doesn’t call other functions.

Called by:

deployService

Environment variables used: CF_BIN // pipeline.sh → LOWERCASE_ENV // pipeline.sh → OUTPUT_FOLDER

deployCupsService

# Deploys a CUPS (user provided service) with name $1, option $2 and value $3
# Uses [OUTPUT_FOLDER] and [LOWERCASE_ENV] env variables
#
# $1 - service name
# $2 - cups option
# $3 - cups value

Has 13 line(s). Doesn’t call other functions.

Called by:

createServiceWithName
deployService

Environment variables used: CF_BIN // pipeline.sh → LOWERCASE_ENV // pipeline.sh → OUTPUT_FOLDER

deployService

# Implementation of the CF deployment of a service
#
# $1 - service name
# $2 - service type

Has 57 line(s). Calls functions:

deployService
|-- deployAppAsService
|   |-- createServiceWithName
|   |   `-- deployCupsService
|   |-- deployAppNoStart
|   |   `-- setEnvVar
|   `-- restartApp
|-- deployBrokeredService
|-- deployCupsService
`-- deployStubRunnerBoot
    |-- addMultiplePortsSupport
    |   `-- setEnvVar
    |-- deployAppNoStart
    |   `-- setEnvVar
    |-- restartApp
    `-- setEnvVar

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: pipeline.sh → LOWERCASE_ENV // pipeline.sh → PARSED_YAML

deployStubRunnerBoot

# Deploys a Stub Runner Boot instance to CF
# Uses [REPO_WITH_BINARIES], [ENVIRONMENT] env vars
#
# $1 - Stub Runner Boot jar name
# $2 - Stub Runner name
# $3 - path to Stub Runner manifest

Has 16 line(s). Calls functions:

deployStubRunnerBoot
|-- addMultiplePortsSupport
|   `-- setEnvVar
|-- deployAppNoStart
|   `-- setEnvVar
|-- restartApp
`-- setEnvVar

Called by:

deployService

Environment variables used: RETRIEVE_STUBRUNNER_IDS_FUNCTION // test_smoke.sh → ENVIRONMENT

getAppHostFromPaas

# Gets app host for app with name $1 from CF
#
# $1 - app name

Has 4 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: CF_BIN

getArtifactType

# Gets the type of artifact that should be pushed to CF. [binary] or [source]?
# Uses [ARTIFACT_TYPE], [PARSED_YAML], [LANGUAGE_TYPE] env vars

Has 16 line(s). Calls functions:

getArtifactType
`-- pipeline.sh/toLowerCase

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: pipeline.sh → BINARY_ARTIFACT_TYPE_NAME // pipeline.sh → LANGUAGE_TYPE // pipeline.sh → SOURCE_ARTIFACT_TYPE_NAME // pipeline.sh → PARSED_YAML

getDomain

# Gets domain from host $1
#
# $1 - host name

Has 2 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: CF_BIN

getHostFromManifest

# Gets host from [PARSED_APP_MANIFEST_YAML] for app with name $1
#
# $1 - app name

Has 3 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: PARSED_APP_MANIFEST_YAML

getInstancesFromManifest

# Gets instances from [PARSED_APP_MANIFEST_YAML] for app with name $1
#
# $1 - app name

Has 2 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: PARSED_APP_MANIFEST_YAML

getProfilesFromManifest

# Gets profiles from [PARSED_APP_MANIFEST_YAML] for app with name $1
#
# $1 - app name

Has 2 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: PARSED_APP_MANIFEST_YAML

hostname

# Returns hostname for app with name $1, env $2 and manifest location $3
# Uses [PAAS_HOSTNAME_UUID] and [LOWERCASE_ENV] env vars
#
# $1 - app name
# $2 - environment name
# $3 - manifest location

Has 20 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: pipeline.sh → LOWERCASE_ENV

logInToPaas

# Implementation of the CF log in. Will work in the following way:
#
# * Will use CF if one is present (good for envs that are fully offline)
# * You can disable the redownload CF with [CF_REDOWNLOAD_CLI] env set to [false]
# * You can provide the URL from which to fetch the CLI via [CF_CLI_URL]
#
# Also [CF_TEST_MODE] is used for tests and all the combinations of
# [PAAS_..._USERNAME/PASSWORD/ORG/SPACE/API_URL] to log in to PAAS

Has 38 line(s). Doesn’t call other functions.

Called by:

completeSwitchOver
prepareForE2eTests
prepareForSmokeTests
prodDeploy
retrieveApplicationUrl
rollbackToPreviousVersion
stageDeploy
testDeploy
testRollbackDeploy

Environment variables used: CF_BIN // CF_CLI_URL // pipeline.sh → LOWERCASE_ENV // test_smoke.sh → ENVIRONMENT

parseManifest

# Parses the [manifest.yml] file into [PARSED_APP_MANIFEST_YAML] env var

Has 8 line(s). Doesn’t call other functions.

Uses feature(s): export

Called by:

deployAndRestartAppWithName

List of exports (to environment): PARSED_APP_MANIFEST_YAML

Environment variables used: PARSED_APP_MANIFEST_YAML

pathToPushToCf

# Returns the path to push to CF for artifact with name $1
#
# $1 - artifact name

Has 11 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: pipeline.sh → BINARY_ARTIFACT_TYPE_NAME // pipeline.sh → OUTPUT_FOLDER // pipeline.sh → SOURCE_ARTIFACT_TYPE_NAME

pathToUnpackedSources

# Returns the path to unpacked sources. Uses [OUTPUT_FOLDER] env var

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: pipeline.sh → OUTPUT_FOLDER

performProductionDeploymentOfTestedApplication

# Performs production deployment of application (APP)
# APP - current app to deploy, VEN - old (venerable), currently running app on production
# [Clicked DEPLOY] -> APP running, VEN running -> [Click DEPLOY] delete VEN, deploy new APP
# [Clicked COMPLETE] -> APP running, VEN stopped -> [Click DEPLOY] delete VEN, rename APP -> VEN, deploy APP
# [Clicked ROLLBACK] -> APP stopped, VEN running, VEN renamed to APP, latest PROD tag removed -> [Click DEPLOY] -> delete APP, deploy new APP, stop VEN

Has 27 line(s). Calls functions:

performProductionDeploymentOfTestedApplication
`-- deployAndRestartAppWithName
    |-- deployAppNoStart
    |   `-- setEnvVar
    |-- parseManifest
    |-- restartApp
    `-- setEnvVar

Called by:

prodDeploy

Environment variables used: CF_BIN

prepareForE2eTests

# CF implementation of prepare for e2e tests
# You can skip that via [CF_SKIP_PREPARE_FOR_TESTS] set to [true]

Has 9 line(s). Calls functions:

prepareForE2eTests
`-- logInToPaas

Uses feature(s): export

Called by:

stage_e2e.sh/Script-Body

List of exports (to environment): APPLICATION_URL

Environment variables used: APPLICATION_URL

prepareForSmokeTests

# CF implementation of prepare for smoke tests, can log in to PAAS to retrieve info about
# the app. You can skip that via [CF_SKIP_PREPARE_FOR_TESTS] set to [true]

Has 15 line(s). Calls functions:

prepareForSmokeTests
|-- logInToPaas
|-- pipeline.sh/parsePipelineDescriptor
|-- propagatePropertiesForTests
|   `-- pipeline.sh/envNodeExists
`-- readTestPropertiesFromFile

Called by:

test_rollback_smoke.sh/Script-Body
test_smoke.sh/Script-Body

Environment variables used: APPLICATION_URL // STUBRUNNER_URL // pipeline.sh → OUTPUT_FOLDER // pipeline.sh → LATEST_PROD_TAG

prodDeploy

# CF implementation of deploy to production

Has 7 line(s). Calls functions:

prodDeploy
|-- logInToPaas
`-- performProductionDeploymentOfTestedApplication
    `-- deployAndRestartAppWithName
        |-- deployAppNoStart
        |   `-- setEnvVar
        |-- parseManifest
        |-- restartApp
        `-- setEnvVar

Called by:

prod_deploy.sh/Script-Body

propagatePropertiesForTests

# For project with name $1 resolves application URL and stub runner URL if applicable
#
# exports [APPLICATION_URL] and [STUBRUNNER_URL] env vars and stores those values in a
# properties file
#
# $1 - application name

Has 21 line(s). Calls functions:

propagatePropertiesForTests
`-- pipeline.sh/envNodeExists

Uses feature(s): export

Called by:

prepareForSmokeTests
retrieveApplicationUrl
stageDeploy
testDeploy
testRollbackDeploy

List of exports (to environment): APPLICATION_URL // STUBRUNNER_URL

Environment variables used: pipeline.sh → LOWERCASE_ENV // pipeline.sh → OUTPUT_FOLDER // pipeline.sh → PARSED_YAML

readTestPropertiesFromFile

# Reads a properties file as env variables
# shellcheck disable=SC2120

Has 12 line(s). Doesn’t call other functions.

Uses feature(s): eval

Called by:

prepareForSmokeTests
retrieveApplicationUrl

Environment variables used: pipeline.sh → OUTPUT_FOLDER

restartApp

# Restarts app with name $1
#
# $1 - app name

Has 3 line(s). Doesn’t call other functions.

Called by:

deployAndRestartAppWithName
deployAppAsService
deployStubRunnerBoot

Environment variables used: CF_BIN

retrieveApplicationUrl

# Retrieves the application URL from CF

Has 9 line(s). Calls functions:

retrieveApplicationUrl
|-- logInToPaas
|-- propagatePropertiesForTests
|   `-- pipeline.sh/envNodeExists
`-- readTestPropertiesFromFile

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: APPLICATION_URL // pipeline.sh → OUTPUT_FOLDER

rollbackToPreviousVersion

# Performs rollback of application (APP)
# APP - current app to deploy, VEN - old (venerable), currently running app on production
# [Clicked ROLLBACK] -> APP stopped, VEN running

Has 16 line(s). Calls functions:

rollbackToPreviousVersion
`-- logInToPaas

Called by:

prod_rollback.sh/Script-Body

Environment variables used: CF_BIN

setEnvVar

# For app with name $1 sets env var with key $2 and value $3
#
# $1 - app name
# $2 - env variable key
# $3 - env variable value

Has 5 line(s). Doesn’t call other functions.

Called by:

addMultiplePortsSupport
deployAndRestartAppWithName
deployAppNoStart
deployStubRunnerBoot
setEnvVarIfMissing

Environment variables used: CF_BIN

setEnvVarIfMissing

# For app with name $1 sets env var with key $2 and value $3 if that value is missing
#
# $1 - app name
# $2 - env variable key
# $3 - env variable value

Has 5 line(s). Calls functions:

setEnvVarIfMissing
`-- setEnvVar

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: CF_BIN

stageDeploy

# CF implementation of deployment to stage

Has 12 line(s). Calls functions:

stageDeploy
|-- deployAndRestartAppWithName
|   |-- deployAppNoStart
|   |   `-- setEnvVar
|   |-- parseManifest
|   |-- restartApp
|   `-- setEnvVar
|-- logInToPaas
|-- pipeline.sh/deployServices
|-- propagatePropertiesForTests
|   `-- pipeline.sh/envNodeExists
`-- waitForServicesToInitialize

Called by:

stage_deploy.sh/Script-Body

testCleanup

# Uses a community plugin to clean up the whole test space

Has 2 line(s). Doesn’t call other functions.

Called by:

testDeploy

Environment variables used: CF_BIN

testDeploy

# Implementation of the CF deployment to test

Has 13 line(s). Calls functions:

testDeploy
|-- deployAndRestartAppWithName
|   |-- deployAppNoStart
|   |   `-- setEnvVar
|   |-- parseManifest
|   |-- restartApp
|   `-- setEnvVar
|-- logInToPaas
|-- pipeline.sh/deployServices
|-- propagatePropertiesForTests
|   `-- pipeline.sh/envNodeExists
|-- testCleanup
`-- waitForServicesToInitialize

Called by:

test_deploy.sh/Script-Body

testRollbackDeploy

# Implementation of the CF deployment to test for rollback tests

Has 15 line(s). Calls functions:

testRollbackDeploy
|-- deleteApp
|-- deployAndRestartAppWithName
|   |-- deployAppNoStart
|   |   `-- setEnvVar
|   |-- parseManifest
|   |-- restartApp
|   `-- setEnvVar
|-- logInToPaas
|-- pipeline.sh/parsePipelineDescriptor
`-- propagatePropertiesForTests
    `-- pipeline.sh/envNodeExists

Called by:

test_rollback_deploy.sh/Script-Body

Environment variables used: pipeline.sh → OUTPUT_FOLDER // pipeline.sh → PROJECT_NAME

waitForServicesToInitialize

# Waits for services to initialize

Has 10 line(s). Doesn’t call other functions.

Called by:

stageDeploy
testDeploy

Environment variables used: CF_BIN

pipeline-k8s.sh(1)

NAME

pipeline-k8s.sh - a shell script

SYNOPSIS

Contains all Kubernetes related deployment functions

FUNCTIONS

deployService
logInToPaas
testDeploy
testRollbackDeploy

DETAILS

Script Body

Has 5 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).

deployService

Has 681 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: pipeline.sh → LOWERCASE_ENV // pipeline.sh → OUTPUT_FOLDER // pipeline.sh → PARSED_YAML // test_smoke.sh → ENVIRONMENT

logInToPaas

# Contains all Kubernetes related deployment functions
# }}}

Has 57 line(s). Doesn’t call other functions.

Uses feature(s): trap

Called by:

testDeploy
testRollbackDeploy

Environment variables used: test_smoke.sh → ENVIRONMENT

testDeploy

Has 6 line(s). Calls functions:

testDeploy
|-- logInToPaas
`-- pipeline.sh/deployServices

Called by:

test_deploy.sh/Script-Body

testRollbackDeploy

Has 12 line(s). Calls functions:

testRollbackDeploy
|-- logInToPaas
`-- pipeline.sh/parsePipelineDescriptor

Called by:

test_rollback_deploy.sh/Script-Body

Environment variables used: pipeline.sh → OUTPUT_FOLDER // pipeline.sh → PROJECT_NAME

pipeline-ansible.sh(1)

NAME

pipeline-ansible.sh - a shell script

SYNOPSIS

Documentation automatically generated with `zshelldoc'

FUNCTIONS

__ansible_inventory
__ansible_playbook
completeSwitchOver
logInToPaas
prepareForE2eTests
prepareForSmokeTests
prodDeploy
rollbackToPreviousVersion
stageDeploy
testDeploy
testRollbackDeploy

DETAILS

Script Body

Has 10 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).

__ansible_inventory

Has 8 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: test_smoke.sh → ENVIRONMENT

__ansible_playbook

Has 19 line(s). Doesn’t call other functions.

Called by:

completeSwitchOver
prodDeploy
rollbackToPreviousVersion
stageDeploy
testDeploy
testRollbackDeploy

Environment variables used: test_smoke.sh → ENVIRONMENT

completeSwitchOver

Has 5 line(s). Calls functions:

completeSwitchOver
`-- __ansible_playbook

Called by:

prod_complete.sh/Script-Body

Environment variables used: pipeline.sh → LANGUAGE_TYPE

logInToPaas

Has 1 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

prepareForE2eTests

Has 9 line(s). Doesn’t call other functions.

Uses feature(s): export

Called by:

stage_e2e.sh/Script-Body

List of exports (to environment): APPLICATION_URL

prepareForSmokeTests

Has 14 line(s). Doesn’t call other functions.

Uses feature(s): export

Called by:

testRollbackDeploy
test_rollback_smoke.sh/Script-Body
test_smoke.sh/Script-Body

List of exports (to environment): APPLICATION_URL // STUBRUNNER_URL

prodDeploy

Has 7 line(s). Calls functions:

prodDeploy
`-- __ansible_playbook

Called by:

prod_deploy.sh/Script-Body

Environment variables used: pipeline.sh → LANGUAGE_TYPE

rollbackToPreviousVersion

Has 4 line(s). Calls functions:

rollbackToPreviousVersion
`-- __ansible_playbook

Called by:

prod_rollback.sh/Script-Body

Environment variables used: pipeline.sh → LANGUAGE_TYPE

stageDeploy

Has 6 line(s). Calls functions:

stageDeploy
`-- __ansible_playbook

Called by:

stage_deploy.sh/Script-Body

Environment variables used: pipeline.sh → LANGUAGE_TYPE

testDeploy

Has 15 line(s). Calls functions:

testDeploy
`-- __ansible_playbook

Called by:

test_deploy.sh/Script-Body

Environment variables used: pipeline.sh → LANGUAGE_TYPE

testRollbackDeploy

Has 21 line(s). Calls functions:

testRollbackDeploy
|-- __ansible_playbook
`-- prepareForSmokeTests

Called by:

test_rollback_deploy.sh/Script-Body

Environment variables used: pipeline-cf.sh → APPLICATION_URL // pipeline-cf.sh → STUBRUNNER_URL // pipeline.sh → LANGUAGE_TYPE // pipeline.sh → OUTPUT_FOLDER

build_and_upload.sh(1)

NAME

build_and_upload.sh - a shell script

SYNOPSIS

Executes a build of the project. Sources pipeline.sh

FUNCTIONS

DETAILS

Script Body

Has 13 line(s). Calls functions:

Script-Body
`-- pipeline.sh/build

Uses feature(s): export, source

Exports (environment): ENVIRONMENT

test_deploy.sh(1)

NAME

test_deploy.sh - a shell script

SYNOPSIS

Deploys app to test environment. Sources pipeline.sh

FUNCTIONS

DETAILS

Script Body

Has 13 line(s). Calls functions:

Script-Body
|-- pipeline-cf.sh/testDeploy
`-- pipeline.sh/testDeploy

Uses feature(s): export, source

Exports (environment): ENVIRONMENT

test_smoke.sh(1)

NAME

test_smoke.sh - a shell script

SYNOPSIS

Runs smoke tests on the test environment. Sources pipeline.sh

FUNCTIONS

DETAILS

Script Body

Has 14 line(s). Calls functions:

Script-Body
|-- pipeline-cf.sh/prepareForSmokeTests
|-- pipeline.sh/prepareForSmokeTests
`-- pipeline.sh/runSmokeTests

Uses feature(s): export, source

Exports (environment): ENVIRONMENT

test_rollback_deploy.sh(1)

NAME

test_rollback_deploy.sh - a shell script

SYNOPSIS

If applicable, deploys current prod version to test environment. Sources pipeline.sh

FUNCTIONS

DETAILS

Script Body

Has 19 line(s). Calls functions:

Script-Body
|-- pipeline-cf.sh/testRollbackDeploy
`-- pipeline.sh/testRollbackDeploy

Uses feature(s): export, source

Exports (environment): ENVIRONMENT

test_rollback_smoke.sh(1)

NAME

test_rollback_smoke.sh - a shell script

SYNOPSIS

If applicable, runs smoke tests on the test environment. Sources pipeline.sh

FUNCTIONS

DETAILS

Script Body

Has 21 line(s). Calls functions:

Script-Body
|-- pipeline-cf.sh/prepareForSmokeTests
|-- pipeline.sh/prepareForSmokeTests
`-- pipeline.sh/runSmokeTests

Uses feature(s): export, source

Exports (environment): ENVIRONMENT

stage_deploy.sh(1)

NAME

stage_deploy.sh - a shell script

SYNOPSIS

Deploys app to stage environment. Sources pipeline.sh

FUNCTIONS

DETAILS

Script Body

Has 13 line(s). Calls functions:

Script-Body
|-- pipeline-cf.sh/stageDeploy
`-- pipeline.sh/stageDeploy

Uses feature(s): export, source

Exports (environment): ENVIRONMENT

stage_e2e.sh(1)

NAME

stage_e2e.sh - a shell script

SYNOPSIS

Runs end to end tests on stage. Sources pipeline.sh

FUNCTIONS

DETAILS

Script Body

Has 14 line(s). Calls functions:

Script-Body
|-- pipeline-cf.sh/prepareForE2eTests
|-- pipeline.sh/prepareForE2eTests
`-- pipeline.sh/runE2eTests

Uses feature(s): export, source

Exports (environment): ENVIRONMENT

prod_deploy.sh(1)

NAME

prod_deploy.sh - a shell script

SYNOPSIS

Deploys app to production. Sources pipeline.sh

FUNCTIONS

DETAILS

Script Body

Has 13 line(s). Calls functions:

Script-Body
|-- pipeline-cf.sh/prodDeploy
`-- pipeline.sh/prodDeploy

Uses feature(s): export, source

Exports (environment): ENVIRONMENT

prod_complete.sh(1)

NAME

prod_complete.sh - a shell script

SYNOPSIS

Executes a switch over of the traffic, fully to the new instance. Sources pipeline.sh

FUNCTIONS

DETAILS

Script Body

Has 13 line(s). Calls functions:

Script-Body
|-- pipeline-cf.sh/completeSwitchOver
`-- pipeline.sh/completeSwitchOver

Uses feature(s): export, source

Exports (environment): ENVIRONMENT

prod_rollback.sh(1)

NAME

prod_rollback.sh - a shell script

SYNOPSIS

Rolls back app from production. Sources pipeline.sh

FUNCTIONS

DETAILS

Script Body

Has 19 line(s). Calls functions:

Script-Body
|-- pipeline-cf.sh/rollbackToPreviousVersion
|-- pipeline.sh/removeProdTag
`-- pipeline.sh/rollbackToPreviousVersion

Uses feature(s): export, source

Exports (environment): ENVIRONMENT