70_publish_comment.sh - Post a pipeline status comment to Jira
70_publish_comment.sh is normally not run on its own. The Bitbucket pipelines listed below call it as one step of a longer job, after earlier steps have prepared its inputs and environment. Run it by hand mainly for debugging or local testing.
Called from bitbucket -pipelines .yml :
1-populate-from-icpsr , step “Download”: line 97
1-populate-from-icpsr , step “Commit everything back”: line 278
2-merge-report , step “Combine Part A and B of the report”: line 295
3-split-report , step “Split REPLICATION.md into Part A and B of the report”: line 312
4-refresh-tools , step “Refresh the tools in this repository”: line 325
5-rename-directory , step “Rename a deposit directory”: line 347
6-convert-eps-pdf , step “Convert EPS and PDF to PNG”: line 378 , line 383
7-add-png , step “Add PNG images to REPLICATION.md”: line 391 , line 396
8-download-box-manifest , step “Download Box and create manifests”: line 413 , line 415 , line 419
9-download-sivacor , step “Download SIVACOR artifacts”: line 437 , line 440
10-find-cran-date , step “Find CRAN snapshot date from package file”: line 462 , line 467
r-refresh-lists-from-manifest , step “Re-list data and program files if the manifest changed”: line 485 , line 491
w-big-populate-from-icpsr , step “Download and commit”: line 520 , line 555
z-run-any-big , step “Run R or Stata code”: line 640
z-run-stata , step “Run Stata code” (shared step definition z-run-any-anchor): line 29
Called from other automation scripts:
Description ¶ Posts a comment to the Jira issue of this repository, using jira_add_comment.py . The pipelines call it when they start and when they finish. The ticket is taken from $jiraticket, then config.yml, then looked up from an openICPSR directory; when none is found, nothing is posted. Failures to post never stop the pipeline.
Usage ¶ ./automations/70_publish_comment.sh [pipeline-name] [status] [extra-message]
./automations/70_publish_comment.sh --config [pipeline-name] [extra-message]pipeline-name - Name of the Bitbucket pipeline. No built-in Bitbucket variable provides it, so the pipeline passes it.
status - started or completed (default: completed). Other values are used as given.
extra-message - Appended to the comment, for example the “Software detected: ...” line from 26_update_jira_software.sh .
--config - Post the uncommitted git diff -- config.yml instead of a status message. Nothing is posted when there is no diff.
The status comment links to the Bitbucket build, using BITBUCKET_WORKSPACE, BITBUCKET_REPO_SLUG and BITBUCKET_BUILD_NUMBER.
Environment Variables ¶