Is there a way to pass the verbose flag for Fastlane Pilot in a lane? - fastlane

I'm debugging my fastlane actions and lanes to understand if and how to make it faster, but have not found a way to pass the verbose flag to pilot action.

Yes, you can pass verbose: true to the pilot action.
For example
pilot(
username: my_user_name,
app_identifier: app_identifier,
ipa: "path/to/ipa_name.ipa",
verbose: true
)

I'm not tryied but maybe there exist a parameter pilot(verbose: true)
But as a workaround, you could call pilot with sh inside your lane
sh("pilot --verbose -Morearguments")

Related

Rundeck Conditional options variables

I have a question about rundeck (noob alert !)
I need to set conditionnal options variables, (don't know if its the good word).
For exemple, i want to launch a job with only one value option:
Customer01
and i need to have a relation between variable.
If i put Customer01 the other variable need to dynamic have default options:
exemple:
if
cust = Customer01ID
then ID = MyID and Oracle_schema = Myschema.
How can i make this working ?
Thanks a lot and forgive me if my problem is not clear.
A good way to do that is using cascade options, take a look at this answer.
Another way is just scripting, basing on an option selection and using an inline script step you can do anything based on the option selected, let me share a job definition based example (save as a YAML file and import to your instance to test it):
- defaultTab: nodes
description: ''
executionEnabled: true
id: e89a7cb0-2ecc-445d-b744-c1eebd540c91
loglevel: INFO
name: VariablesExample
nodeFilterEditable: false
options:
- name: customer_id
value: acme
plugins:
ExecutionLifecycle: null
scheduleEnabled: true
sequence:
commands:
- fileExtension: .sh
interpreterArgsQuoted: false
script: |-
database="none"
if [ "#option.customer_id#" = "fiat" ]; then
database="oracle"
else
database="postgresql"
fi
echo "setting $database"
scriptInterpreter: /bin/bash
keepgoing: false
strategy: node-first
uuid: e89a7cb0-2ecc-445d-b744-c1eebd540c91
Basically, the script takes the option value (#option.customer_id#) and based on that option sets the bash variable $database and does anything.
So, probably you're thinking about executing a specific step based on a job option, and for that, you can use the ruleset strategy (Rundeck Enterprise), which basically is a way to design complex workflows and a perfect scenario is to execute specific steps based on a job option selection.

How do I set basic options with meson?

I'm trying to configure a project with meson. Specifically, I'm trying to set some of the options.
meson config tells me, among other things:
Core options:
Option Current Value Possible Values Description
------ ------------- --------------- -----------
buildtype debug [plain, debug, debugoptimized, release, minsize, custom] Build type to use
Base options:
Option Current Value Possible Values Description
------ ------------- --------------- -----------
b_lto false [true, false] Use link time optimization
(other options were clipped from this printout of course.)
So, I write:
meson build . --buildtype=release
in my build directory, and this goes fine - no warnings or errors (I double-checked that the option value had changed). Then I write:
meson build . --b_lto=true
but this gets me:
meson: error: unrecognized arguments: --b_lto=true
I also tried -b_lto=true, --b_lto true, b_lto=true and b_lto true. And all of those without the true value. No luck.
How do I set these "base options" then?
The --option=value, and --option value styles to pass arguments only applies to the universial options section in meson's manual...so not to base options, and others. Instead use the -Doption=value syntax to set options. It is the suggested way, since meson setup --help declares [-D option] to be used for setting all sorts of options. See this answer by the meson team. So, in your case run:
meson build . -Db_lto=true
but, better use this ordering, since its specified this way in the manual (man meson).
meson -Db_lto=true build .
or
meson configure build -Db_lto=true
If the build directory changed since the last configure use reconfigure instead.
meson reconfigure build -Db_lto=true
or explicitly:
meson setup --reconfigure -Db_lto=true build

How can I hide skipped tasks output in Ansible

I have Ansible role, for example
---
- name: Deploy app1
include: deploy-app1.yml
when: 'deploy_project == "{{app1}}"'
- name: Deploy app2
include: deploy-app2.yml
when: 'deploy_project == "{{app2}}"'
But I deploy only one app in one role call. When I deploy several apps, I call role several times. But every time there is a lot of skipped tasks output (from tasks which do not pass condition), which I do not want to see. How can I avoid it?
I'm assuming you don't want to see the skipped tasks in the output while running Ansible.
Set this to false in the ansible.cfg file.
display_skipped_hosts = false
Note. It will still output the name of the task although it will not display "skipped" anymore.
UPDATE: by the way you need to make sure ansible.cfg is in the current working directory.
Taken from the ansible.cfg file.
ansible will read ANSIBLE_CONFIG,
ansible.cfg in the current working directory, .ansible.cfg in
the home directory or /etc/ansible/ansible.cfg, whichever it
finds first.
So ensure you are setting display_skipped_hosts = false in the right ansible.cfg file.
Let me know how you go
Since ansible 2.4, a callback plugin name full_skip was added to suppress the skipping of task names and skipping keyword in the ansible output. You can try the below ansible configuration:
[defaults]
stdout_callback = full_skip
Ansible allows you to control its output by using custom callbacks.
In this case you can simply use the skippy callback which will not output anything on a skipped task.
That said, skippy is now deprecated and will be removed in ansible v2.11.
If you don't mind losing colours you can elide the skipped tasks by piping the output through sed:
ansible-playbook whatever.yml | sed -nr '/^TASK/{h;n;/^skipping:/{n;b};H;x};p'
If you are using roles, you can use when to cancel the include in main.yml
# roles/myrole/tasks/main.yml
- include: somefile.yml
when: somevar is defined
# roles/myrole/tasks/somefile.yml
- name: this task will only run (and be seen in the output) if somevar is defined
debug:
msg: "Hello World"

Error while processing event 'click': "SyntaxError: Unexpected token u\n

I am using basic features with MinkZombieDriver. my
node -v 5.2.0, npm -v 3.10.5, mink-zombie-driver v1.4.0 ..
behat.yml
default:
extensions:
Behat\MinkExtension:
base_url: 'https://example.com'
javascript_session: zombie
zombie:
node_modules_path: '/home/ubuntu/node_modules'
goutte: ~
paths:
features: features
bootstrap: %behat.paths.features%/bootstrap
I wrote simple feature and it is giving Behat\Mink\Exception\DriverException
#javascript
Scenario: View Products to assign store
Given I am on "/index.php" # FeatureContext::visit()
When I fill in "Username" with "hello" # FeatureContext::fillField()
When I fill in "Password" with "123" # FeatureContext::fillField()
And I should see "Manage Your Accounts" # FeatureContext::assertPageContainsText()
When I press "login_button" # FeatureContext::pressButton()
Error while processing event 'click': "SyntaxError: Unexpected token u\n at Object.parse (native)\n
I searched in the web but not sure how to solve. I am still using the basic default features. I know the problem is with JSON parsing .. I am not sure what I am doing wrong? I am looking forward for any suggestions.. Thanks ..
As is seems from my comment link you need to update zombie version to at least version 2.
Please note that you might have some compatibility issues that you will need to solve.
Check this answer also nodejs cannot find module 'zombie' with PHP mink

Buildbot: how to skip a step if a file doesn't exist?

I need to skip a build step when building some branches.
More exactly, I want to execute a ShellCommand step only if the script to be ran is present on the source tree.
I tried:
ShellCommand(command=["myscript"],
workdir="path/to",
doStepIf=(lambda step: os.path.isfile("path/to/myscript")))
but the step is never executed.
def doesMyCriticalFileExist(step):
if step.getProperty("myCriticalFileExists"):
return True
return False
<factory>.addStep(SetProperty(command='[ -f /path/to/myscript ] && ls -1 /path/to/myscript || exit 0', property='myCriticalFileExists')))
<factory>.addStep(ShellCommand(command=["myscript"], workdir="path/to", doStepIf=doesMyCriticalFileExist))
The better thing to do is to set a property in a previous step and then check the property in your doStepif method. the os.path.isfile you have there gets run at configure time, (buildbot startup) not run time.
I ended up solving this by letting the step run unconditionally but setting haltOnFailure=False. This way if the required file doesn't exist it fails but doesn't kill the rest of the build.
Just use simple python if statement before the step:
if(condition):
your buildbot step