Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab-ci
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Clea OS
infrastructure
gitlab-ci
Commits
8deb0452
Commit
8deb0452
authored
2 years ago
by
Lorenzo Pagliai
Browse files
Options
Downloads
Patches
Plain Diff
[REPORT] Chaange path to changelog and build reports
* Add condition to use public container to store report when a tag occurs
parent
83904daa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
manifest-pipeline-yocto.yml
+9
-6
9 additions, 6 deletions
manifest-pipeline-yocto.yml
with
9 additions
and
6 deletions
manifest-pipeline-yocto.yml
+
9
−
6
View file @
8deb0452
...
@@ -623,8 +623,11 @@ notify:
...
@@ -623,8 +623,11 @@ notify:
echo -e "The changelog can be accessed by clicking on the **Changelog** button." >> Job_message.txt
echo -e "The changelog can be accessed by clicking on the **Changelog** button." >> Job_message.txt
echo -e "*We kindly ask developers to check job results so that in case of failures a fix to eventual bugs can be promptly made.*" >> Job_message.txt
echo -e "*We kindly ask developers to check job results so that in case of failures a fix to eventual bugs can be promptly made.*" >> Job_message.txt
AZURE_PATH="edgehog/reports"
if [ -n "$CI_COMMIT_TAG" ]; then
if [ -n "$CI_COMMIT_TAG" ]; then
tag=${CI_COMMIT_TAG}
tag=${CI_COMMIT_TAG}
AZURE_STORAGE_SAS_TOKEN="${AZURE_STORAGE_PUBLIC_SAS_TOKEN}"
AZURE_CONTAINER_NAME="${AZURE_PUBLIC_CONTAINER_NAME}"
else
else
tag=$(date +%Y%m%d)
tag=$(date +%Y%m%d)
fi
fi
...
@@ -641,33 +644,33 @@ notify:
...
@@ -641,33 +644,33 @@ notify:
--sas-token $AZURE_STORAGE_SAS_TOKEN \
--sas-token $AZURE_STORAGE_SAS_TOKEN \
--container-name $AZURE_CONTAINER_NAME \
--container-name $AZURE_CONTAINER_NAME \
--file Job_report_edgehog_${tag}.txt \
--file Job_report_edgehog_${tag}.txt \
--name
Build_reports
/Job_report_edgehog_${tag}.txt \
--name
${AZURE_PATH}
/Job_report_edgehog_${tag}.txt \
--overwrite
--overwrite
az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \
az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \
--sas-token $AZURE_STORAGE_SAS_TOKEN \
--sas-token $AZURE_STORAGE_SAS_TOKEN \
--container-name $AZURE_CONTAINER_NAME \
--container-name $AZURE_CONTAINER_NAME \
--file Link_report_edgehog_${tag}.txt \
--file Link_report_edgehog_${tag}.txt \
--name
Build_reports
/Link_report_edgehog_${tag}.txt \
--name
${AZURE_PATH}
/Link_report_edgehog_${tag}.txt \
--overwrite
--overwrite
az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \
az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \
--sas-token $AZURE_STORAGE_SAS_TOKEN \
--sas-token $AZURE_STORAGE_SAS_TOKEN \
--container-name $AZURE_CONTAINER_NAME \
--container-name $AZURE_CONTAINER_NAME \
--file Changelog_edgehog_${tag}.md \
--file Changelog_edgehog_${tag}.md \
--name
Build_reports
/Changelog_edgehog_${tag}.md \
--name
${AZURE_PATH}
/Changelog_edgehog_${tag}.md \
--overwrite
--overwrite
cp .gitlab-ci/notification.json .
cp .gitlab-ci/notification.json .
job_report="$(az storage blob url --container-name $AZURE_CONTAINER_NAME --name
Build_reports
/Job_report_edgehog_${tag}.txt)"
job_report="$(az storage blob url --container-name $AZURE_CONTAINER_NAME --name
${AZURE_PATH}
/Job_report_edgehog_${tag}.txt)"
job_report="$(echo $job_report | sed -E 's/\s.*$//')"
job_report="$(echo $job_report | sed -E 's/\s.*$//')"
jq --arg job_var $job_report '.potentialAction[0].targets[0].uri = $job_var' notification.json > notification_1.json
jq --arg job_var $job_report '.potentialAction[0].targets[0].uri = $job_var' notification.json > notification_1.json
link_report="$(az storage blob url --container-name $AZURE_CONTAINER_NAME --name
Build_reports
/Link_report_edgehog_${tag}.txt)"
link_report="$(az storage blob url --container-name $AZURE_CONTAINER_NAME --name
${AZURE_PATH}
/Link_report_edgehog_${tag}.txt)"
link_report="$(echo $link_report | sed -E 's/\s.*$//')"
link_report="$(echo $link_report | sed -E 's/\s.*$//')"
jq --arg link_var $link_report '.potentialAction[1].targets[0].uri = $link_var' notification_1.json > notification_2.json
jq --arg link_var $link_report '.potentialAction[1].targets[0].uri = $link_var' notification_1.json > notification_2.json
changelog_report="$(az storage blob url --container-name $AZURE_CONTAINER_NAME --name
Build_reports
/Changelog_edgehog_${tag}.md)"
changelog_report="$(az storage blob url --container-name $AZURE_CONTAINER_NAME --name
${AZURE_PATH}
/Changelog_edgehog_${tag}.md)"
changelog_report="$(echo $changelog_report | sed -E 's/\s.*$//')"
changelog_report="$(echo $changelog_report | sed -E 's/\s.*$//')"
jq --arg changelog_var $changelog_report '.potentialAction[2].targets[0].uri = $changelog_var' notification_2.json > notification_3.json
jq --arg changelog_var $changelog_report '.potentialAction[2].targets[0].uri = $changelog_var' notification_2.json > notification_3.json
sed -i -E 's/\\"//g' notification_3.json
sed -i -E 's/\\"//g' notification_3.json
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment