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

Adds fhir-data-pipes helm chart #664

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
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
33 changes: 33 additions & 0 deletions .github/workflows/chart-lint-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lint and Test Charts

on: pull_request

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.5.0
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml
- name: Create kind cluster
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'
64 changes: 64 additions & 0 deletions .github/workflows/publish-chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Kindly refer to https://github.com/helm/chart-releaser-action

name: Publish Charts

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"

- name: Install Helm
uses: azure/setup-helm@v3

- name: Run chart-releaser
uses: helm/[email protected] # step that writes the latest chart versions (below) depends on this step writing the latest version as the first index in the entries.<name of chart> list in the index.yaml file
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Install Python
uses: actions/setup-python@v4

- name: Install pip requirements
uses: BSFishy/pip-action@v1
with:
packages: |
shyaml==0.6.2

- name: Checkout gh-pages
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: gh-pages

- name: Record the latest chart versions
run: |
releaseDir="latest"
if [[ ! -d ${releaseDir} ]]; then
mkdir -p ${releaseDir}
fi
if [[ -f index.yaml ]]; then
charts=($(cat index.yaml | shyaml keys entries))
for curChart in "${charts[@]}"; do
curChartVersion=$(cat index.yaml | shyaml get-value entries.${curChart}.0.version)
echo ${curChartVersion} > ${releaseDir}/${curChart}
done
fi

- uses: EndBug/add-and-commit@v7
with:
message: 'Set the latest the chart versions'
branch: gh-pages
23 changes: 23 additions & 0 deletions charts/fhir-data-pipes/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
42 changes: 42 additions & 0 deletions charts/fhir-data-pipes/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Copyright 2020-2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: v2
name: fhir-data-pipes
description: An open-source pipeline to transform data from a FHIR server (like HAPI, GCP FHIR store, or even OpenMRS) using the FHIR format into a data warehouse based on Apache Parquet files, or another FHIR server.
maintainers:
- name: opensrp
email: [email protected]
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.0"
Loading