From a93e3bcb679dbb34cccf7017fbd5cf93c5cec343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Vay=C3=A1?= Date: Fri, 26 Mar 2021 21:16:20 +0100 Subject: [PATCH] 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 --- .circleci/config.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23f4f419..0931f259 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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