Hi team,
I am trying to use the slack notify pipeline to send custom messages on my pipeline build and i want to add the tagged versions of my pipeling in the messages can you please help me with how i can do that i am using slack notify version 0.3.3
Hi @Sri Karan ,
Could you please provide more details on what do you mean by "tagged versions of my pipeling"? Do you mean BITBUCKET_BUILD_NUMBER?
Hi @Viktoriia Kozopas we are using semtag to tag our build versions and want to send custom messages to slack with the version details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I guess I understand what you need.
To share the data between steps you may use artifacts that you configure in the pipeline. You may create the file to save data (in your case - version number) and then share it with the following step (for example - in the message variable of the slack-notify pipe).
In bitbucket-pipelines.yml it may look something like this:
pipelines:
default:
- step:
# ... previous steps ...
script:
- semtag getcurrent > ./version.txt # write version to file
artifacts:
- version.txt
- step:
script:
- pipe: atlassian/slack-notify:0.3.3
variables:
WEBHOOK_URL: $WEBHOOK_URL
MESSAGE: $(cat ./version.txt)
Hope this helps. Please, let us know if you have any questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Viktoriia Kozopas Thanks for your response will give it a try and let you know if i need further help on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Viktoriia Kozopas Can we add failure notification to slack as well using the slack notify pipeline?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sri Karan you can use $BITBUCKET_EXIT_CODE variable .
And add Slack notify pipe to the after-script section in the step similar to this question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.