From 9e31a9d557c994fc2cc827c586141581f29a9972 Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Fri, 27 Jan 2023 16:32:42 +0000 Subject: [PATCH] pipeline refactor --- archive.sh | 5 +++++ bitbucket-pipelines.yml | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 archive.sh diff --git a/archive.sh b/archive.sh new file mode 100644 index 0000000..9784db8 --- /dev/null +++ b/archive.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +export REPORTPATH="target/test-reports/*.*" +curl -H "Authorization: Bearer ${BEARER_TOKEN}" -X POST "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"${REPORTPATH}" + diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 13d7807..0c514fb 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -12,5 +12,4 @@ pipelines: - mvn compiler:compile - mvn compiler:testCompile - mvn surefire:test - - export REPORTPATH="target/test-reports/*.*" - - #curl -H "Authorization: Bearer ${BEARER_TOKEN}" -X POST "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"${REPORTPATH}" + - ./archive.sh \ No newline at end of file