Orb version
1.3.1
What happened
job_type
deployment throws a ERROR: unknown association
error.
Example redacted output for a deployment workflow:
"github-username"
This job is passing, however another job in workflow is success
Update Jira with status: successful for 63
Results from Jira:
ERROR: unknown association
{
"acceptedDeployments": [
{
"pipelineId": "repo-name",
"environmentId": "ce36f16f-9b7f-4e36-8bb4-0262ca0a7e6f-Deploy to Dev",
"deploymentSequenceNumber": 63
}
],
"rejectedDeployments": [],
"unknownIssueKeys": [],
"unknownAssociations": [
{
"associationType": "serviceIdOrKeys",
"values": [
""
]
}
]
}
CircleCI received exit code 0
Oddly enough, the deployment is not rejected, and the final exit code is 0 (CircleCI received exit code 0
)
Expected behavior
Both build
AND deployment
job types don't throw errors?
Or if this mentioned error is more like a warning (what I'm assuming since the exit code is 0 and the deployment doesn't get rejected) it should be outputted as a Warning or Info message.
Config yaml
version: 2.1
orbs:
jira: circleci/[email protected]
jobs:
build-and-deploy-jira:
docker:
- image: mobomo/drupalstand-ci:0.1.4
steps:
- checkout
- run: echo "Holu :)"
workflows:
version: 2
commit:
jobs:
- test:
post-steps:
- jira/notify # default "build" job_type it shows no errors.
# Deployment for testing.
manual-deploy:
jobs:
- approve-dev-deployment:
type: approval
filters:
branches:
only:
- develop
- build-and-deploy-jira:
name: Deploy to Dev
post-steps:
- jira/notify:
environment_type: development
job_type: deployment
requires:
- approve-dev-deployment
More details
/tmp/jira-status.json
{
"deployments": [
{
"schemaVersion": "1.0",
"pipeline": {
"id": "repo-name",
"displayName": "#63 repo-name",
"url": "https://circleci.com/workflow-run/ce36f16f-9b7f-4e36-8bb4-0262ca0a7e6f"
},
"deploymentSequenceNumber": "63",
"updateSequenceNumber": "1614813995",
"displayName": "#63 repo-name - Deploy to Dev",
"description": "repo-name #63 Deploy to Dev Deploy to Dev",
"url": "https://circleci.com/gh/username/repo-name/91",
"state": "successful",
"lastUpdated": "2021-03-03T23:26:35+00:00",
"associations": [
{
"associationType": "issueKeys",
"values": [
"ABC-1234",
"ABC-1234"
]
},
{
"associationType": "serviceIdOrKeys",
"values": [
""
]
}
],
"environment": {
"id": "ce36f16f-9b7f-4e36-8bb4-0262ca0a7e6f-Deploy to Dev",
"displayName": "Deploy to Dev",
"type": "development"
}
}
]
}
/tmp/curl_response.txt
{
"acceptedDeployments": [
{
"pipelineId": "repo-name",
"environmentId": "ce36f16f-9b7f-4e36-8bb4-0262ca0a7e6f-Deploy to Dev",
"deploymentSequenceNumber": 63
}
],
"rejectedDeployments": [],
"unknownIssueKeys": [],
"unknownAssociations": [
{
"associationType": "serviceIdOrKeys",
"values": [
""
]
}
]
}
$ cat project/circleci-orb-jira.status
JIRA_BUILD_STATUS="successful"
So... what I guess I'm trying to clarify is if that "unknown association" error is actually an error preventing something in the Orb functionality to work, OR if we can ignore it and probably best to output it as Info message.
Thanks!
m