Skip to content

Commit

Permalink
Merge pull request #582 from rstudio/add-ci-lint-and-ci-install-dirs
Browse files Browse the repository at this point in the history
Move ci directory outside of the chart directory structure, and break it into two.  One set of values for linting, one for installation testing
  • Loading branch information
jforest authored Oct 16, 2024
2 parents f7bf50c + 2cfef47 commit bcf3579
Show file tree
Hide file tree
Showing 63 changed files with 231 additions and 96 deletions.
168 changes: 92 additions & 76 deletions .github/workflows/chart-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ jobs:
- name: Set up chart-testing
uses: helm/[email protected]

- name: Symlink ci-lint -> ci
run: |
for dir in ci/*/lint; do
dir=${dir#ci/}
dir=${dir%/lint}
ln -s ../../ci/${dir}/lint charts/${dir}/ci
done
- name: Run chart-testing (list-changed)
id: list-changed
run: |
Expand Down Expand Up @@ -71,82 +79,90 @@ jobs:
if: steps.ct-lint.outcome == 'failure' || steps.ct-lint-all.outcome == 'failure'
run: exit 1

# install:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Set up Helm
# uses: azure/[email protected]
# with:
# version: v3.6.3
#
# - uses: actions/setup-python@v5
# with:
# python-version: "3.10"
#
# - name: Set up chart-testing
# uses: helm/[email protected]
#
# - name: Run chart-testing (list-changed)
# id: list-changed
# run: |
# changed=$(ct list-changed --target-branch main --chart-dirs charts --chart-dirs other-charts)
# if [[ -n "$changed" ]]; then
# echo 'changed=true' >> $GITHUB_OUTPUT
# fi
#
# - name: Create kind cluster
# uses: helm/[email protected]
# if: ${{ steps.list-changed.outputs.changed == 'true' || github.ref == 'refs/heads/main' }}
#
# - name: Install SealedSecrets Helm Chart
# if: ${{ steps.list-changed.outputs.changed == 'true' || github.ref == 'refs/heads/main' }}
# run: |
# helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets
# helm install sealed-secrets sealed-secrets/sealed-secrets
#
# # no allow-failure until https://github.com/actions/toolkit/issues/399
# - name: Run chart-testing (install changed)
# id: ct-install
# if: ${{ github.ref != 'refs/heads/main' && steps.list-changed.outputs.changed == 'true' }}
# run: ct install --target-branch main --chart-dirs charts --chart-dirs other-charts
# continue-on-error: true
#
# # no allow-failure until https://github.com/actions/toolkit/issues/399
# - name: Run chart-testing (install all)
# id: ct-install-all
# if: ${{ github.ref == 'refs/heads/main' }}
# run: ct install --target-branch main --all --chart-dirs charts --chart-dirs other-charts
# continue-on-error: true
#
# - name: Notify Slack of chart install failure
# if: steps.ct-install.outcome == 'failure' || steps.ct-install-all.outcome == 'failure'
# uses: slackapi/[email protected]
# with:
# payload-delimiter: "_"
# payload: |
# {
# "blocks": [
# {
# "type": "section",
# "text": {
# "type": "mrkdwn",
# "text": "Failure during test installation of ${{ steps.ct-install.outcome == 'failure' && 'changed' || 'all' }} charts. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
# }
# }
# ]
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
#
# - name: Fail the workflow if failed installs
# if: steps.ct-install.outcome == 'failure' || steps.ct-install-all.outcome == 'failure'
# run: exit 1
install:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.6.3

- uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Set up chart-testing
uses: helm/[email protected]

- name: Symlink ci-install -> ci
run: |
for dir in ci/*/install; do
dir=${dir#ci/}
dir=${dir%/install}
ln -s ../../ci/${dir}/install charts/${dir}/ci
done
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch main --chart-dirs charts --chart-dirs other-charts)
if [[ -n "$changed" ]]; then
echo 'changed=true' >> $GITHUB_OUTPUT
fi
- name: Create kind cluster
uses: helm/[email protected]
if: ${{ steps.list-changed.outputs.changed == 'true' || github.ref == 'refs/heads/main' }}

- name: Install SealedSecrets Helm Chart
if: ${{ steps.list-changed.outputs.changed == 'true' || github.ref == 'refs/heads/main' }}
run: |
helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets
helm install sealed-secrets sealed-secrets/sealed-secrets
# no allow-failure until https://github.com/actions/toolkit/issues/399
- name: Run chart-testing (install changed)
id: ct-install
if: ${{ github.ref != 'refs/heads/main' && steps.list-changed.outputs.changed == 'true' }}
run: ct install --target-branch main --chart-dirs charts --chart-dirs other-charts
continue-on-error: true

# no allow-failure until https://github.com/actions/toolkit/issues/399
- name: Run chart-testing (install all)
id: ct-install-all
if: ${{ github.ref == 'refs/heads/main' }}
run: ct install --target-branch main --all --chart-dirs charts --chart-dirs other-charts
continue-on-error: true

- name: Notify Slack of chart install failure
if: steps.ct-install.outcome == 'failure' || steps.ct-install-all.outcome == 'failure'
uses: slackapi/[email protected]
with:
payload-delimiter: "_"
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Failure during test installation of ${{ steps.ct-install.outcome == 'failure' && 'changed' || 'all' }} charts. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

- name: Fail the workflow if failed installs
if: steps.ct-install.outcome == 'failure' || steps.ct-install-all.outcome == 'failure'
run: exit 1

check-versions-connect:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion charts/posit-chronicle/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: posit-chronicle
description: Official Helm chart for Posit Chronicle Server
version: 0.3.2
version: 0.3.3
appVersion: 2024.09.0
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png
home: https://www.posit.co
Expand Down
4 changes: 4 additions & 0 deletions charts/posit-chronicle/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.3.3

- Move the values files for linting and installation testing outside the chart directory so that we can iterate on them without releasing a new version of the chart

## 0.3.2

- Bump Chronicle to version 2024.09.0
Expand Down
6 changes: 3 additions & 3 deletions charts/posit-chronicle/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Posit Chronicle

![Version: 0.3.2](https://img.shields.io/badge/Version-0.3.2-informational?style=flat-square) ![AppVersion: 2024.09.0](https://img.shields.io/badge/AppVersion-2024.09.0-informational?style=flat-square)
![Version: 0.3.3](https://img.shields.io/badge/Version-0.3.3-informational?style=flat-square) ![AppVersion: 2024.09.0](https://img.shields.io/badge/AppVersion-2024.09.0-informational?style=flat-square)

#### _Official Helm chart for Posit Chronicle Server_

Expand All @@ -25,11 +25,11 @@ To ensure a stable production deployment:

## Installing the chart

To install the chart with the release name `my-release` at version 0.3.2:
To install the chart with the release name `my-release` at version 0.3.3:

```{.bash}
helm repo add rstudio https://helm.rstudio.com
helm upgrade --install my-release rstudio/posit-chronicle --version=0.3.2
helm upgrade --install my-release rstudio/posit-chronicle --version=0.3.3
```

To explore other chart versions, look at:
Expand Down
2 changes: 1 addition & 1 deletion charts/rstudio-connect/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: rstudio-connect
description: Official Helm chart for Posit Connect
version: 0.7.10
version: 0.7.11
apiVersion: v2
appVersion: 2024.09.0
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png
Expand Down
4 changes: 4 additions & 0 deletions charts/rstudio-connect/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.7.11

- Move the values files for linting and installation testing outside the chart directory so that we can iterate on them without releasing a new version of the chart

## 0.7.10

- Bump version of launcher templates `job.tpl` and `service.tpl`
Expand Down
6 changes: 3 additions & 3 deletions charts/rstudio-connect/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Posit Connect

![Version: 0.7.10](https://img.shields.io/badge/Version-0.7.10-informational?style=flat-square) ![AppVersion: 2024.09.0](https://img.shields.io/badge/AppVersion-2024.09.0-informational?style=flat-square)
![Version: 0.7.11](https://img.shields.io/badge/Version-0.7.11-informational?style=flat-square) ![AppVersion: 2024.09.0](https://img.shields.io/badge/AppVersion-2024.09.0-informational?style=flat-square)

#### _Official Helm chart for Posit Connect_

Expand Down Expand Up @@ -30,11 +30,11 @@ To ensure reproducibility in your environment and insulate yourself from future

## Installing the chart

To install the chart with the release name `my-release` at version 0.7.10:
To install the chart with the release name `my-release` at version 0.7.11:

```{.bash}
helm repo add rstudio https://helm.rstudio.com
helm upgrade --install my-release rstudio/rstudio-connect --version=0.7.10
helm upgrade --install my-release rstudio/rstudio-connect --version=0.7.11
```

To explore other chart versions, look at:
Expand Down
2 changes: 1 addition & 1 deletion charts/rstudio-launcher-rbac/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: rstudio-launcher-rbac
description: RBAC definition for the RStudio Job Launcher
type: application
version: 0.2.21
version: 0.2.22
appVersion: 0.2.21
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png
sources:
Expand Down
4 changes: 4 additions & 0 deletions charts/rstudio-launcher-rbac/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.2.22

- Move the values files for linting and installation testing outside the chart directory so that we can iterate on them without releasing a new version of the chart

## 0.2.21

- Documentation site updates
Expand Down
6 changes: 3 additions & 3 deletions charts/rstudio-launcher-rbac/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# rstudio-launcher-rbac

![Version: 0.2.21](https://img.shields.io/badge/Version-0.2.21-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.21](https://img.shields.io/badge/AppVersion-0.2.21-informational?style=flat-square)
![Version: 0.2.22](https://img.shields.io/badge/Version-0.2.22-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.21](https://img.shields.io/badge/AppVersion-0.2.21-informational?style=flat-square)

#### _RBAC definition for the RStudio Job Launcher_

Expand All @@ -21,11 +21,11 @@ To ensure a stable production deployment:

## Installing the chart

To install the chart with the release name `my-release` at version 0.2.21:
To install the chart with the release name `my-release` at version 0.2.22:

```{.bash}
helm repo add rstudio https://helm.rstudio.com
helm upgrade --install my-release rstudio/rstudio-launcher-rbac --version=0.2.21
helm upgrade --install my-release rstudio/rstudio-launcher-rbac --version=0.2.22
```

To explore other chart versions, look at:
Expand Down
2 changes: 1 addition & 1 deletion charts/rstudio-pm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: rstudio-pm
description: Official Helm chart for Posit Package Manager
version: 0.5.37
version: 0.5.38
apiVersion: v2
appVersion: 2024.08.2
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png
Expand Down
4 changes: 4 additions & 0 deletions charts/rstudio-pm/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.5.38

- Move the values files for linting and installation testing outside the chart directory so that we can iterate on them without releasing a new version of the chart

## 0.5.37

- Update documentation with lowercase `Database.Provider = "postgres"`.
Expand Down
6 changes: 3 additions & 3 deletions charts/rstudio-pm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Posit Package Manager

![Version: 0.5.37](https://img.shields.io/badge/Version-0.5.37-informational?style=flat-square) ![AppVersion: 2024.08.2](https://img.shields.io/badge/AppVersion-2024.08.2-informational?style=flat-square)
![Version: 0.5.38](https://img.shields.io/badge/Version-0.5.38-informational?style=flat-square) ![AppVersion: 2024.08.2](https://img.shields.io/badge/AppVersion-2024.08.2-informational?style=flat-square)

#### _Official Helm chart for Posit Package Manager_

Expand All @@ -24,11 +24,11 @@ To ensure a stable production deployment:

## Installing the chart

To install the chart with the release name `my-release` at version 0.5.37:
To install the chart with the release name `my-release` at version 0.5.38:

```{.bash}
helm repo add rstudio https://helm.rstudio.com
helm upgrade --install my-release rstudio/rstudio-pm --version=0.5.37
helm upgrade --install my-release rstudio/rstudio-pm --version=0.5.38
```

To explore other chart versions, look at:
Expand Down
2 changes: 1 addition & 1 deletion charts/rstudio-workbench/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: rstudio-workbench
description: Official Helm chart for Posit Workbench
version: 0.8.3
version: 0.8.4
apiVersion: v2
appVersion: 2024.09.0
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png
Expand Down
4 changes: 4 additions & 0 deletions charts/rstudio-workbench/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.8.4

- Move the values files for linting and installation testing outside the chart directory so that we can iterate on them without releasing a new version of the chart

## 0.8.3

- Bump version of launcher templates `job.tpl` and `service.tpl`
Expand Down
6 changes: 3 additions & 3 deletions charts/rstudio-workbench/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Posit Workbench

![Version: 0.8.3](https://img.shields.io/badge/Version-0.8.3-informational?style=flat-square) ![AppVersion: 2024.09.0](https://img.shields.io/badge/AppVersion-2024.09.0-informational?style=flat-square)
![Version: 0.8.4](https://img.shields.io/badge/Version-0.8.4-informational?style=flat-square) ![AppVersion: 2024.09.0](https://img.shields.io/badge/AppVersion-2024.09.0-informational?style=flat-square)

#### _Official Helm chart for Posit Workbench_

Expand All @@ -24,11 +24,11 @@ To ensure a stable production deployment:

## Installing the chart

To install the chart with the release name `my-release` at version 0.8.3:
To install the chart with the release name `my-release` at version 0.8.4:

```{.bash}
helm repo add rstudio https://helm.rstudio.com
helm upgrade --install my-release rstudio/rstudio-workbench --version=0.8.3
helm upgrade --install my-release rstudio/rstudio-workbench --version=0.8.4
```

To explore other chart versions, look at:
Expand Down
5 changes: 5 additions & 0 deletions ci/posit-chronicle/install/basic-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config:
LocalStorage:
Enabled: true
Location: "/chronicle-data"
RetentionPeriod: "30d"
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions ci/rstudio-connect/install/basic-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
readinessProbe:
enabled: false
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions ci/rstudio-pm/install/basic-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
readinessProbe:
enabled: false
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions ci/rstudio-workbench/install/basic-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
readinessProbe:
enabled: false
Empty file.
Loading

0 comments on commit bcf3579

Please sign in to comment.