Templates querying consul (services or KV) fails since Nomad 2.0.4 #10193
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright (c) HashiCorp, Inc. | |
| # SPDX-License-Identifier: MPL-2.0 | |
| on: | |
| issues: | |
| types: [labeled, opened, closed, deleted, reopened] | |
| issue_comment: | |
| types: [created] | |
| workflow_dispatch: | |
| name: Jira Issue Sync | |
| env: | |
| JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | |
| JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | |
| JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| name: Jira Issue sync | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Search | |
| if: github.event.action != 'opened' | |
| id: search | |
| uses: ./.github/actions/jira/search | |
| with: | |
| # cf[10089] is Issue Link (use JIRA API to retrieve) | |
| jql: 'cf[10089] = "${{ github.event.issue.html_url || github.event.pull_request.html_url }}"' | |
| - name: Create ticket if an issue is labeled with hcc/jira | |
| if: github.event.action == 'labeled' && github.event.label.name == 'hcc/jira' && !steps.search.outputs.issue | |
| uses: ./.github/actions/jira/create | |
| with: | |
| project: NMD | |
| issuetype: "GH Issue" | |
| summary: "${{ github.event.repository.name }} [GH Issue #${{ github.event.issue.number }}]: ${{ github.event.issue.title }}" | |
| description: "${{ github.event.issue.body || github.event.pull_request.body }}\n\n_Created in GitHub by ${{ github.actor }}._\n_Source: ${{ github.event.issue.html_url || github.event.pull_request.html_url }}_" | |
| # customfield_10089 is "Issue Link" | |
| # customfield_10371 is "Source" (use JIRA API to retrieve) | |
| # customerfield_10091 is "Team (R&D) | |
| # customfield_10001 is Team (jira default teams?) | |
| extraFields: '{ "customfield_10089": "${{ github.event.issue.html_url || github.event.pull_request.html_url }}", | |
| "customfield_10001": "72e166fb-d26c-4a61-b0de-7a290d91708f", | |
| "customfield_10371": { "value": "GitHub" }, | |
| "customfield_10091": ["NomadMinor"], | |
| "components": [{ "name": "nomad" }], | |
| "labels": ["community", "GitHub"] }' | |
| - name: Sync comment | |
| if: github.event.action == 'created' && steps.search.outputs.issue | |
| uses: ./.github/actions/jira/sync-comment | |
| with: | |
| issue: ${{ steps.search.outputs.issue }} | |
| comment: "${{ github.actor }} ${{ github.event.review.state || 'commented' }}:\n\n${{ github.event.comment.body || github.event.review.body }}\n\n${{ github.event.comment.html_url || github.event.review.html_url }}" | |
| - name: Close ticket | |
| if: ( github.event.action == 'closed' || github.event.action == 'deleted' ) && steps.search.outputs.issue | |
| uses: ./.github/actions/jira/transition | |
| with: | |
| issue: ${{ steps.search.outputs.issue }} | |
| transition: "Closed" | |
| resolution: "Done" | |
| fixed-version: "auto" | |
| project: NMD | |
| timeline-url: ${{ github.event.issue.timeline_url }} | |
| - name: Reopen ticket | |
| if: github.event.action == 'reopened' && steps.search.outputs.issue | |
| uses: ./.github/actions/jira/transition | |
| with: | |
| issue: ${{ steps.search.outputs.issue }} | |
| transition: "To Do" |