Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 12 additions & 22 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -490,35 +490,25 @@ lock(resource: "build-${params.STREAM}") {
if (!params.MINIMAL && s3_stream_dir &&
utils.path_exists("\${AWS_FCOS_KOLA_BOT_CONFIG}")) {
stage('Kola:AWS') {
// use jnlp container in our pod, which has `oc` in it already
container('jnlp') {
utils.shwrap("""
# We consider the AWS kola tests to be a followup job
# so we aren't adding a `--wait` here.
oc start-build fedora-coreos-pipeline-kola-aws \
-e STREAM=${params.STREAM} \
-e VERSION=${newBuildID} \
-e S3_STREAM_DIR=${s3_stream_dir}
""")
}
// We consider the AWS kola tests to be a followup job, so we use `wait: false` here.
build job: 'kola-aws', wait: false, parameters: [
string(name: 'STREAM', value: params.STREAM),
string(name: 'VERSION', value: newBuildID),
string(name: 'S3_STREAM_DIR', value: s3_stream_dir)
]
}
}

// Now that the metadata is uploaded go ahead and kick off some tests
if (!params.MINIMAL && s3_stream_dir &&
utils.path_exists("\${GCP_IMAGE_UPLOAD_CONFIG}")) {
stage('Kola:GCP') {
// use jnlp container in our pod, which has `oc` in it already
container('jnlp') {
utils.shwrap("""
# We consider the GCP kola tests to be a followup job
# so we aren't adding a `--wait` here.
oc start-build fedora-coreos-pipeline-kola-gcp \
-e STREAM=${params.STREAM} \
-e VERSION=${newBuildID} \
-e S3_STREAM_DIR=${s3_stream_dir}
""")
}
// We consider the GCP kola tests to be a followup job, so we use `wait: false` here.
build job: 'kola-gcp', wait: false, parameters: [
string(name: 'STREAM', value: params.STREAM),
string(name: 'VERSION', value: newBuildID),
string(name: 'S3_STREAM_DIR', value: s3_stream_dir)
]
}
}

Expand Down
105 changes: 0 additions & 105 deletions Jenkinsfile.kola.aws

This file was deleted.

121 changes: 0 additions & 121 deletions Jenkinsfile.kola.gcp

This file was deleted.

64 changes: 64 additions & 0 deletions jobs/kola-aws.Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
@Library('github.com/coreos/coreos-ci-lib') _

def streams
node {
checkout scm
streams = load("streams.groovy")
}

properties([
pipelineTriggers([]),
parameters([
choice(name: 'STREAM',
// list devel first so that it's the default choice
choices: (streams.development + streams.production + streams.mechanical),
description: 'Fedora CoreOS stream to test'),
string(name: 'VERSION',
description: 'Fedora CoreOS Build ID to test',
defaultValue: '',
trim: true),
string(name: 'S3_STREAM_DIR',
description: 'Override the Fedora CoreOS S3 stream directory',
defaultValue: '',
trim: true),
string(name: 'COREOS_ASSEMBLER_IMAGE',
description: 'Override the coreos-assembler image to use',
defaultValue: "coreos-assembler:master",
trim: true)
])
])

currentBuild.description = "[${params.STREAM}] - ${params.VERSION}"

def s3_stream_dir = params.S3_STREAM_DIR
if (s3_stream_dir == "") {
s3_stream_dir = "fcos-builds/prod/streams/${params.STREAM}"
}

cosaPod(image: params.COREOS_ASSEMBLER_IMAGE, memory: "256Mi",
secrets: ["aws-fcos-builds-bot-config", "aws-fcos-kola-bot-config"]) {

def ami, ami_region
stage('Fetch Metadata') {
shwrap("""
export AWS_CONFIG_FILE=${AWS_FCOS_BUILDS_BOT_CONFIG}/config
cosa init --branch ${params.STREAM} https://github.com/coreos/fedora-coreos-config
cosa buildprep --ostree --build=${params.VERSION} s3://${s3_stream_dir}/builds
""")

def basearch = shwrapCapture("cosa basearch")
def meta = readJSON file: "builds/${params.VERSION}/${basearch}/meta.json"
if (meta.amis.size() > 0) {
ami = meta['amis'][0]['hvm']
ami_region = meta['amis'][0]['name']
} else {
throw new Exception("No AMI found in metadata for ${params.VERSION}")
}
}

fcosKola(cosaDir: env.WORKSPACE, parallel: 5, build: params.VERSION,
platformArgs: """-p aws \
--aws-credentials-file ${AWS_FCOS_KOLA_BOT_CONFIG}/config \
--aws-ami ${ami} \
--aws-region ${ami_region}""")
}
Loading