-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (53 loc) · 1.88 KB
/
build-reports.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: build and deploy reports
on:
workflow_dispatch:
inputs:
ENVIRONMENT_NAME:
required: true
type: choice
options:
- dev
- qa
- int
- dlvr
- test
- prod
NAMESPACE:
required: true
type: choice
options:
- a12541-dev
- a12541-test
- a12541-prod
jobs:
build:
runs-on: ubuntu-latest
environment:
name: ${{ inputs.ENVIRONMENT_NAME }}
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fill xml files
uses: cschleiden/[email protected]
with:
files: cirras-underwriting-reports-jrs/**/*.xml
env:
CUWS_ds_0_url: "jdbc:postgresql://crunchy-postgres-${{inputs.ENVIRONMENT_NAME}}-pgbouncer.${{inputs.NAMESPACE}}.svc.cluster.local/cirras${{inputs.ENVIRONMENT_NAME}}"
CUWS_ds_0_user: "${{ secrets.POSTGRES_READONLY_USERNAME }}"
CUWS_ds_0_password: "${{ secrets.POSTGRES_READONLY_PASSWORD }}"
- name: Install zip
uses: montudor/action-zip@v1
- name: Make report zipfile
run: |
cd cirras-underwriting-reports-jrs/src/main
zip -qq -r export.zip .
export AUTHORIZATION="Basic $(echo -n ${{vars.JASPER_USERNAME}}:${{secrets.JASPER_PASSWORD}} | base64)"
export JASPER_URL="https://cirras-underwriting-jasper-${{ inputs.ENVIRONMENT_NAME}}-${{ inputs.NAMESPACE}}.apps.silver.devops.gov.bc.ca/jasperserver/rest_v2/import?keyAlias=deprecatedImportExportEncSecret&update=true"
curl -X POST $JASPER_URL -H "Content-Type: application/zip" -H "Authorization: $AUTHORIZATION" -T export.zip
- uses: actions/upload-artifact@v4
with:
name: export.zip
path: cirras-underwriting-reports-jrs/src/main/export.zip