I would like to display which build step(s ?) failed in our slack notification.
I couldn't find any reference here http://plugins.drone.io/drone-plugins/drone-slack/
maybe you could try using the when clause on failure condition
notify:
slack:
channel: foo
when:
success: false
failure: true
change: true
here is the complete reference and example on drone notification
drone notify
Related
I'm using "cypress": "^8.7.0" and "#reportportal/agent-js-cypress": "^5.0.2" with node 14
My reportportal implementation is already running well with testcafe for another project. Now I tried setting it up with this project that uses cypress and the results just don't show up in RP. I followed every step shown here:
https://github.com/reportportal/agent-js-cypress
I turned on the debug option in the reporter options and I'm getting this output:
Finish test item ...
Success finish item ...
Finish test item ...
Success finish item ...
Finish launch ...
Success finish launch ...
This sounds like the launch worked but I do not see anything in RP. Does anyone have an idea what I'm missing?
Try adding /api/v1 at the end of your endpoint.
For example:
endpoint=https://reportportal.com/api/v1
I was facing the same issue with similar debug logs. Adding /api/v1 in the endpoint solved the problem for me.
Note - agent-js-cypress is not yet supported with Cypress 10.0 or above. Details https://github.com/reportportal/agent-js-cypress/issues/116
I'm totally new to testing, CircleCI, and software engineering generally. I put in a big shift today to try and write a simple Cypress test, use CircleCI to run it every hour, and post to Slack whether it was successful.
The first two I've managed, but integration with Slack has proven more difficult than I imagined. I suspect it's because I'm getting the config.yml wrong. Here's the code.
version: 2.1
orbs:
node: circleci/node#4.5.1
cypress: cypress-io/cypress#1.28.0
slack: circleci/slack#4.4.2
jobs:
notify:
executor:
name: node/default
steps:
- slack/notify:
channel: general
event: fail
template: basic_fail_1
mentions: '#Jac'
- slack/notify:
channel: general
event: pass
template: success_tagged_deploy_1
mentions: '#Jac'
workflows:
version: 2
commit-workflow:
jobs:
- cypress/run:
record: true
store_artifacts: true
- notify:
context: slack-secrets
thirty-min-workflow:
triggers:
- schedule:
cron: "0,30 * * * *"
filters:
branches:
only:
- main
jobs:
- cypress/run
- notify:
context: slack-secrets
The tests are running fine, as scheduled, and a notification is pushing to Slack, but the notification triggers as soon as the build starts and is not dependent on the outcome of the tests.
I've racked my brain on this final point for hours, so I'm hoping it's an easy fix!
I managed to figure this out. Fairly simple in the end. I added a post-steps property beneath cypress/run, which will run after the tests. By placing slack/notify beneath post-steps, it successfully ran after my tests and reflected the result.
Here's the config.yml file.
version: 2.1
orbs:
node: circleci/node#4.5.1
cypress: cypress-io/cypress#1.28.0
slack: circleci/slack#4.4.2
workflows:
version: 2
commit-workflow:
jobs:
- cypress/run:
post-steps:
- slack/notify:
channel: general
event: fail
template: basic_fail_1
mentions: '#Jack'
You can also add a when attribute to the cypress job and check for on_success value, if the job is successful then trigger slack notify job - for more help - https://circleci.com/docs/2.0/configuration-reference/#the-when-attribute
I am using npm package https://www.npmjs.com/package/serverless-step-functions-offline for running step functions offline. However I get the output form serverless as
Function "SaveSlotDetails" does not presented in serverless.yml
I have follwed the steps exactly as per the documentation, but I am not able to run the step function locally
Below is my serverless.yml file content for the related context
custom:
stepFunctionsOffline:
SaveSlotDetails:CreateSubscription
functions: # add 4 functions for CRUD
createSubscription:
handler: handlers/subscriptions.create
name: CreateSubscription
events:
- http:
path: subscriptions # path will be domain.name.com/dev/subscriptions
method: post
cors: true
stepFunctions:
stateMachines:
SlotCheckingMachine:
name: ProcessSlotAvailabilityStateMachine
definition:
StartAt: SaveSlotDetails
TimeoutSeconds: 3600
States:
SaveSlotDetails:
Type: Task
Resource: "arn:aws:lambda:us-east-1:269266452438:function:CreateSlot"
Next: "SearchSubscriptions"
I have tried using both function names createSubscription and
CreateSubscription, but nothing helps. I checked issues previously
raised, but doesn't help much
I am tried using versions 2.1.2 and 2.1.1, but doesn't work. Any help would be appreciated
Codeception plugin Recorder saves all the steps till failure if tests fails. e.g.
01.png - Success
02.png - Success
03.png - Failure
Is there any way how can I only save 03.png failure screenshot without having success screens saved along ?
Thank you in advanced
Codeception: v2.2.2
PhantomJS as webdriver: v2.1
delete_successful (default: true) - delete records for successfully passed tests (log only failed and errored)
from: http://codeception.com/addons#configuration
I had successfully create production build. When i am trying to access production build from chrome than i am getting below error
Error: [Ext.Loader] Failed loading synchronously via XHR:
'src/field/Select.js'; please verify that the file exists. XHR status
code: 404
I had already included Ext.field.Select as requires in app.js.
Please tell me what should i do now
Before the start of your script, i.e., in app.js. Try adding Ext.Loader.setConfig({ enabled: true }); Check this
or
Also, Set the src of sdk in app.js prod environment dir: Ext.Loader