ASM-15137 | Add Gateway URL to JWT/OAuth2 Authentication Method Resource #16
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
| name: Git Issues Jira Automation Pipeline | |
| on: | |
| issues: | |
| types: [opened, closed] | |
| issue_comment: | |
| types: [created] | |
| env: | |
| AKEYLESS_JIRA_BASE_URL: ${{ secrets.AKEYLESS_JIRA_BASE_URL }} | |
| AKEYLESS_JIRA_USER_EMAIL: ${{ secrets.AKEYLESS_JIRA_USER_EMAIL }} | |
| AKEYLESS_JIRA_ISSUE_TOKEN: ${{ secrets.AKEYLESS_JIRA_ISSUE_TOKEN }} | |
| jobs: | |
| git-issues-jira-automation: | |
| name: git-issues-jira-automation | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Login to Akeyless jira | |
| uses: atlassian/gajira-login@master | |
| env: | |
| JIRA_BASE_URL: ${{ secrets.AKEYLESS_JIRA_BASE_URL }} | |
| JIRA_USER_EMAIL: ${{ secrets.AKEYLESS_JIRA_USER_EMAIL }} | |
| JIRA_API_TOKEN: ${{ secrets.AKEYLESS_JIRA_ISSUE_TOKEN }} | |
| - name: Generate Git Issue Event Description For Jira | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| run: .github/scripts/git_issues/generate_jira_issue_data.sh | |
| - name: Find Existing Jira issue | |
| if: env.jira_issue_exist == 'true' | |
| uses: atlassian/gajira-find-issue-key@v3 | |
| with: | |
| string: ${{ env.akeyless_jira_issue }} | |
| - name: Create Jira issue | |
| if: env.jira_issue_exist == 'false' && github.event.action == 'opened' | |
| id: create-jira-issue | |
| uses: atlassian/gajira-create@v3 | |
| with: | |
| project: ASM | |
| issuetype: Bug-Field | |
| summary: ${{ env.jira_issue_summary }} | |
| description: ${{ env.jira_description }} | |
| fields: ${{ env.jira_fields }} | |
| - name: Log created issue | |
| if: steps.create-jira-issue.outcome == 'success' | |
| run: echo "Jira Issue ${{ steps.create-jira-issue.outputs.issue }} was created" | |
| - name: Label Create Git Issue | |
| uses: actions/github-script@v7 | |
| if: steps.create-jira-issue.outcome == 'success' | |
| with: | |
| script: | | |
| github.rest.issues.addLabels({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ["${{ steps.create-jira-issue.outputs.issue }}"] | |
| }) | |
| - name: Add Comment On Jira issue | |
| if: env.jira_issue_exist == 'true' && (github.event_name == 'issue_comment' || (github.event_name == 'issues' && github.event.action == 'closed')) | |
| uses: atlassian/gajira-comment@v3 | |
| with: | |
| issue: ${{ env.akeyless_jira_issue }} | |
| comment: ${{ env.jira_description }} | |
| - name: Transition issue | |
| if: github.event_name == 'issues' && github.event.action == 'closed' && env.jira_issue_exist == 'true' | |
| id: transition | |
| uses: atlassian/gajira-transition@v3 | |
| with: | |
| issue: ${{ env.akeyless_jira_issue }} | |
| transition: "Done" | |
| - name: Issue summary | |
| run: echo '### Github issue automation summary -${{ steps.create-jira-issue.outputs.issue }} ${{ env.jira_description }}! :rocket:' >> $GITHUB_STEP_SUMMARY |