Improve daily build ci (#1520)

* get the link list when uploading artifacts

* back to depend on artifacts

* fix path and tooling

* fix tooling, errors, improve message

* fix path

* persist results
This commit is contained in:
Guillermo Vayá
2021-03-26 21:16:20 +01:00
committed by GitHub
parent be31e3eed0
commit a93e3bcb67

View File

@@ -231,6 +231,26 @@ jobs:
- store_artifacts:
path: ./dist
destination: packages
- run: wget -qO - https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key | apt-key add -
- run: apt-get update && apt-get -y install jq
- run:
name: "store url links"
command: |
echo $(pwd)
ls .
curl -H "Circle-Token: $CIRCLE_TOKEN" -H "Accept: application/json" -X GET "https://circleci.com/api/v2/project/github/mattermost/desktop/$CIRCLE_BUILD_NUM/artifacts" | jq -r '.items[].url' >> ./dist/artifactlist.txt
grep -v ".yml" ./dist/artifactlist.txt | grep -v "._" > ./templist.txt
echo "##### :tux: Linux" > ./dist/linklist.txt
grep "linux" ./templist.txt | awk -F/ '{print "- ["$NF"]("$0")"}' >> ./dist/linklist.txt
echo "##### :apple_logo: macOS" >> ./dist/linklist.txt
grep "macos" ./templist.txt | awk -F/ '{print "- ["$NF"]("$0")"}' >> ./dist/linklist.txt
echo "##### :windows: Windows" >> ./dist/linklist.txt
grep "win" ./templist.txt | awk -F/ '{print "- ["$NF"]("$0")"}' >> ./dist/linklist.txt
- persist_to_workspace:
root: ./dist
paths:
- ./linklist.txt
- ./artifactlist.txt
share_to_channel:
executor: wine-chrome
@@ -244,9 +264,8 @@ jobs:
- run:
name: "Get urls for sharing"
command: |
echo "Links for $(date +"%b-%d-%Y")" > ./links/linklist.txt
curl -H "Circle-Token: $CIRCLE_TOKEN" -H "Accept: application/json" -X GET "https://circleci.com/api/v2/project/github/mattermost/desktop/$CIRCLE_PREVIOUS_BUILD_NUM/artifacts" | jq -r '.items[].url' >> ./links/linklist.txt
echo "Retrieved links for job #${CIRCLE_PREVIOUS_BUILD_NUM}"
echo "Links for $(date +"%b-%d-%Y")" >> ./links/linklist.txt
cat ./dist/linklist.txt >> ./links/linklist.txt
- run:
command: |
linklist=$(<./links/linklist.txt);
@@ -455,6 +474,7 @@ workflows:
- mac_installer:
context: codesign-certificates
- store_artifacts:
context: desktop_browserview
# for master/PR builds
requires:
- build-linux