From 22d6ab6099ec62d4fb1e915ba772d332d2e318e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Trigo?= Date: Wed, 27 Apr 2016 23:08:43 +0200 Subject: [PATCH 1/6] Update bitrise.yml --- bitrise.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index c337113..3cf33a0 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -1,12 +1,12 @@ -format_version: 1.1.0 +format_version: 1.2.0 default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git app: envs: # define these in your .bitrise.secrets.yml - APK_PATH: $APK_PATH - - API_TOKEN: $API_TOKEN - - APP_ID: $APP_ID + - API_TOKEN: $APPLIVERY_API_TOKEN + - APP_ID: $APPLIVERY_APP_ID workflows: test: From 611595d1081c1f3a69c8c30c068d4e9ecd231dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Trigo?= Date: Wed, 27 Apr 2016 23:12:46 +0200 Subject: [PATCH 2/6] Update step.sh --- step.sh | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/step.sh b/step.sh index 37fb53e..3aef1bf 100644 --- a/step.sh +++ b/step.sh @@ -22,7 +22,7 @@ if [ ! -f "${apk_path}" ] ; then fi # APPLIVERY API TOKEN -if [ -z "${APPLIVERY_API_TOKEN}" ] ; then +if [ -z "${api_token}" ] ; then echo "# Error" echo '* No App APPLIVERY_API_TOKEN provided as environment variable. Terminating...' echoStatusFailed @@ -30,7 +30,7 @@ if [ -z "${APPLIVERY_API_TOKEN}" ] ; then fi # APPLIVER APP ID -if [ -z "${APPLIVERY_APP_ID}" ] ; then +if [ -z "${app_id}" ] ; then echo "# Error" echo '* No App APPLIVERY_APP_ID provided as environment variable. Terminating...' echoStatusFailed @@ -39,8 +39,17 @@ fi ############# DEFINITIONS ############## -api_token="${APPLIVERY_API_TOKEN}" -app_id="${APPLIVERY_APP_ID}" +bitrise_build_number="${BITRISE_BUILD_NUMBER}" +git_repository_url="${GIT_REPOSITORY_URL}" +bitrise_app_url="${BITRISE_APP_URL}" +bitrise_build_url="${BITRISE_BUILD_URL}" +bitrise_build_trigger_timestamp="${BITRISE_BUILD_TRIGGER_TIMESTAMP}" +bitrise_git_branch="${BITRISE_GIT_BRANCH}" +bitrise_git_tag="${BITRISE_GIT_TAG}" +bitrise_git_commit="${BITRISE_GIT_COMMIT}" +bitrise_git_message="${BITRISE_GIT_MESSAGE}" +bitrise_provision_url="${BITRISE_PROVISION_URL}" +bitrise_certificate_url="${BITRISE_CERTIFICATE_URL}" echo echo "========== CONFIGS ==========" @@ -50,8 +59,21 @@ echo "* version_name: ${version_name}" echo "* notes: ${notes}" echo "* notify: ${notify}" echo "* os: ${os}" +echo "* deployer: ${deployer}" echo "* tags: ${tags}" echo "* apk_path: ${apk_path}" +echo "***** Other variables *****" +echo "* bitrise_build_number: ${bitrise_build_number}" +echo "* git_repository_url: ${git_repository_url}" +echo "* bitrise_app_url: ${bitrise_app_url}" +echo "* bitrise_build_url: ${bitrise_build_url}" +echo "* bitrise_build_trigger_timestamp: ${bitrise_build_trigger_timestamp}" +echo "* bitrise_git_branch: ${bitrise_git_branch}" +echo "* bitrise_git_tag: ${bitrise_git_tag}" +echo "* bitrise_git_commit: ${bitrise_git_commit}" +echo "* bitrise_git_message: ${bitrise_git_message}" +echo "* bitrise_provision_url: ${bitrise_provision_url}" +echo "* bitrise_certificate_url: ${bitrise_certificate_url}" echo ########################### @@ -63,8 +85,20 @@ curl_cmd="$curl_cmd -F \"versionName=${version_name}\"" curl_cmd="$curl_cmd -F \"notes=${notes}\"" curl_cmd="$curl_cmd -F \"notify=${notify}\"" curl_cmd="$curl_cmd -F \"os=android\"" +curl_cmd="$curl_cmd -F \"deployer=bitrise\"" curl_cmd="$curl_cmd -F \"tags=${tags}\"" curl_cmd="$curl_cmd -F \"package=@${apk_path}\"" +curl_cmd="$curl_cmd -F \"bitrise_build_number=${bitrise_build_number}\"" +curl_cmd="$curl_cmd -F \"git_repository_url=${git_repository_url}\"" +curl_cmd="$curl_cmd -F \"bitrise_app_url=${bitrise_app_url}\"" +curl_cmd="$curl_cmd -F \"bitrise_build_url=${bitrise_build_url}\"" +curl_cmd="$curl_cmd -F \"bitrise_build_trigger_timestamp=${bitrise_build_trigger_timestamp}\"" +curl_cmd="$curl_cmd -F \"bitrise_git_branch=${bitrise_git_branch}\"" +curl_cmd="$curl_cmd -F \"bitrise_git_tag=${bitrise_git_tag}\"" +curl_cmd="$curl_cmd -F \"bitrise_git_commit=${bitrise_git_commit}\"" +curl_cmd="$curl_cmd -F \"bitrise_git_message=${bitrise_git_message}\"" +curl_cmd="$curl_cmd -F \"bitrise_provision_url=${bitrise_provision_url}\"" +curl_cmd="$curl_cmd -F \"bitrise_certificate_url=${bitrise_certificate_url}\"" curl_cmd="$curl_cmd https://dashboard.applivery.com/api/builds" echo @@ -117,4 +151,4 @@ envman add --key "APPLIVERY_DEPLOY_STATUS" --value "success" # final results echo "* Deploy Result: Success" -exit 0 \ No newline at end of file +exit 0 From 68ce5368f8633a7394cad96e18d7a64e02012c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Trigo?= Date: Wed, 27 Apr 2016 23:16:33 +0200 Subject: [PATCH 3/6] Update step.yml --- step.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/step.yml b/step.yml index 88d4cdf..ab88e70 100644 --- a/step.yml +++ b/step.yml @@ -30,7 +30,7 @@ inputs: summary: "" description: "" is_required: true - - api_token: "" + - api_token: "$APPLIVERY_API_TOKEN" opts: title: "Account API Key" summary: "" @@ -43,7 +43,7 @@ inputs: click on Developers menu option from the left side menu and copy it from the Account API Key section. is_required: true - - app_id: "" + - app_id: "$APPLIVERY_APP_ID" opts: title: "Applivery: App ID" summary: "" From 9ecc7627bb9bbfca915608ace75ca774415b7cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Trigo?= Date: Wed, 27 Apr 2016 23:17:17 +0200 Subject: [PATCH 4/6] Update step.sh --- step.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/step.sh b/step.sh index 3aef1bf..33765d8 100644 --- a/step.sh +++ b/step.sh @@ -59,7 +59,6 @@ echo "* version_name: ${version_name}" echo "* notes: ${notes}" echo "* notify: ${notify}" echo "* os: ${os}" -echo "* deployer: ${deployer}" echo "* tags: ${tags}" echo "* apk_path: ${apk_path}" echo "***** Other variables *****" From a8df11b02ddad6ad85b6015ba3060ee5b0339696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Trigo?= Date: Wed, 27 Apr 2016 23:17:43 +0200 Subject: [PATCH 5/6] Update step.sh --- step.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/step.sh b/step.sh index 33765d8..621da81 100644 --- a/step.sh +++ b/step.sh @@ -24,7 +24,7 @@ fi # APPLIVERY API TOKEN if [ -z "${api_token}" ] ; then echo "# Error" - echo '* No App APPLIVERY_API_TOKEN provided as environment variable. Terminating...' + echo '* No APPLIVERY_API_TOKEN provided as environment variable. Terminating...' echoStatusFailed exit 1 fi @@ -32,7 +32,7 @@ fi # APPLIVER APP ID if [ -z "${app_id}" ] ; then echo "# Error" - echo '* No App APPLIVERY_APP_ID provided as environment variable. Terminating...' + echo '* No APPLIVERY_APP_ID provided as environment variable. Terminating...' echoStatusFailed exit 1 fi From caba76086a50cf77480e05ab659e06cc88f357b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Trigo?= Date: Thu, 28 Apr 2016 00:45:00 +0200 Subject: [PATCH 6/6] Update step.sh --- step.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/step.sh b/step.sh index 621da81..ff31837 100644 --- a/step.sh +++ b/step.sh @@ -48,8 +48,6 @@ bitrise_git_branch="${BITRISE_GIT_BRANCH}" bitrise_git_tag="${BITRISE_GIT_TAG}" bitrise_git_commit="${BITRISE_GIT_COMMIT}" bitrise_git_message="${BITRISE_GIT_MESSAGE}" -bitrise_provision_url="${BITRISE_PROVISION_URL}" -bitrise_certificate_url="${BITRISE_CERTIFICATE_URL}" echo echo "========== CONFIGS ==========" @@ -71,8 +69,6 @@ echo "* bitrise_git_branch: ${bitrise_git_branch}" echo "* bitrise_git_tag: ${bitrise_git_tag}" echo "* bitrise_git_commit: ${bitrise_git_commit}" echo "* bitrise_git_message: ${bitrise_git_message}" -echo "* bitrise_provision_url: ${bitrise_provision_url}" -echo "* bitrise_certificate_url: ${bitrise_certificate_url}" echo ########################### @@ -96,8 +92,6 @@ curl_cmd="$curl_cmd -F \"bitrise_git_branch=${bitrise_git_branch}\"" curl_cmd="$curl_cmd -F \"bitrise_git_tag=${bitrise_git_tag}\"" curl_cmd="$curl_cmd -F \"bitrise_git_commit=${bitrise_git_commit}\"" curl_cmd="$curl_cmd -F \"bitrise_git_message=${bitrise_git_message}\"" -curl_cmd="$curl_cmd -F \"bitrise_provision_url=${bitrise_provision_url}\"" -curl_cmd="$curl_cmd -F \"bitrise_certificate_url=${bitrise_certificate_url}\"" curl_cmd="$curl_cmd https://dashboard.applivery.com/api/builds" echo