aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMenny Even Danan <menny@evendanan.net>2020-02-07 18:30:40 +0000
committerMenny Even Danan <menny@evendanan.net>2020-02-07 20:45:43 +0000
commit6edc8f1bb8c1c4308c20f50c039fc9719e70d5ba (patch)
treeed272c5945c786c67518643be5e902148813665f
parentaf1d80de6c8fa08b2c596ca309a58e11b7f41c92 (diff)
downloadAnySoftKeyboard-6edc8f1bb8c1c4308c20f50c039fc9719e70d5ba.tar.gz
AnySoftKeyboard-6edc8f1bb8c1c4308c20f50c039fc9719e70d5ba.tar.bz2
Fix deploy-reports folder
-rwxr-xr-x.github/actions/deploy-request/request.sh32
-rw-r--r--.github/workflows/checks.yml8
-rw-r--r--.github/workflows/deploy.yml4
3 files changed, 21 insertions, 23 deletions
diff --git a/.github/actions/deploy-request/request.sh b/.github/actions/deploy-request/request.sh
index 9002fb399..f767be262 100755
--- a/.github/actions/deploy-request/request.sh
+++ b/.github/actions/deploy-request/request.sh
@@ -3,14 +3,13 @@ set -e
REF_TO_DEPLOY="${1}"
#we are using exact SHA to deploy, and not branc (which can move)
-SHA_TO_DEPLOY="${1}"
-API_USERNAME="${2}"
-API_TOKEN="${3}"
-OUTPUT="${4}"
+SHA_TO_DEPLOY="${2}"
+API_USERNAME="${3}"
+API_TOKEN="${4}"
+OUTPUT="${5}"
-TEMP_FOLDER="/tmp/${OUTPUT}"
-rm -rf "${TEMP_FOLDER}" || true
-mkdir -p "${TEMP_FOLDER}"
+rm -rf "${OUTPUT}" || true
+mkdir -p "${OUTPUT}"
function deployment_request() {
echo "making request to: ${1}"
@@ -21,10 +20,18 @@ function deployment_request() {
--arg jsonDescription "${2}" \
'{ ref: $jsonRef, task: "deploy", auto_merge: false, environment: $jsonDeployTarget, description: $jsonDescription, required_contexts: [ "push-ready" ] }' )
- local JSON_FILENAME="${TEMP_FOLDER}/deployment_request_${1}.json"
+ local JSON_FILENAME="${OUTPUT}/deployment_request_${1}.json"
echo "${JSON_TEXT}" > "${JSON_FILENAME}"
-
- curl -u "${API_USERNAME}:${API_TOKEN}" -o "${TEMP_FOLDER}/deployment_response_${1}.json" -d "@${JSON_FILENAME}" https://api.github.com/repos/AnySoftKeyboard/AnySoftKeyboard/deployments
+ cat "${JSON_FILENAME}"
+ set +e
+ curl --fail -u "${API_USERNAME}:${API_TOKEN}" -o "${OUTPUT}/deployment_response_${1}.json" -d "@${JSON_FILENAME}" https://api.github.com/repos/AnySoftKeyboard/AnySoftKeyboard/deployments
+ local curl_exit_code=$?
+ set -e
+ echo "response with exit-code ${curl_exit_code}:"
+ cat "${OUTPUT}/deployment_response_${1}.json"
+ if [[ ${curl_exit_code} -ne 0 ]]; then
+ exit ${curl_exit_code}
+ fi
}
#some deploy logic
@@ -34,8 +41,3 @@ if [[ "${REF_TO_DEPLOY}" == "refs/heads/master" ]]; then
elif [[ "${REF_TO_DEPLOY}" == "release-branch-v"* ]]; then
deployment_request "app_beta" "Deployment request by ${API_USERNAME}"
fi
-
-rm -rf "${OUTPUT}" || true
-mkdir -p "${OUTPUT}"
-
-mv "${TEMP_FOLDER}" "${OUTPUT}"
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index 646698e3f..fd6a945b4 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -194,6 +194,7 @@ jobs:
if: github.event_name == 'push'
needs: [push-ready]
runs-on: ubuntu-18.04
+ container: menny/ndk_ask:1.13.5
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/deploy-request
@@ -202,9 +203,4 @@ jobs:
sha: ${{ github.sha }}
api_user_name: ${{ secrets.BOT_MASTER_RW_GITHUB_USERNAME }}
api_user_token: ${{ secrets.BOT_MASTER_RW_GITHUB_TOKEN }}
- reports_folder: deploy-reports
- - uses: actions/upload-artifact@v1.0.0
- if: always()
- with:
- name: deploy-request
- path: deploy-reports
+ reports_folder: build/deploy-reports
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 39e628efe..be787b362 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -27,7 +27,7 @@ jobs:
- uses: ./.github/actions/deploy
if: startsWith(github.event.deployment.environment, 'app')
with:
- deploy_target: ${{ github.event.environment }}
+ deploy_target: ${{ github.event.deployment.environment }}
crash_report_email: ${{ secrets.ANYSOFTKEYBOARD_CRASH_REPORT_EMAIL }}
keystore_url: ${{ secrets.ANYSOFTKEYBOARD_KEYSTORE_URL }}
keystore_password: ${{ secrets.ANYSOFTKEYBOARD_KEYSTORE_PASSWORD }}
@@ -38,7 +38,7 @@ jobs:
- uses: ./.github/actions/deploy
if: startsWith(github.event.deployment.environment, 'addons')
with:
- deploy_target: ${{ github.event.environment }}
+ deploy_target: ${{ github.event.deployment.environment }}
crash_report_email: ${{ secrets.ANYSOFTKEYBOARD_CRASH_REPORT_EMAIL }}
keystore_url: ${{ secrets.PACK_KEYSTORE_URL }}
keystore_password: ${{ secrets.PACK_KEYSTORE_PASSWORD }}