Skip to content

Commit

Permalink
Merge pull request #487 from rstudio/kegs-test-connect-versions
Browse files Browse the repository at this point in the history
Connect: Enable Quarto and Python by default for local execution
  • Loading branch information
dbkegley authored Apr 30, 2024
2 parents bcb77db + 1be2b30 commit 108f15d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/chart-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,22 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' }}
run: ct install --target-branch main --all --chart-dirs charts --chart-dirs other-charts
continue-on-error: true

check-versions-connect:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.6.3

- uses: extractions/setup-just@v2

- name: Run executable verification for default interpreters
run: |
just test-connect-interpreter-versions
31 changes: 31 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,34 @@ snapshot-rsw-diff:
{{ DIFF }} $file $file.lock
fi
done

test-connect-interpreter-versions:
#!/usr/bin/env bash
set -xe
cd ./charts/rstudio-connect && helm dependency build && cd -
# find the default image
image=$(
helm template ./charts/rstudio-connect \
--show-only templates/deployment.yaml | \
grep "image\:.*rstudio-connect.*" | \
awk -F": " '{print $2}' | \
xargs)

for lang in "Python" "Quarto" "R"
do
# print the default connect config file for local execution in ini format
# print the section and grep for the Executables to find each interpreter
executables=$(
helm template ./charts/rstudio-connect \
--set config.Launcher.Enabled=false \
--show-only templates/configmap.yaml | \
sed -n -e "/\[$lang\]/,/\[*\]/ p" | \
grep Executable | awk -F= '{print $2}' | \
xargs)

for ex in $executables
do
docker run --rm $image /bin/bash -c "command -v $ex"
done
done

0 comments on commit 108f15d

Please sign in to comment.