https://github.com/opt-nc/tower-deploy-action
Github action pour le deploiement d'application via Tower
https://github.com/opt-nc/tower-deploy-action
Last synced: 3 months ago
JSON representation
Github action pour le deploiement d'application via Tower
- Host: GitHub
- URL: https://github.com/opt-nc/tower-deploy-action
- Owner: opt-nc
- License: gpl-3.0
- Created: 2021-12-13T03:47:02.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-12T09:35:12.000Z (almost 3 years ago)
- Last Synced: 2023-09-19T10:13:17.825Z (over 2 years ago)
- Language: JavaScript
- Size: 784 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://dev.to/adriens/speeding-up-time-to-market-with-custom-github-actions-3md0)
[](https://github.com/opt-nc/tower-deploy-action/actions/workflows/test-release.yml)
# tower-deploy-action
This Github action aims to interact with Tower servers.
It connects to a Tower server and launches a job based on a template id, if needed an extra_vars file can be send.
## Usage
See [action.yml](action.yml)
If you need extra_vars data, you have to first checkout the repository you aim to deploy and that contains the extra_vars yaml file template.
The templated yaml file have to be put in the *src/main/resource* folder.
Default filename is *tower_extra_vars_template.yml*, if you want to use another filename, please use *extravars_template_filename* input.
### Deploy an application from main branch
```yaml
integration-deploy:
name: Call deploy action
runs-on: ubuntu-latest
environment: integration
steps:
- name: Checkout my repo
uses: actions/checkout@v2
- name: Invoke deploy action
uses: opt-nc/tower-deploy-action@v1.3.13
with:
vars: ${{ tojson(secrets) }}
asset_url: https://github.com/my_org/my_repo/releases/download/integration/my_app.jar
tower_template_id : 45
tower_url: ${{ secrets.TOWER_URL }}
tower_password: ${{ secrets.TOWER_PASSWORD }}
tower_user: ${{ secrets.TOWER_USER }}
```
### Deploy an application from tag
```yaml
qualification-deploy:
name: Call deploy action
runs-on: ubuntu-latest
environment: qualification
steps:
- name: Checkout my repo
uses: actions/checkout@v2
with:
ref: v1.0.0
- name: Invoke deploy action
uses: opt-nc/tower-deploy-action@v1.3.13
with:
vars: ${{ tojson(secrets) }}
asset_url: https://github.com/my_org/my_repo/releases/download/1.0.0/my_app.jar
tower_template_id : 46
tower_url: ${{ secrets.TOWER_URL }}
tower_password: ${{ secrets.TOWER_PASSWORD }}
tower_user: ${{ secrets.TOWER_USER }}
```
Version de déploiement Docker :
```yaml
qualification-deploy:
name: Call deploy action
runs-on: ubuntu-latest
environment: qualification
steps:
- name: Checkout my repo
uses: actions/checkout@v2
with:
ref: v1.0.0
- name: Invoke deploy action
uses: opt-nc/tower-deploy-action@v1.3.13
with:
vars: ${{ tojson(secrets) }}
iamge_url: ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
tower_template_id : 46
tower_url: ${{ secrets.TOWER_URL }}
tower_password: ${{ secrets.TOWER_PASSWORD }}
tower_user: ${{ secrets.TOWER_USER }}
```