Slack message on build succeed, iOS (.ipa) not present on install page

#1

Hello! I have added the slack message on build succeed to my workflow, last week it worked perfectly, I was getting a message with an “install page” button that took me to a public page with a download .ipa link, so all my colleagues with registered test devices could download the app for testing.

However, the last 5 build I have only seen an .apk on the install page, not the iOS build. When i login to my dashboard -> latest build -> app & artifacts, I do see a generated ipa, and when i click the eye icon and expand, I do see that “public install page” is toggled ON

the link is: https://app.bitrise.io/artifact/14691443/p/b8247675940848a735c45d5bb070c1eb
but the link i receive in slack is: https://app.bitrise.io/artifact/14691429/p/c162831d6904ec7dbed7d3c7cd4cb47d which only contains the apk

- slack@3.1.2:
        inputs:
        - webhook_url: "$RASMUS_SLACK_WEBHOOK"
        - channel: "#build-mobile"
        - text: ''
        - channel_on_error: "#build"
        - text_on_error: Build failed test message
        - api_token: "$RASMUS_SLACK_API_TOKEN"

Are there a way to get both buttons? “install iOS” “install android” ? :slight_smile:

Happy Friday

0 Likes

#2

Hello there, it is because the deploy to bitrise.io only creates a public install page for the first artifact it finds, there is a workaround for this tho,
add a script step with the command
envman add --key APK_URL --value $BITRISE_PUBLIC_INSTALL_PAGE_URL
and then add a second deploy to bitrise.io step in which you specify the .ipa file as the deploy directory or file path that will create the second URL. in the slack step add another button like this: 48

0 Likes

#3

Sorry I’m a bit confused in which order what should go :confused:

build-test:
    steps:
    - activate-ssh-key@4.0.3:
        run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
    - git-clone@4.0.14: {}
    - npm@1.0.2:
        inputs:
        - command: install
    - npm@1.0.2:
        inputs:
        - command: test
    - ios-auto-provision@1.3.1:
        inputs:
        - generate_profiles: 'yes'
        - team_id: D97F7P64UX
    - xcode-archive@2.5.0:
        inputs:
        - export_method: development
        - team_id: D97F7P64UX
        - compile_bitcode: 'no'
        - upload_bitcode: 'no'
        - force_provisioning_profile: ''
        - project_path: "$BITRISE_PROJECT_PATH"
    - install-missing-android-tools@2.3.5:
        inputs:
        - gradlew_path: "$PROJECT_LOCATION/gradlew"
    - android-build@0.9.6:
        inputs:
        - variant: release
        - project_location: "$BITRISE_SOURCE_DIR/android"
        - module: app
    - deploy-to-bitrise-io@1.3.19: {}
    - slack@3.1.2:
        inputs:
        - webhook_url: "$RASMUS_SLACK_WEBHOOK"
        - channel: "#build-mobile"
        - text: ''
        - channel_on_error: "#build"
        - text_on_error: Build failed test message
        - api_token: "$RASMUS_SLACK_API_TOKEN" 

Can you point in my yml where to add the script step and the extra deploy? The slack step mod should be straight forward though

0 Likes

#4

like this I think

- deploy-to-bitrise-io@1.3.19: {}
- script@1.1.5:
    inputs:
    - content: |-
        #!/usr/bin/env bash
        # fail if any commands fails
        set -e
        # debug log
        set -x

        envman add --key APK_URL --value $BITRISE_PUBLIC_INSTALL_PAGE_URL
- deploy-to-bitrise-io@1.3.19:
    inputs:
    - deploy_path: "$BITRISE_IPA_PATH"
- slack@3.1.2:
    inputs:
    - buttons: |-
        View App|${BITRISE_APP_URL}
        View Build|${BITRISE_BUILD_URL}
        Ipa Page|${BITRISE_PUBLIC_INSTALL_PAGE_URL}
        Apk Page|${APK_URL}
0 Likes

#5

Awsome! This works super!!

Enjoy the weekend ! :beers:

1 Like

closed #6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

0 Likes