Skip to content

Commit 7478c5e

Browse files
authored
Revert "[CI-3043] Switch to trigger-jenkins-job action (#253)" (#254)
This reverts commit 96f6120.
1 parent 96f6120 commit 7478c5e

File tree

5 files changed

+56
-96
lines changed

5 files changed

+56
-96
lines changed

.changeset/little-beans-admire.md

-5
This file was deleted.

create-jira-deployment/README.md

+19-18
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,35 @@ Installs package dependencies. Caches `node_modules` for faster subsequent insta
1010

1111
The list of arguments, that are used in GH Action:
1212

13-
| name | type | required | default | description |
14-
| ------------------------ | ------ | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15-
| `jenkins_url` | string || | Jenkins build instance URL |
16-
| `jenkins_user` | string || | Jenkins build user |
17-
| `jenkins_token` | string || | Jenkins build token |
18-
| `jenkins_client_id` | string || | Jenkins Client ID used with IAP |
19-
| `jenkins_sa_credentials` | string || | Jenkins service account credentials to use with IAP |
20-
| `token` | string || | GitHub token to create a deployment |
21-
| `environment-url` | string | | | URL of the environment |
22-
| `environment` | string || | Name for the target deployment environment |
23-
| `transient-environment` | string | | true | Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. |
24-
| `auto-inactive` | string | | true | Adds a new inactive status to all prior non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. An inactive status is only added to deployments that had a success state. |
25-
| `create-gh-deployment` | string | | false | Creates a Github Deployment along with JIRA Deployment |
13+
| name | type | required | default | description |
14+
| ----------------------- | ------ | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15+
| `token` | string || | GitHub token to create a deployment |
16+
| `environment-url` | string | | | URL of the environment |
17+
| `environment` | string || | Name for the target deployment environment |
18+
| `transient-environment` | string | | true | Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. |
19+
| `auto-inactive` | string | | true | Adds a new inactive status to all prior non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. An inactive status is only added to deployments that had a success state. |
20+
| `create-gh-deployment` | string | | false | Creates a Github Deployment along with JIRA Deployment |
2621

2722
### Outputs
2823

2924
Not specified
3025

26+
### ENV Variables
27+
28+
All ENV Variables, defined in a GH Workflow are also passed to a GH Action. It means, the might be reused as is.
29+
This is a list of ENV Variables that are used in GH Action:
30+
31+
| name | description |
32+
| --------------------- | -------------------------------------------------------------------------------- |
33+
| `JENKINS_USER` | Jenkins user |
34+
| `JENKINS_BUILD_TOKEN` | Jenkins build token. Keep in mind that tokens for `temploy` and `staging` differ |
35+
| `PROXY` | Proxy to use for Jenkins |
36+
3137
### Usage
3238

3339
```yaml
3440
- uses: toptal/davinci-github-actions/[email protected]
3541
with:
36-
jenkins_url: ${{ steps.parse_secrets.outputs.JENKINS_BUILD_URL }}
37-
jenkins_user: ${{ steps.parse_secrets.outputs.TOPTAL_TRIGGERBOT_USERNAME }}
38-
jenkins_token: ${{ steps.parse_secrets.outputs.TOPTAL_TRIGGERBOT_BUILD_TOKEN }}
39-
jenkins_client_id: ${{ steps.parse_secrets.outputs.JENKINS_BUILD_CLIENT_ID }}
40-
jenkins_sa_credentials: ${{ steps.parse_secrets.outputs.JENKINS_SA_CREDENTIALS }}
4142
token: ${{ env.GITHUB_TOKEN }}
4243
environment: staging
4344
environment-url: http://staging.example.com

create-jira-deployment/action.yml

+11-21
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
name: Create new Jira Deployment
22
description: |
33
It creates and engages a new Jira Deployment. Notice: Jira App must be installed in the repository.
4+
****
5+
envInputs:
6+
JENKINS_USER: Jenkins user
7+
JENKINS_BUILD_TOKEN: Jenkins build token. Keep in mind that tokens for `temploy` and `staging` differ
8+
PROXY: Proxy to use for Jenkins
49
510
inputs:
6-
jenkins_url:
7-
description: 'Jenkins build instance URL'
8-
required: true
9-
jenkins_user:
10-
description: 'Jenkins build user'
11-
required: true
12-
jenkins_token:
13-
description: 'Jenkins build token'
14-
required: true
15-
jenkins_client_id:
16-
description: 'Jenkins Client ID used with IAP'
17-
required: true
18-
jenkins_sa_credentials:
19-
description: 'Jenkins service account credentials to use with IAP'
20-
required: true
2111
token:
2212
required: true
2313
description: 'GitHub token to create a deployment'
@@ -40,6 +30,7 @@ inputs:
4030
default: 'false'
4131
description: Creates a Github Deployment along with JIRA Deployment
4232

33+
4334
runs:
4435
using: composite
4536
steps:
@@ -85,14 +76,13 @@ runs:
8576
uses: toptal/davinci-github-actions/get-workflow-sha@master
8677

8778
- name: Trigger `Create JIRA` deployment
88-
uses: toptal/actions/trigger-jenkins-job@main
79+
uses: toptal/jenkins-job[email protected]
8980
if: ${{ always() }}
9081
with:
91-
jenkins_url: ${{ inputs.jenkins_url }}
92-
jenkins_user: ${{ inputs.jenkins_user }}
93-
jenkins_token: ${{ inputs.jenkins_token }}
94-
jenkins_client_id: ${{ inputs.jenkins_client_id }}
95-
jenkins_sa_credentials: ${{ inputs.jenkins_sa_credentials }}
82+
jenkins_url: https://jenkins-build.toptal.net/
83+
jenkins_user: ${{ env.JENKINS_USER }}
84+
jenkins_token: ${{ env.JENKINS_BUILD_TOKEN }}
85+
proxy: ${{ env.PROXY }}
9686
job_name: create-jira-deployment
9787
job_params: |
9888
{

deploy-storybook/README.md

+12-20
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ The list of arguments, that are used in GH Action:
1212

1313
| name | type | required | default | description |
1414
| ------------------------ | ------------------------------------------ | -------- | ------------------ | ------------------------------------------------------------------------------------------- |
15-
| `jenkins_url` | string || | Jenkins main instance URL |
16-
| `jenkins_user` | string || | Jenkins user |
17-
| `jenkins_token` | string || | Jenkins main token |
18-
| `jenkins_client_id` | string || | Jenkins main Client ID used with IAP |
19-
| `jenkins_sa_credentials` | string || | Jenkins service account credentials to use with IAP |
2015
| `sha` | string || | Commit hash that will be used as a tag for the Docker image |
2116
| `environment` | enum<<br/>`temploy`,<br/>`staging`,<br/>>' || | Environment to deploy Storybook to |
2217
| `env-file` | string | | .env.temploy | `.env` file name from which to read variables. Required for temploy deployment only |
@@ -27,7 +22,7 @@ The list of arguments, that are used in GH Action:
2722
| `use-prebuilt-image` | string | | false | If a prebuilt Storybook Docker image should be used |
2823
| `jenkins-folder-name` | string | | | Jenkins folder where the deployment jobs are located |
2924
| `generate-types-command` | string | | false | Command to generate gql types |
30-
| `pr-number` | string | | false | Event number of the original pr, in case event number or issue number is not present |
25+
| `pr-number` | string | | | Event number of the original pr, in case event number or issue number is not present. . |
3126
| `checkout-token` | string | | | Repository checkout access token `GITHUB_TOKEN`. Required for self hosted runners |
3227
| `node-version` | string | | 18 | Node.js version used. The action is guaranteed to work only with Node.js@18 (default value) |
3328

@@ -40,26 +35,23 @@ Not specified
4035
All ENV Variables, defined in a GH Workflow are also passed to a GH Action. It means, the might be reused as is.
4136
This is a list of ENV Variables that are used in GH Action:
4237

43-
| name | description |
44-
| ------------------------------ | ---------------------------------------------------- |
45-
| `GITHUB_TOKEN` | GitHub token. Is used to checkout `davinci` branch |
46-
| `GCR_ACCOUNT_KEY` | Necessary token to push image to Google cloud |
47-
| `GCR_GQL_SCHEMAS_BUCKET_TOKEN` | Necessary token to pull GQL schema from Google Cloud |
48-
| `NPM_TOKEN` | Necessary token to install private dependencies |
38+
| name | description |
39+
| ------------------------------ | ------------------------------------------------------------------------------------- |
40+
| `GITHUB_TOKEN` | GitHub token. Is used to checkout `davinci` branch |
41+
| `GCR_ACCOUNT_KEY` | Necessary token to push image to Google cloud |
42+
| `GCR_GQL_SCHEMAS_BUCKET_TOKEN` | Necessary token to pull GQL schema from Google Cloud |
43+
| `JENKINS_DEPLOY_TOKEN` | Jenkins deployment token. Keep in mind that tokens for `temploy` and `staging` differ |
44+
| `NPM_TOKEN` | Necessary token to install private dependencies |
4945

5046
### Usage
5147

5248
```yaml
5349
- uses: toptal/davinci-github-actions/[email protected]
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.TOPTAL_DEVBOT_TOKEN }}
52+
GCR_ACCOUNT_KEY: ${{ secrets.GCR_ACCOUNT_KEY }}
53+
JENKINS_DEPLOY_TOKEN: ${{ secrets.TOPTAL_JENKINS_BUILD_TOKEN }}
5454
with:
55-
jenkins_url: ${{ steps.parse_secrets.outputs.JENKINS_URL }}
56-
jenkins_build_url: ${{ steps.parse_secrets.outputs.JENKINS_BUILD_URL }}
57-
jenkins_user: ${{ steps.parse_secrets.outputs.TOPTAL_TRIGGERBOT_USERNAME }}
58-
jenkins_token: ${{ steps.parse_secrets.outputs.TOPTAL_TRIGGERBOT_TOKEN }}
59-
jenkins_build_token: ${{ steps.parse_secrets.outputs.TOPTAL_TRIGGERBOT_BUILD_TOKEN }}
60-
jenkins_client_id: ${{ steps.parse_secrets.outputs.JENKINS_CLIENT_ID }}
61-
jenkins_build_client_id: ${{ steps.parse_secrets.outputs.JENKINS_BUILD_CLIENT_ID }}
62-
jenkins_sa_credentials: ${{ steps.parse_secrets.outputs.JENKINS_SA_CREDENTIALS }}
6355
sha: f41daf47ca1a72cc3f6eb50118eccfb2deadb613
6456
environment: temploy
6557
```

0 commit comments

Comments
 (0)