Skip to content

Instantly share code, notes, and snippets.

View chrisj-au's full-sized avatar

Christopher Johnston chrisj-au

View GitHub Profile
@chrisj-au
chrisj-au / CFN-CodePipelineSchedule.yaml
Last active November 27, 2020 00:15
[CloudFormation] Schedule CodePipeline
# Schedule CodePipeline Build using CloudWatch Event Rule
Parameters:
ProjectName:
Type: String
Default: cicd-terraform
AllowedPattern: [a-zA-Z][a-zA-Z0-9-]*
MinLength: 3
MaxLength: 64
Description: Adhere to S3 naming standard; must begin with a letter and contain only alphanumeric characters or hyphens.
@chrisj-au
chrisj-au / Jenkins-AbortFirstBuild
Last active November 27, 2020 00:05
pre-load jenkins params for first build. Used where pipelines are created via code.
// Abort Build 1
if (env.BUILD_NUMBER.equals("1")) {
currentBuild.displayName = 'Parameter loading'
addBuildDescription('Please restart pipeline')
currentBuild.result = 'ABORTED'
error('Stopping initial manually triggered build as we only want to get the parameters')
}