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
49 changes: 1 addition & 48 deletions .cci.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,58 +11,11 @@ def cpuCount = 6
def cpuCount_s = cpuCount.toString()
def imageName = buildImage(env: [ENABLE_GO_RACE_DETECTOR: "1", GOMAXPROCS: cpuCount_s], cpu: cpuCount_s)

def memory = (cpuCount * 1536) as Integer
pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "${memory}Mi") {
pod(image: imageName + ":latest", cpu: "2", memory: "2048Mi") {
checkout scm

stage("Unit tests") {
shwrap("make check")
shwrap("make unittest")
}

shwrap("rpm -qa | sort > rpmdb.txt")
archiveArtifacts artifacts: 'rpmdb.txt'

// Run stage Build FCOS (init, fetch and build)
cosaBuild(skipKola: 1, cosaDir: "/srv", noForce: true)

// Run stage Kola QEMU (basic-qemu-scenarios, upgrade and self tests)
kola(cosaDir: "/srv", addExtTests: ["${env.WORKSPACE}/ci/run-kola-self-tests"])

stage("Build Metal") {
cosaParallelCmds(cosaDir: "/srv", commands: ["metal", "metal4k"])
}

stage("Build Live Images") {
// Explicitly test re-importing the ostree repo
shwrap("cd /srv && rm tmp/repo -rf")
utils.cosaCmd(cosaDir: "/srv", args: "buildextend-live --fast")
}

kolaTestIso(cosaDir: "/srv")

stage("Build Cloud Images") {
cosaParallelCmds(cosaDir: "/srv", commands: ["Aliyun", "AWS", "Azure", "DigitalOcean", "Exoscale", "GCP",
"IBMCloud", "OpenStack", "VMware", "Vultr"])

// quick schema validation
utils.cosaCmd(cosaDir: "/srv", args: "meta --get name")
}

stage("Compress") {
utils.cosaCmd(cosaDir: "/srv", args: "compress --fast")
}

stage("Upload Dry Run") {
utils.cosaCmd(cosaDir: "/srv", args: "buildupload --dry-run s3 --acl=public-read my-nonexistent-bucket/my/prefix")
}

// Random other tests that aren't about building. XXX: These should be part of `make
// check` or something and use dummy cosa builds.
stage("CLI Tests") {
shwrap("""
cd /srv
${env.WORKSPACE}/tests/test_pruning.sh
""")
}
}
11 changes: 10 additions & 1 deletion mantle/platform/api/aws/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,21 @@ func (a *API) finishSnapshotTask(snapshotTaskID, imageName string) (*Snapshot, e

details := taskRes.ImportSnapshotTasks[0].SnapshotTaskDetail

if details == nil || details.Status == nil {
plog.Debugf("waiting for import task; no details provided")
return false, "", nil
}

// I dream of AWS specifying this as an enum shape, not string
switch *details.Status {
case "completed":
return true, *details.SnapshotId, nil
case "pending", "active":
plog.Debugf("waiting for import task: %v (%v): %v", *details.Status, *details.Progress, *details.StatusMessage)
if details.Progress != nil && details.StatusMessage != nil {
plog.Debugf("waiting for import task: %v (%v): %v", *details.Status, *details.Progress, *details.StatusMessage)
} else {
plog.Debugf("waiting for import task: %v", *details.Status)
}
return false, "", nil
case "cancelled", "cancelling":
return false, "", fmt.Errorf("import task cancelled")
Expand Down
Loading