Skip to content
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

feat: initial preview #1

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# by default, require qlik-cloud-monitoring-apps
* @qlik-oss/qlik-cloud-monitoring-apps
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/repo_bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: 🐛 Bug Report
about: Something isn't working as expected
---

## 🐛 Bug report

(A clear and concise description of what the bug is.)

### Steps to Reproduce

1. (Step one)
1. (Step two)
1. ...

### Expected behavior

(A clear and concise description of what you expected to happen.)

### Actual behavior

(A clear and concise description of what actually happened.)

### Additional context

(Add any other context, link to demo or screenshots about the issue.)
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/repo_feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: 🚀 Feature or Improvement
about: Suggest an idea for a new feature or improvement
---

## 🚀 Feature

(A clear and concise description of what the feature/improvement is.)

### Motivation

(A clear and concise description of why this feature/improvement should be added.)

### Additional context

(Add any other context about the feature/improvement request.)
57 changes: 57 additions & 0 deletions .github/workflows/comment_checklist_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Add checklist comment to PR

on:
pull_request:
types: [opened, synchronize]
branches: [ "main" ]

workflow_dispatch:

jobs:
verify:
runs-on: ubuntu-latest
permissions: write-all

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Retrieve version from VERSION
run: |
RELVER=$(cat VERSION | tr -d '[:space:]')
echo "RELVER=$RELVER" >> $GITHUB_ENV

- name: Retrieve app name from APPNAME
run: |
APPNAME=$(cat APPNAME)
echo "APPNAME=$APPNAME" >> $GITHUB_ENV

- name: PR comment with file
uses: thollander/actions-comment-pull-request@v2
with:
mode: upsert
comment_tag: previewComment
message: |
# PR checklist

Checklist:

- [ ] Is this release [${{ env.RELVER }}] of ${{ env.APPNAME }}?
- [ ] Have you reviewed the unbuilt diff generated by the workflow?
- [ ] Have you updated `app/${{ env.APPNAME }}.qvf`?

If you wish to merge:

- Have this PR approved by a code owner
- Merge this PR into main
- Go to releases, an action will generate a draft release with docs + attached QVF
- Make any updates, then submit the release

Common issues:

- Version number missing or incorrect (./VERSION file needs updating)
- After merging, draft release doesn't update - this is usually because
the action failed due to an old draft release with the same name.
Delete the draft release, and re-run the action.
- AppIds are referenced where images are used in sheets, etc. Ignore these
changes as these are caused by the unbuild process.
64 changes: 64 additions & 0 deletions .github/workflows/draft_release_on_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build a draft release

on:
push:
branches: [ "main" ]

workflow_dispatch:

jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Retrieve version from VERSION
run: |
RELVER=$(cat VERSION | tr -d '[:space:]')
echo "RELVER=$RELVER" >> $GITHUB_ENV

- name: Retrieve app name from APPNAME
run: |
APPNAME=$(cat APPNAME)
echo "APPNAME=$APPNAME" >> $GITHUB_ENV

- name: Retrieve latest installer PDF from qlik-cloud-monitoring-apps repo
uses: robinraju/[email protected]
with:
repository: "qlik-oss/qlik-cloud-monitoring-apps"
latest: true
fileName: "Qlik-Cloud-Monitoring-Applications-Installation-Guide.pdf"

- name: Draft a release
uses: softprops/action-gh-release@v2
with:
name: ${{ env.RELVER }}
body: |
**!Important - review then remove this top section**

- [ ] Verify the .pdf and .qvf are correct
- [ ] Align the tag to the release version
- [ ] Verify release name matches tag (e.g. v1.2.1)
- [ ] Add any comments on breaking changes/ amends to the auto generated release notes
- [ ] Delete this section

We are pleased to release version ${{ env.RELVER }} of the ${{ env.APPNAME }}.

Find attached the app (${{ env.APPNAME }}.qvf) and install guide (Qlik-Cloud-Monitoring-Applications-Installation-Guide.pdf).

The following changes have been made for this release:
- Change 1
- Change 2

draft: true
tag_name: ${{ env.RELVER }}
generate_release_notes: true
fail_on_unmatched_files: true
files: |
./app/${{ env.APPNAME }}.qvf
./Qlik-Cloud-Monitoring-Applications-Installation-Guide.pdf

82 changes: 82 additions & 0 deletions .github/workflows/unbuild_app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Unbuild app

on:
pull_request:
types: [opened, synchronize]
branches: [ "main" ]

workflow_dispatch:

jobs:
unbuild:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Retrieve app name from APPNAME
run: |
APPNAME=$(cat APPNAME)
echo "APPNAME=$APPNAME" >> $GITHUB_ENV

- name: Checkout repo
run: echo ${{ github.triggering_actor }}

- name: Download qlik-cli and unzip
run: |
wget https://github.com/qlik-oss/qlik-cli/releases/download/v2.20.3/qlik-Linux-x86_64.tar.gz -O qlik-cli.tar.gz
# Unzip archive
tar -xf qlik-cli.tar.gz
# Remove archive
rm qlik-cli.tar.gz
# Update permissions to execute
chmod +x qlik

- name: Retrieve qlik-cli version
run: ./qlik version

- name: Create context in qlik-cli
run: |
./qlik context create veritenant \
--server ${{ vars.TENANT }} \
--oauth-client-id ${{ vars.OAUTH_ID }} \
--oauth-client-secret ${{ secrets.OAUTH_SECRET }} \
--server-type cloud

- name: Select context
run: ./qlik context use veritenant

- name: Retrieve debugging info
run: |
ls -lh "./app/${{ env.APPNAME }}.qvf"
./qlik user me

- name: Import app to tenant
run: |
APP_ID=$(./qlik raw post v1/apps/import --body-file "./app/${{ env.APPNAME }}.qvf" | jq -r '.attributes.id')
echo "APP_ID=$APP_ID" >> $GITHUB_ENV
echo "Imported appId ${{ env.APP_ID }}"

- name: Delete any existing src dir
run: rm -rf src

- name: Unbuild app to ./src
run: |
./qlik app unbuild --app ${{ env.APP_ID }} --dir './src' --no-data
ls -lh "./src"

- name: Delete app from tenant
run: ./qlik app rm ${{ env.APP_ID }}

- name: Remove qlik-cli
run: rm qlik

# No check for push as github token won't trigger an action re-run
- name: Commit new .src
run: |
git config --global user.name "UnbuildBot Automation"
git config --global user.email "[email protected]"
git add src
git commit -m "Automated unbuild of app into /src"
git push
1 change: 1 addition & 0 deletions APPNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Automation-Analyzer
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Qlik - Open Source Software
Copyright (c) 2023 Qlik - Open Source Software

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
# qlik-cloud-automation-analyzer
**PREVIEW** The Automation Analyzer is a Qlik Sense application built for Qlik Cloud, which helps you to analyze and monitor Qlik Application Automation runs in your tenant.
> **Warning**
> This application is _community supported_. This means that you should not contact
> Qlik Support for help with this app. See below for additional information
> on how to raise issues on this repository to ask for help.

# Qlik Cloud Automation Analyzer

> **Note**
> This application is one of a set of community built and supported monitoring apps for Qlik Cloud.
> For links to all monitoring apps, visit the [Qlik Cloud Monitoring Apps](https://github.com/qlik-oss/qlik-cloud-monitoring-apps) repository.

The Automation Analyzer is a Qlik Sense application built for Qlik Cloud, which
helps you to analyze and monitor Qlik Application Automation runs in your tenant.

![Sheets in the app](/images/readme_sheets.png)

It provides information such as:

* Information provided in the app

## Installing/ updating

A PDF containing installation instructions is attached to each [release](/../../releases).

## Support policy

This app is provided as-is and is not supported by Qlik. Over time, the APIs and
metrics used by the app may change, so it is advised to monitor this repository
for updates, and to update the app promptly when new versions are available.

If you have issues while using this app, support is provided on a best-efforts
basis by contributors to this project.

If you have an issue:

* Review the FAQ section in this readme to see if your issue is a common one
* Review open and closed [issues](/../../issues)
* Open a [new issue](/../../issues/new), following the issue template

If you are able to resolve the issue, then close your issue with the resolution,
and if you feel inclined, open a PR with your proposed changes so that we can
consider including the improvement in the next release of the app.

Thank you for your support!
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.0.0
Binary file added app/automation-analyzer.qvf
Binary file not shown.
Binary file added images/readme_sheets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>qlik-oss/renovate-config"
]
}
Loading