using the jx step stash command which stashes files from a build (test or coverage reports)
You can setup the default location to use for storage. We currently support:
storing files (logs, test or coverage reports) in a branch of a git repository. e.g. they could be part of your gh-pages branch for your static site.
storing files in Cloud Storage buckets like S3, GCS, Azure blobs etc
Storage uses classifications which are used to define the folder in which the kind of resources live such as
You can also use the special classification default which is used if you don’t have a configuration for the classification in question. e.g. you could define a location of default and then just configure where logs go if thats different.
Then to configure the storage location for a classification and team you use the jx edit storage
# Configure the tests to be stored in cloud storage (using S3 / GCS / Azure Blobs etc)
jx edit storage -c tests --bucket-url s3://myExistingBucketName
# Configure the git URL and branch of where to store logs
jx edit storage -c logs --git-url https://github.com/myorg/mylogs.git --git-branch cheese
Inside a pipeline you can then run the jx step stash command to stash files:
# lets collect some files with the file names relative to the 'target/test-reports' folder and store in a Git URL
jx step stash -c tests -p "target/test-reports/*" --basedir target/test-reports
# lets collect some files to a specific AWS cloud storage bucket
jx step stash -c coverage -p "build/coverage/*" --bucket-url s3://my-aws-bucket
specify the classifier via -c such as for tests or coverage etc.
specify the files to collect via -p which supports wildcards like *. files which will be stored with the relative directory path
if you want to remove a direectory prefix from the stashed files, like target/reports you can use --basedir to specify the directory to create relative file names from
By default jx step stash will use your team’s configured location for the classification you give. If you wish you can override the location for a stash using --git-url or --bucket-url