Closed akamalov closed 6 years ago
Have you tried setting:
# ...
params:
metadata: yes
payload_in_metadata: yes
on your on_{success,failure}
stanzas to get more debugging information out of the resource?
Thanks for your reply, @jhunt . Here is my pipeline:
jobs:
- name: export-om-installation
serial: true
plan:
- aggregate:
- get: bbr-pipeline-tasks-repo
trigger: true
- task: export-om-installation
file: bbr-pipeline-tasks-repo/tasks/export-om-installation/task.yml
params:
SKIP_SSL_VALIDATION: ((skip-ssl-validation))
OPSMAN_URL: ((opsman-url))
OPSMAN_USERNAME: ((opsman-username))
OPSMAN_PASSWORD: ((opsman-password))
- put: om-backup-artifact
params:
file: om-installation/installation.zip
inputs:
- name: export-om-installation
outputs:
- name: notify_message
on_success:
put: slack-alert
params:
channel: '#cloudeng'
metadata: yes
payload_in_metdata: yes
text_file: notify_message/success-export-om-installation
silent: false
on_failure:
put: slack-alert
params:
channel: '#cloudeng'
metadata: yes
text_file: notify_message/failure-export-om-installation
silent: false
resource_types:
- name: pivnet
type: docker-image
source:
repository: pivotalcf/pivnet-resource
tag: latest-final
- name: slack-notification
type: docker-image
source:
repository: cfcommunity/slack-notification-resource
resources:
- name: slack-alert
type: slack-notification
source:
url: ((slack-webhook))
- name: bbr-pipeline-tasks-repo
type: git
source:
uri: https://github.com/pivotal-cf/bbr-pcf-pipeline-tasks.git
branch: master
- name: om-backup-artifact
type: s3
source:
bucket: ((backup-artifact-bucket))
region_name: ((storage-region))
endpoint: ((storage-endpoint))
access_key_id: ((storage-access-key-id))
secret_access_key: ((storage-secret-access-key))
versioned_file: installation.zip
use_v2_signing: ((storage-use-v2-signing))
disable_ssl: ((disable_ssl))
However, unfortunately it is still showing in Slack that no notification provided
.
Alex
Found better slack-notification-resource: https://github.com/arbourd/concourse-slack-alert-resource
:+1:
This is still a bug in this repo though...
I am trying to create Concourse (3.14.0) pipeline which using latest slack-notification-resource notifies a slack channel if the job has successfully completed or not. While pipeline notification does go through, it only posts text message supplied in the pipeline, but does not read from a directory where text messages are kept. I keep notify_message directory under repository root directory, with pre-configured messages.
Here is my pipeline:
So far, I only get the text - example: "Task: Export OM Installation is Successful!", the same goes for BOSH-ERT backup. That's it. No body.
My sample message in the text file is
FILE: notify_message/success-export-om-installation
"Pipeline job successfully completed. Please navigate to https://xxxxxxx:8080 for your complete job status"
So far, what I am getting is this:
What should I do to swtich from
text
totext_file
? I think for some reason pipeline is not picking upnotify_message/<message_file>
. Any pointers? What is it I am doing wrong here?Thanks again!!