-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: [FX-4058] update jira deployment (#190)
- Loading branch information
Showing
4 changed files
with
49 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'davinci-github-actions': major | ||
--- | ||
|
||
- use jenkins to create jira deployment |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
GITHUB_WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
DEVBOT_TOKEN: ${{ secrets.TOPTAL_DEVBOT_TOKEN }} | ||
JENKINS_USER: ${{ secrets.TOPTAL_TRIGGERBOT_USERNAME }} | ||
JENKINS_BUILD_TOKEN: ${{ secrets.TOPTAL_TRIGGERBOT_BUILD_TOKEN }} | ||
PROXY: http://${{ secrets.HTTP_PROXY }} | ||
|
||
jobs: | ||
release: | ||
|
@@ -100,10 +103,11 @@ jobs: | |
run: | | ||
echo LATEST_TAG=$(git describe --tags --abbrev=0) >> $GITHUB_OUTPUT | ||
- uses: toptal/davinci-github-actions/[email protected] | ||
name: Create Production Jira deployment | ||
if: ${{ steps.changesets.outputs.published == 'true' }} | ||
- name: Create Jira Deployment | ||
uses: toptal/davinci-github-actions/create-jira-deployment@master | ||
with: | ||
token: ${{ env.DEVBOT_TOKEN }} | ||
environment: production | ||
environment-url: https://github.com/toptal/davinci-github-actions/releases/tag/${{ steps.tag-version.outputs.LATEST_TAG }} | ||
transient-environment: false | ||
auto-inactive: false |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
name: Create new Jira Deployment | ||
description: | | ||
It creates and engages a new Jira Deployment. Notice: Jira App must be installed in the repository. | ||
**** | ||
envInputs: | ||
JENKINS_USER: Jenkins user | ||
JENKINS_BUILD_TOKEN: Jenkins build token. Keep in mind that tokens for `temploy` and `staging` differ | ||
PROXY: Proxy to use for Jenkins | ||
inputs: | ||
token: | ||
|
@@ -54,3 +59,27 @@ runs: | |
deployment-id: ${{ steps.gh-deployment.outputs.deployment_id }} | ||
log-url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
state: 'failure' | ||
|
||
- name: Set appName | ||
id: repo | ||
if: ${{ always() }} | ||
shell: bash | ||
run: | | ||
echo APP_NAME=$(echo "${{ github.repository }}" | cut -d'/' -f2) >> $GITHUB_OUTPUT | ||
- name: Trigger `Create JIRA` deployment | ||
uses: toptal/[email protected] | ||
if: ${{ always() }} | ||
with: | ||
jenkins_url: https://jenkins-build.toptal.net/ | ||
jenkins_user: ${{ env.JENKINS_USER }} | ||
jenkins_token: ${{ env.JENKINS_BUILD_TOKEN }} | ||
proxy: ${{ env.PROXY }} | ||
job_name: create-jira-deployment | ||
job_params: | | ||
{ | ||
"appName": "${{ steps.repo.outputs.APP_NAME }}", | ||
"envName": "${{ inputs.environment }}", | ||
"sha": "${{ github.sha }}" | ||
} | ||
job_timeout: '3600' |