Open dannyBies opened 8 months ago
Hi @dannyBies,
Thanks for the feedback! We really appreciate it!
1) Unable to conditionally execute a step depending on the platform
We are planning to add this functionality soon. Thanks for the suggestion! Meanwhile (as you probably noticed) it's probably necessary to maintain two separate configs for each platform for now.
2) Unable to pass parameters into the config
You can try to do something like this to make it work for you really similarly
{
"build": {
"my-build-profile": {
"config": "my-config.yml",
"android": {
"env": {
"SLACK_URL": "android-specific-url"
}
},
"ios": {
"env": {
"SLACK_URL": "ios-specific-url"
}
}
}
}
}
build:
name: My config
steps:
...
- eas/send_slack_message:
if: ${ always() }
name: Send Slack message when the build finishes
inputs:
slack_hook_url: ${ eas.env.SLACK_URL }
For iOS the ios
env value will be used and for Android the android
one will be used.
3) Unable to generate a string inside of a custom function with newlines
Sounds like a real bug, we will try to replicate it and resolve the issue. Thanks for the report!
4) Custom builds that do not run
eas/build
cost the same amount as a normal build
I will get back to you on this
Hi @dannyBies , thank you for reporting
3) Unable to generate a string inside of a custom function with newlines
I have replicated the issue and can confirm that it is a bug. I will be working on the fix and let you know when it is done
Thanks for the quick updates, much appreciated!
Unable to pass parameters into the config
Thanks for the workaround! Ideally I don't want to use env
as that would mean it's possible for the value to be accessed by the app itself. In this scenario I would want this value to be only accessible to the build process for security reasons.
Hi @dannyBies , the fix for
3) Unable to generate a string inside of a custom function with newlines
is in review and should be live later today
I just finished setting up a slack bot to retrieve eas build info with slash commands. With this fix I'll be able to fully implement all of the slack integration points I was planning to make. Thanks for the hard work!
@dannyBies Messages with newline characters generated as output from other steps should work now
Build/Submit details page URL
No response
Summary
Hi!
I'm using Custom EAS Builds to set up slack integration with
eas/send_slack_message
. I appreciate this might belong in https://github.com/expo/eas-build but I'm not able to create a new issue there.I have created two almost identical build configs for android and ios. IOS:
Android:
Whilst trying to configure this I'm running into a couple issues:
1) Unable to conditionally execute a step depending on the platform
Ideally I want to use a single
yml
file where I configure my build steps. I would then be able to use2) Unable to pass parameters into the config
My
eas.json
currently looks likeDepending on the config I want to use a different
slack_url
, ideally I can do something like:3) Unable to generate a string inside of a custom function with newlines
I've tried to create a custom function that would generate a custom slack message, set that as it's output and then use this output inside the
eas/send_slack_message
. Unfortunately I could not get this to work properly. I would get the expected data in my slack channel but was unable to get it formatted correctly with newlines. I tried everything I could think of but had no luck. Using themessage:
input directly did work without issues so I've gone with this approach for now.4) Custom builds that do not run
- eas/build
cost the same amount as a normal buildDue to running into the above mentioned issues I had to create around 60 builds. To make it faster to test my various approaches I disabled the
eas/build
step and only had the slack integration running. I was surprised to find out that this costs the same amount as actually creating a full build. I'm wondering if in the future there could be a free/discounted rate for this?Managed or bare?
Managed
Environment
expo-env-info 1.2.0 environment info: System: OS: Windows 11 10.0.22631 Binaries: Node: 20.11.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD npm: 9.8.0 - C:\Program Files\nodejs\npm.CMD Expo Workflow: managed
Error output
No response
Reproducible demo or steps to reproduce from a blank project
My projectId is
a5c2db3f-5810-4a9e-8e9a-54a463a29af9
. You should be able to see all the builds I've created on there.