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

port over metabase from architecture repo to here and add helm charts #6

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7668d93
initial
mishraomp Oct 2, 2023
300bbb9
Update values.yaml
mishraomp Oct 2, 2023
ea3f858
first attempt
mishraomp Oct 2, 2023
b097ca4
fix the action name
mishraomp Oct 2, 2023
17d445c
fix the action name
mishraomp Oct 2, 2023
198ad48
remove third party action
mishraomp Oct 2, 2023
f071c2c
fix yq
mishraomp Oct 2, 2023
0599898
fix yq
mishraomp Oct 2, 2023
6e0d293
fix yq
mishraomp Oct 3, 2023
d9d438e
fix yq
mishraomp Oct 3, 2023
d4d2701
fix yq
mishraomp Oct 3, 2023
6bdbeb5
fix yq
mishraomp Oct 3, 2023
344543b
fix yq
mishraomp Oct 3, 2023
365b73f
fix yq
mishraomp Oct 3, 2023
859d140
fix yq
mishraomp Oct 3, 2023
b0ad1f3
refactor directory
mishraomp Oct 3, 2023
3c1f348
refactor directory
mishraomp Oct 3, 2023
8c1bfac
refactor directory
mishraomp Oct 3, 2023
e8c0ca9
refactor directory
mishraomp Oct 3, 2023
97de520
refactor directory
mishraomp Oct 3, 2023
7cccd76
fix helm.
mishraomp Oct 3, 2023
4d16027
fix helm.
mishraomp Oct 3, 2023
1de4678
fix helm.
mishraomp Oct 3, 2023
cd712a5
Update on-pr-main.yml
mishraomp Oct 3, 2023
ab9ca71
Update deployment.yaml
mishraomp Oct 3, 2023
e211121
Update Dockerfile
mishraomp Oct 3, 2023
c6a45e0
Update Dockerfile
mishraomp Oct 3, 2023
1deabed
Update Dockerfile
mishraomp Oct 3, 2023
2a9c79d
Update Dockerfile
mishraomp Oct 3, 2023
898ca95
Update Dockerfile
mishraomp Oct 3, 2023
211232c
Update run_app.sh
mishraomp Oct 3, 2023
cbed6d6
Update Dockerfile
mishraomp Oct 3, 2023
54c7956
Update deployment.yaml
mishraomp Oct 3, 2023
a8b8832
Update on-pr-main.yml
mishraomp Oct 3, 2023
880519e
Update run_app.sh
mishraomp Oct 3, 2023
790448d
Adding metabase update on issue.
mishraomp Oct 3, 2023
733e3db
Merge remote-tracking branch 'origin/5-port-over-metabase-from-archit…
mishraomp Oct 3, 2023
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
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the Bug**
A clear and concise description of what the bug is.

**Expected Behaviour**
A clear and concise description of what you expected to happen.

**Actual Behaviour**
A clear and concise description of what you expected to happen.

** Steps To Reproduce**
Steps to reproduce the behaviour:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Custom issue template
about: Describe this issue template's purpose here
title: ''
labels: ''
assignees: ''

---
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/decision.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Decision
about: This is a big decision that has been made or raised to PO
title: ''
labels: decision
assignees: ''

---
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Documentation
about: Documentation for a specific area or need
title: ''
labels: documentation
assignees: ''

---

**As a** *(User Type/Persona)* **I want** *(Feature/enhancement)* **So That** *(Value, why is this wanted, what is the user trying to accomplish)*

**Additional Context**
- enter text here
- enter text here

**Acceptance Criteria**
- [ ] Given (Context), When (action carried out), Then (expected outcome)
- [ ] Given (Context), When (action carried out), Then (expected outcome)

**Definition of Done**
- [ ] Ready to Demo in Sprint Review
- [ ] Does what I have made have appropriate test coverage?
- [ ] Documentation and/or scientific documentation exists and can be found
- [ ] Peer Reviewed by 2 people on the team
- [ ] Manual testing of all PRs in Dev and Prod
- [ ] Merged
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/epic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Epic
about: A User Story Large enough that it cannot be completed in a single sprint, the
desired end state of a feature
title: ''
labels: epic
assignees: ''

---

**As a** *(User Type/Persona)* **I want** *(Feature/enhancement)* **So That** *(Value, why is this wanted, what is the user trying to accomplish)*

**Additional Context**

- enter text here
- enter text here

**Acceptance Criteria**

- [ ] Given (Context), When (action carried out), Then (expected outcome)
- [ ] Given (Context), When (action carried out), Then (expected outcome)
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature request / user story
about: Suggest an idea from the perspective of a user
title: ''
labels: enhancement
assignees: ''

---

**As a** *(User Type/Persona)* **I want** *(Feature/enhancement)* **So That** *(Value, why is this wanted, what is the user trying to accomplish)*

**Additional Context**
- enter text here
- enter text here

**Acceptance Criteria**
- [ ] Given (Context), When (action carried out), Then (expected outcome)
- [ ] Given (Context), When (action carried out), Then (expected outcome)

**Definition of Done**
- [ ] Ready to Demo in Sprint Review
- [ ] Does what I have made have appropriate test coverage?
- [ ] Documentation and/or scientific documentation exists and can be found
- [ ] Peer Reviewed by 2 people on the team
- [ ] Manual testing of all PRs in Dev and Prod
- [ ] Merged
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/metabase-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Update Metabase Version in Helm Chart.
description: Please provide the version of the metabase image to be build. sample format is v0.43.1
body:
- type: input
id: METABASE_VERSION
attributes:
label: Metabase Version
validations:
required: true
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Question
about: Ask us a question!
title: ''
labels: question
assignees: ''

---

**Describe the task**
basic description of the task, is it focuse on research with users or the business area? is it design focused on either co-design or wireframing? is it User Testing or compiling results?

**Acceptance Criteria**
- [ ] what is required for this task to be complete?
- what is the finishing point or end state of this task?
- [ ] what is the output of this task?

**SME/User Contact**
(may want to use a persona to fill this in)

**Additional context**
- any additional details that could not be captured above
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Schema change
about: Changes to the schema
title: ''
labels: schema
assignees: ''

---

**As a** *(User Type/Persona)* **I want** *(Feature/enhancement)* **So That** *(Value, why is this wanted, what is the user trying to accomplish)*

**Additional Context**
- enter text here
- enter text here

**Acceptance Criteria**
- [ ] Given (Context), When (action carried out), Then (expected outcome)
- [ ] Given (Context), When (action carried out), Then (expected outcome)

**Definition of Done**
- [ ] Ready to Demo in Sprint Review
- [ ] Does what I have made have appropriate test coverage?
- [ ] Documentation and/or scientific documentation exists and can be found
- [ ] Peer Reviewed by 2 people on the team
- [ ] Manual testing of all PRs in Dev and Prod
- [ ] Merged
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Task
about: Work for the team that cannot be written as a user story
title: ''
labels: task
assignees: ''

---

**Describe the task**
A clear and concise description of what the task is.

**Acceptance Criteria**
- [ ] first
- [ ] second
- [ ] third

**Additional context**
- Add any other context about the task here.
- Or here
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/ux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: UX Task
about: This is a Task for UX Research, Design or Testing
title: ''
labels: ux
assignees: ''

---

**Describe the task**
basic description of the task, is it focuse on research with users or the business area? is it design focused on either co-design or wireframing? is it User Testing or compiling results?

**Acceptance Criteria**
- [ ] what is required for this task to be complete?
- what is the finishing point or end state of this task?
- [ ] what is the output of this task?

**SME/User Contact**
(may want to use a persona to fill this in)

**Additional context**
- any additional details that could not be captured above
30 changes: 30 additions & 0 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: semantic release

on:
workflow_run:
workflows: [ Pull Request Closed ]
types: [ completed ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
helm-release:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"


61 changes: 61 additions & 0 deletions .github/workflows/metabase-update-on-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: build-deploy-metabase-on-issue

on:
issues:
types: [opened, edited]

jobs:
build-metabase-image:
name: Build Metabase Image.
runs-on: ubuntu-22.04
steps:

- name: Check out repository
uses: actions/checkout@v4

- name: Issue Forms Body Parser
id: parse
uses: zentered/[email protected]

- name: Stringify Result
uses: actions/github-script@v6
id: set-result
with:
script: |
const data = ${{ steps.parse.outputs.data }};
const version = data["metabase-version"].text;
return version;
result-encoding: string

- name: check if build is required.
id: check
run: |
# Check if version paramter is given.
METABASE_VERSION=${{ steps.set-result.outputs.result }}
URL="https://downloads.metabase.com/$METABASE_VERSION/metabase.jar"
if [ -z $METABASE_VERSION ] || [ $(curl -ILso /dev/null -w "%{http_code}" "${URL}") -ne 200 ]
then
echo "build=false" >> $GITHUB_OUTPUT;
exit 0
fi
echo "build=true" >> $GITHUB_OUTPUT;
#

- name: Modify Files
if: steps.check.outputs.build == 'true'
id: modify_files
shell: bash
run: |
appVersion=${{ steps.set-result.outputs.result }}
version=${appVersion//v/}
git config --local user.name ${{ github.actor }}
git checkout -b deps/metabase-version-update-$appVersion
yq '.appVersion = $appVersion' charts/nr-metabase/Chart.yaml
yq '.version = $version' charts/nr-metabase/Chart.yaml
yq '.metabase.image.tag = $appVersion' charts/nr-metabase/values.yaml
git add charts/nr-metabase/values.yaml charts/nr-metabase/Chart.yaml
git commit -m "Updating the version of the metabase image to $appVersion"
git push origin chore/ministry-name-schema
# Create a Pull Request
gh pr create --assignee "mishraomp" --base main --label "dependencies" --title "Updating the version of the metabase image to $appVersion" --body "Updating the version of the metabase image to $appVersion."

Loading