-
Notifications
You must be signed in to change notification settings - Fork 89
Automating SDK generation process #398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Raghunath-S-S-J
wants to merge
61
commits into
master
Choose a base branch
from
feature/sdk-automation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
a9529f3
replaced postman URL with PRISM Url for Accounting YML
4df0162
replace POSTMAN url with PRISM url for appstore related tests
fb295c4
Fixed issues w.r to Assets, Bankfeed yml
1b5bbdd
fixed test cases with Finance.yml
19d8b04
fixed test cases related to payroll UK APIs
8ee3e80
Fixed test cases with payroll nz api
f133c1b
Fixed test cases in project api
5119b37
Fixed test cases in payroll au api
9c2a680
fixed final issue findings
770bd4e
removed unused code
8efad97
PETOS-560 Adds Content Type for API Calls
4b860f6
Fixed review comment - Set content type only if it is available
2b6b528
Merge branch 'master' of https://github.com/XeroAPI/Xero-Java into fi…
59008a8
Merge branch 'master' of https://github.com/XeroAPI/Xero-Java into fi…
8ff765e
updated values from zero
90d068c
adds config file and reference from config file
024c46f
fixed review comments
ecd5581
simplified getting classes
334678d
removed duplicate codes
3f9c14c
fixed review comments - remove duplicates
349b76e
Updated Readme.md file for running test cases
7d19f0c
Merge pull request #385 from XeroAPI/PETOSS-560-Update-existing-tests…
vigneshk-tw 5f0112b
Merge branch 'master' of https://github.com/XeroAPI/Xero-Java into fi…
7dcdd2f
Merge pull request #384 from XeroAPI/fix/replace-postman-with-prism
vigneshk-tw cfbe8c1
Merge branch 'master' of https://github.com/XeroAPI/Xero-Java into fi…
f6c1cbb
Merge pull request #383 from XeroAPI/fix/replace-postman-with-prism-p…
vigneshk-tw d0a28a4
remove duplicate content type setting
b209452
Replaced byte content type by binary for octet-stream
8932890
initial commit
86faf0a
export gpg key
ac44e53
adds gpg passphrase as one input
d193628
adds a step to configure maven settings
70e8fda
simplified by having a separate settings.xml file
a15f876
adds working directory
3c84688
make the pipeline run only when release is created
f3bfe77
final commit
d2bc4eb
corrected review comments
516515d
corrected getting secrets
b224011
adds gpg passphrase in secret
ab0cad3
corrected build pipeline
09a5166
Merge pull request #387 from XeroAPI/PETOSS-533-Publish-Java-SDK-afte…
vigneshk-tw b603234
initial commit
vigneshk-tw 8d914c8
removed passphrase variable from java installation
vigneshk-tw b8a2f23
corrected the environment variable name for gpg passphrase
vigneshk-tw 9481ae0
fixed some other dependencies
vigneshk-tw 304be26
Merge pull request #389 from XeroAPI/PETOSS-516-Find-package-vulnerab…
vigneshk-tw 78bbe0a
ci: Added slack alert
d7187c1
ci: clean up
4e112c4
initial commit
vigneshk-tw f085eff
skip running tests
vigneshk-tw 4505f93
ci: testing the successflow
3940e80
ci: reverted the testing changes
7883f7f
ci: jira-576 Added the slack alert code
sangeet-joy-tw 6e3d72f
Merge branch 'master' into PETOSS-585-Enable-Test-Step-in-Code-Gen-an…
vigneshk-tw af2dac3
Merge branch 'master' of https://github.com/XeroAPI/Xero-Java into fi…
vigneshk-tw 7d098b9
remove skipping tests
vigneshk-tw 139cee2
remove check for prism kill
vigneshk-tw 95918ed
Merge pull request #391 from XeroAPI/PETOSS-585-Enable-Test-Step-in-C…
vigneshk-tw 4db21db
Merge branch 'master' into fix/replace-byte-by-binary
vigneshk-tw 6855f41
Merge pull request #386 from XeroAPI/fix/replace-byte-by-binary
vigneshk-tw 8fe87d1
resolved merge conflicts
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: slack-alert-action | ||
description: "Action to send slack payload to public-sdk-events channel" | ||
|
||
inputs: | ||
heading_text: | ||
required: true | ||
description: "Heading of the slack payload" | ||
alert_type: | ||
required: true | ||
description: "type of the slack alert" | ||
job_status: | ||
required: true | ||
description: "status of the job" | ||
XERO_SLACK_WEBHOOK_URL: | ||
required: true | ||
description: "webhook url for channel - public-sdk-events" | ||
job_url: | ||
required: true | ||
description: "job run id link" | ||
button_type: | ||
required: true | ||
description: "color for the check logs button" | ||
package_version: | ||
required: true | ||
description: "released package version" | ||
repo_link: | ||
required: true | ||
description: "link of the repo" | ||
|
||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
|
||
- name: Send slack notification | ||
id: slack | ||
uses: slackapi/[email protected] | ||
env: | ||
SLACK_WEBHOOK_URL: ${{inputs.XERO_SLACK_WEBHOOK_URL}} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | ||
with: | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "rich_text", | ||
"elements": [ | ||
{ | ||
"type": "rich_text_section", | ||
"elements": [ | ||
{ | ||
"type": "text", | ||
"text": "${{inputs.heading_text}} ", | ||
"style": { | ||
"bold": true | ||
} | ||
}, | ||
{ | ||
"type": "emoji", | ||
"name": "${{inputs.alert_type}}" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Repository:* \n ${{inputs.repo_link}}" | ||
}, | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Status:*\n ${{inputs.job_status}}" | ||
}, | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Package Version:*\n ${{inputs.package_version}}" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "actions", | ||
"elements": [ | ||
{ | ||
"type": "button", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "Check the logs", | ||
"emoji": true | ||
}, | ||
"style": "${{inputs.button_type}}", | ||
"url": "${{inputs.job_url}}" | ||
} | ||
] | ||
} | ||
] | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: Publish | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
release_number: ${{steps.get_latest_release_number.outputs.release_tag}} | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout Xero-Java repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: XeroAPI/Xero-Java | ||
path: Xero-Java | ||
|
||
- name: Set up JDK environment | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
cache: maven | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-passphrase: GPG_PASSPHRASE | ||
|
||
- name: Fetch Latest release number | ||
id: get_latest_release_number | ||
run: | | ||
latest_version=$(gh release view --json tagName --jq '.tagName') | ||
echo "Latest release version is - $latest_version" | ||
echo "::set-output name=release_tag::$latest_version" | ||
working-directory: Xero-Java | ||
env: | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Import GPG Key | ||
run: | | ||
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import | ||
env: | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY}} | ||
|
||
- name: Publish to Maven | ||
run: | | ||
export GPG_TTY=$(tty) | ||
mvn clean deploy -DskipTests=true | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_TOKEN }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
working-directory: Xero-Java | ||
|
||
notify-slack-on-success: | ||
runs-on: ubuntu-latest | ||
needs: publish | ||
if: success() | ||
steps: | ||
- name: Checkout Xero-Java repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: XeroAPI/Xero-Java | ||
path: Xero-Java | ||
|
||
- name: Send slack notification on success | ||
uses: ./Xero-Java/.github/actions/notify-slack | ||
with: | ||
heading_text: "Publish job has succeeded !" | ||
alert_type: "thumbsup" | ||
job_status: "Success" | ||
XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} | ||
job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" | ||
button_type: "primary" | ||
package_version: ${{needs.publish.outputs.release_number}} | ||
repo_link: ${{github.server_url}}/${{github.repository}} | ||
|
||
notify-slack-on-failure: | ||
runs-on: ubuntu-latest | ||
needs: publish | ||
if: failure() | ||
steps: | ||
- name: Checkout Xero-Java repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: XeroAPI/Xero-Java | ||
path: Xero-Java | ||
|
||
- name: Send slack notification on failure | ||
uses: ./Xero-Java/.github/actions/notify-slack | ||
with: | ||
heading_text: "Publish job has failed !" | ||
alert_type: "alert" | ||
job_status: "Failed" | ||
XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} | ||
job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" | ||
button_type: "danger" | ||
package_version: ${{needs.publish.outputs.release_number}} | ||
repo_link: ${{github.server_url}}/${{github.repository}} | ||
Comment on lines
+84
to
+104
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
|
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium