Skip to content

Commit

Permalink
CLOUD-2914 Upload and Deploy Application through PCL (#3)
Browse files Browse the repository at this point in the history
* CLOUD-2914 Added custom action to execute pcl

* CLOUD-2914 Added unit test

* CLOUD-2914 fixed download

* CLOUD-2914 Added output

* CLOUD-2914 debug

* CLOUD-2914 added console log

* CLOUD-2914 update distribution

* CLOUD-2914 Added subscription name input

* CLOUD-2914 comment deploy function

* CLOUD-2914 fixed artifact input

* CLOUD-2914 Removed double quote

* CLOUD-2914 reverted build

* CLOUD-2914 Removed spaces

* CLOUD-2914 Added debug pcl path

* CLOUD-2914 Added deploy input

* CLOUD-2914 Updated build file

* CLOUD-2914 Removed broken distribution

* CLOUD-2914 Added distributed file

* CLOUD-2914 Removed unnecessary debugger

* CLOUD-2914 Removed excessive try-catch

* CLOUD-2914 Removed env file

* CLOUD-2914 Updated README

* Fixed description

Co-authored-by: Patrik Duditš <[email protected]>

* CLOUD-2914 updated app_name to be optional

* CLOUD-2914 Updated readme

* CLOUD-2914 debug mode

* CLOUD-2914 Removed debugger

* CLOUD-2914 added which java to use

* CLOUD-2914 rebuild the dist

* CLOUD-2914 Updated the readme

* Updated deploy input description

* Update app_name input description

* CLOUD-2914 Updated test

* CLOUD-2914 build

---------

Co-authored-by: Patrik Duditš <[email protected]>
  • Loading branch information
arieki and pdudits authored Jan 20, 2025
1 parent dc9097d commit 4f9131d
Show file tree
Hide file tree
Showing 12 changed files with 36,466 additions and 65 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,30 @@
This repository contains a GitHub Action to automate the deployment of your application to Payara Cloud using the Payara Cloud CLI (PCL). The action allows you to deploy a .war file to Payara Cloud by specifying various parameters like the subscription id, namespace, app name, and artifact location.

### Features
- Upload artifacts to Payara Cloud.
- Deploy Java applications to Payara Cloud.

---

## Inputs

- `cloud_subscription_id`: **Required**. The subscription ID of your Payara Cloud account.
- `token`: **Required**. The Payara Cloud CLI token. You can create a token by running `pcl login --print-token` and following the instructions.
- `subscription_name`: **Optional**. Only required if your account has access to multiple subscriptions. Provide the subscription name to specify which subscription to use.
- `namespace`: **Required**. The namespace under which your app will be deployed (e.g., your-namespace).
- `app_name`: **Required**. The name of the app to deploy (e.g., your-app).
- `app_name`: **Optional**. The name of the app to deploy (e.g., your-app). If not specified, it will be inferred from the WAR file name.
- `artifact_location`: **Required**. The path to the .war file to deploy (e.g., ./target/my-app.war).
- `deploy`: **Optional**. Set to `false` if the application should only be uploaded to Payara Cloud, but not deployed. Set to `true` to upload and deploy the application in one step.
- `pcl_version`: **Optional**. The version of the Payara Cloud CLI to use. Default is '1.1.0'.

## Example Usage

```yaml
uses: payara/actions/cloud-deploy@v1
with:
cloud_subscription_id: 'your-subscription-id'
token: ${{ secrets.PCL_TOKEN }}
subscription_name: 'your-subscription-name'
namespace: 'your-namespace'
app_name: 'your-app'
artifact_location: 'your-artifact.war'
deploy: true
```
16 changes: 10 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,26 @@ inputs:
token:
description: 'token obtained from `pcl login --print-token` and stored in secrets'
required: true
cloud_subscription_id:
description: 'The Payara Cloud subscription ID'
required: true
subscription_name:
description: 'Optional. Only required if your account has access to multiple subscriptions. Provide the subscription name to specify which subscription to use.'
required: false
namespace:
description: 'The namespace under which the app is deployed'
required: true
app_name:
description: 'The name of the app to deploy'
required: true
required: false
artifact_location:
description: 'The location of the artifact (WAR) to deploy'
required: true
required: false
deploy:
description: 'Deploy the app'
required: false
default: true
pcl_version:
description: 'Version of PCL to download'
required: false
default: '1.0.1'
default: '1.1.0'
runs:
using: 'node12'
main: 'dist/index.js'
Loading

0 comments on commit 4f9131d

Please sign in to comment.