Try to save artifacts to Minio

This commit is contained in:
Ana Gelez 2020-07-26 19:29:59 +02:00
parent 5d3b3485fa
commit 15cbd17003

View file

@ -78,6 +78,21 @@ local cachedPipeline(name, commands) = basePipeline(
] ]
); );
// This function creates a step to upload artifacts to Minio
local upload(name, source) = {
name: name,
image: 'plugins/s3',
settings: {
bucket: 'artifacts',
source: source,
target: '/',
path_style: true,
endpoint: 'http://127.0.0.1:9000',
access_key: { from_secret: 'minio_key' },
secret_key: { from_secret: 'minio_secret' },
},
};
// Here starts the actual list of pipelines! // Here starts the actual list of pipelines!
@ -142,11 +157,14 @@ local Integration(db) = cachedPipeline(
// It should also deploy the SQlite build to a test instance // It should also deploy the SQlite build to a test instance
// located at https://pr-XXX.joinplu.me (but this system is not very // located at https://pr-XXX.joinplu.me (but this system is not very
// stable, and often breaks). // stable, and often breaks).
// local Release(db) = basePipeline(
// TODO: save the artifacts that are generated somewhere
local Release(db) = cachedPipeline(
"release-" + db, "release-" + db,
[ [
restoreCache,
{
name: 'release-' + db,
image: plumeEnv,
commands: [
"cargo web deploy -p plume-front --release", "cargo web deploy -p plume-front --release",
"cargo build --release --no-default-features --features=" + db + " -p plume", "cargo build --release --no-default-features --features=" + db + " -p plume",
"cargo build --release --no-default-features --features=" + db + " -p plume-cli", "cargo build --release --no-default-features --features=" + db + " -p plume-cli",
@ -154,6 +172,11 @@ local Release(db) = cachedPipeline(
] + if db == "sqlite" then ] + if db == "sqlite" then
[ "./script/upload_test_environment.sh" ] else [ "./script/upload_test_environment.sh" ] else
[] []
},
upload('artifacts-' + db, '*.tar.gz'),
saveCache,
]
); );
// PIPELINE 6: upload the new PO templates (.pot) to Crowdin // PIPELINE 6: upload the new PO templates (.pot) to Crowdin