jenkins: upload params.json.gz to S3

This commit is contained in:
Beat Küng 2020-12-01 09:27:03 +01:00
parent f8989fe5aa
commit cedfae9e46
2 changed files with 12 additions and 4 deletions

5
Jenkinsfile vendored
View File

@ -112,8 +112,8 @@ pipeline {
sh 'make distclean'
sh 'make parameters_metadata'
dir('build/px4_sitl_default/docs') {
archiveArtifacts(artifacts: 'parameters.md, parameters.xml')
stash includes: 'parameters.md, parameters.xml', name: 'metadata_parameters'
archiveArtifacts(artifacts: 'parameters.md, parameters.xml, params.json.gz')
stash includes: 'parameters.md, parameters.xml, params.json.gz', name: 'metadata_parameters'
}
}
post {
@ -344,6 +344,7 @@ pipeline {
withAWS(credentials: 'px4_aws_s3_key', region: 'us-east-1') {
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'airframes.xml', path: 'Firmware/master/')
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'parameters.xml', path: 'Firmware/master/')
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'params.json.gz', path: 'Firmware/master/')
}
}
when {

View File

@ -112,9 +112,16 @@ private:
}
} else {
// TODO: use server uri
// TODO:
// - check for tagged version, use per-version files
// - generate & use board-specific file
if (snprintf(component_info.metadata_uri, sizeof(component_info.metadata_uri),
"https://px4-travis.s3.amazonaws.com/Firmware/master/%s", file)
>= (int)sizeof(component_info.metadata_uri)) {
PX4_ERR("url too long (%s)", file);
return false;
}
}
return true;
}