Skip to content

Commit 34c41df

Browse files
authored
prod env reporting (#8)
* OPS-3 Added prod reporting * OPS-3 updated apps
1 parent 45254f1 commit 34c41df

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Report prod snapshot
2+
3+
# On a normal setup the backend and frontend built in the two build jobs would
4+
# deploy the two artifacts to a server, and we would have set up reporting
5+
# of the environment to kosli. In this example we do not have a server so
6+
# we just simulate that we have deployed to prod
7+
8+
on:
9+
schedule:
10+
- cron: '*/5 * * * *' # Runs every 5 minutes (smallest possible)
11+
workflow_dispatch:
12+
13+
env:
14+
# kosli commands picks up org, env, trail and api-token from these environment variables
15+
KOSLI_ORG: kosli-public
16+
KOSLI_ENV: jira-integration-example-prod
17+
KOSLI_API_TOKEN: "${{ secrets.KOSLI_PUBLIC_API_TOKEN }}"
18+
KOSLI_CLI_VERSION: "2.11.8"
19+
20+
jobs:
21+
report-snapshot:
22+
name: Report prod snapshot
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
ref: running-prod
28+
29+
- name: Setup Kosli cli
30+
uses: kosli-dev/setup-cli-action@v2
31+
with:
32+
version:
33+
${{ env.KOSLI_CLI_VERSION }}
34+
35+
- name: Report snapshot
36+
run: |
37+
kosli snapshot paths ${{ env.KOSLI_ENV }} \
38+
--paths-file server-paths-file.yml

apps/backend/backend-content.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
This is just a file to test out that changes to back-end source code
22
can trigger a build, reporting to Kosli and Jira
33

4-
counter=4
4+
counter=5

apps/frontend/frontend-content.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
This is just a file to test out that changes to front-end source code
22
can trigger a build, reporting to Kosli and Jira
33

4-
counter=4
4+
counter=5

0 commit comments

Comments
 (0)