CodeMagic Automatic build is not triggered though it receives the webhook from github - codemagic

Automatic build is not triggered though it receives the webhook from github. Any input would be helpful.
codemagic.yml snippet
ionic-capacitor-android-app-qa:
name: tulip-fp
environment:
node: latest
triggering:
events:
- tag
branch_patterns:
- pattern: β€œuat”
include: true
source: true
tag_patterns:
- pattern: β€œ*”
include: true
....
Recent deliveries:

I have worked with #codemagic and here is the solutions -
Change "uat" to 'uat'. Basically use single quote in the pattern
Also make sure in the WebHook configuration in GitHub, "push" trigger is checked.
ionic-capacitor-android-app-qa:
name: tulip-fp
environment:
node: latest
triggering:
events:
- tag
- push
branch_patterns:
- pattern: 'uat'
include: true
source: true
tag_patterns:
- pattern: '*'
include: true

Related

Spring boot 2 micormeter to statsd prefix not appending to the metrics

I've migrated spring boot 1.x to spring boot 2 with micrometer for metrics. After which could see the metrics in graphite via statsd. But, i can't see it with the prefix
After that i tried for basic prototype by following Configure micrometer-registry-statsd in spring boot 2. But, can't see metrics with prefix. It is showing from the registry name only
config:
management:
health:
defaults:
enabled: true
metrics:
enable:
example:
remote: true
export:
atlas:
enabled: false
statsd:
enabled: true
host: xx.xxx.xx.xx
port: xxxx
flavour: xxxx
step: 10s
**prefix: abc.xy**
security:
enabled: false
when i tried to print the statsdConfig properties the prefix shows as default value "statsd". After which i set the prefix property in the code too. That too didn't help.
Please share details on how to append the statsd.prefix

How to restart a systemd service with salt?

I am trying to build an .sls file which will always restart a service:
systemd-resolved:
service.running:
- restart: True
When deployed, this gives
ID: systemd-resolved
Function: service.running
Result: True
Comment: The service systemd-resolved is already running
Started: 23:46:49.999789
Duration: 53.068 ms
Changes:
This is correct, the service is already running. What I was trying to convey with this command is to restart it. How to do that?
Note: I would like to avoid, if possible, an explicit command to be ran (as I feel it i snot very salt-like - this should rather be handled by the appropriate module):
'systemctl restart systemd-resolved':
cmd.run
If you want your service to reload you need to set reload: True instead.
Beside, If you only want to restart the service if there is any change in any other state, you need to use watch instead.
for instance,
systemd-resolved:
service.running:
- enable: True
- reload: True
- watch:
- pkg: <abc>

How to trigger an action upon change of state?

I am testing salt as a management system, using ansible so far.
How can I trigger an action (specifically, a service reload) when a state has changed?
In Ansible this is done via notify but browsing salt documentation I cannot find anything similar.
I found watch, which works the other way round: "check something, and if it changed to this and that".
there is also listen which seems to be closer to my needs (the documentation mentions a service reload) but I cannot put together the pieces.
To set an example, how the following scenario would work in salt: check a git repo (= create it if not existing or pull from it otherwise) and if it has changed, reload a service? The Ansible equivalent is
- name: clone my service
git:
clone: yes
dest: /opt/myservice
repo: http://git.example.com/myservice.git
version: master
force: yes
notify:
- restart my service if needed
- name: restart my service if needed
systemd:
name: myservice
state: restarted
enabled: True
daemon_reload: yes
Your example:
ensure my service:
git.latest:
- name: http://git.example.com/myservice.git
- target: /opt/myservice
service.running:
- watch:
- git: http://git.example.com/myservice.git
When there will be change in repo (clone for the first time, update etc.)
the state will be marked as "having changes" thus the dependent states -
service.running in this case - will require changes, for service it means to restart
What you are asking is covered in salt quickstart

Service is already enabled, and is dead

I have the following states:
copy_over_systemd_service_files:
file.managed:
- name: /etc/systemd/system/consul-template.service
- source: salt://mesos/files/consul-template.service
- owner: consul
start_up_consul-template_service:
service.running:
- name: consul-template
- enable: True
- restart: True
- require:
- file: copy_over_systemd_service_files
- watch:
- /etc/systemd/system/consul-template.service
when I run my state file I get the following error:
ID: start_up_consul-template_service
Function: service.running
Name: consul-template
Result: False
Comment: Service consul-template is already enabled, and is dead
Started: 17:27:38.346659
Duration: 2835.888 ms
Changes:
I'm not sure what this means. All I want to do is restart the service once it's been copied over and I've done this before without issue. Looking back through the stack trace just shows that Salt ran systemctl is-enabled consult-template
I think I was over complicating things. Instead I'm doing this:
consul-template:
service.running:
- require:
- file: copy_over_systemd_service_files
- watch:
- /etc/systemd/system/consul-template.service

symfony2 monolog command output to console in dev

I'm trying to set up a console command in Symfony2 so that it logs to the console in my dev environment, but to a logfile in prod.
so my config_prod.yml has this:
monolog:
handlers:
payment:
type: stream
path: %kernel.logs_dir%/payment.log
channels: payment
while my config_dev.yml uses this:
monolog:
handlers:
console:
type: console
channels: payment
and the service is defined in services.yml like this:
payment_manager:
class: My\Bundle\Service\PaymentManager
arguments: [#doctrine.orm.entity_manager, #logger]
tags:
- { name: monolog.logger, channel: payment }
To my surprise, this does squat nothing. Output goes to app/logs/dev.log instead of the console. Why?
It turns out that "console" doesn't actually mean console at all, it means "browser's javascript console".
If you came here because you have the same question, here's how to do it:
output:
type: stream
path: php://stdout
level: info

Resources