Skip to content

Commit

Permalink
trigger a change
Browse files Browse the repository at this point in the history
  • Loading branch information
sbaizet-ledger committed Oct 17, 2024
1 parent 5b0c305 commit f8df307
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 218 deletions.
115 changes: 7 additions & 108 deletions .github/workflows/publish-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
- 'charts/**'

jobs:
helm-chart-testing-not-scroll-sdk:
name: chart-testing-without-scroll-sdk
helm-chart-testing:
name: chart-testing
runs-on: ubuntu-latest
environment: test
steps:
Expand All @@ -32,7 +32,7 @@ jobs:

- name: Helm registry login
run: |
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

Expand All @@ -49,11 +49,11 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --config ct.yaml --excluded-charts scroll-sdk --target-branch ${{ github.event.repository.default_branch }}

publish-ghcr-not-scroll-sdk:
name: publish-to-github-without-scroll-sdk
publish-ghcr:
name: publish-to-github
runs-on: ubuntu-latest
needs:
- helm-chart-testing-not-scroll-sdk
- helm-chart-testing
outputs:
charts: ${{ steps.list-changed.outputs.changed }}
steps:
Expand All @@ -72,11 +72,10 @@ jobs:
- name: Helm registry login
run: |
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

# We filter here the scroll-sdk chart
- name: Push chart to ghcr
if: steps.filter.outputs.addedOrModified == 'true'
env:
Expand All @@ -90,106 +89,6 @@ jobs:
for i in "${PATHS[@]}"
do
chart=$(echo $i | awk -F "/" '{print $2}')
if [ "$chart" != "scroll-sdk" ]; then
CHARTS+=($chart)
fi
done
# Remove duplicates
CHARTS=( `for i in ${CHARTS[@]}; do echo $i; done | sort -u` )
echo "CHARTS: ${CHARTS[@]}"
for chart in ${CHARTS[@]}; do
helm dependencies build charts/$chart
helm package charts/$chart
export CHART_VERSION=$(grep 'version:' charts/$chart/Chart.yaml | head -n1 | awk '{ print $2 }')
helm push $chart-${CHART_VERSION}.tgz oci://ghcr.io/scroll-tech/scroll-sdk/helm
done
helm-chart-testing-scroll-sdk:
name: chart-testing-scroll-sdk
runs-on: ubuntu-latest
needs:
- publish-ghcr-not-scroll-sdk
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- uses: actions/setup-python@v5
with:
python-version: '3.x'
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.0

- name: Setup scroll-sdk values
run: cd charts/scroll-sdk && docker run --rm -t -v .:/contracts/volume scrolltech/scroll-stack-contracts:gen-configs-v0.0.18

- name: Helm registry login
run: |
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

# List scroll-sdk chart if it has changed
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --chart-dirs charts/scroll-sdk --target-branch ${{ github.event.repository.default_branch }} )
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --config ct.yaml --charts scroll-sdk --target-branch ${{ github.event.repository.default_branch }}

publish-ghcr-scroll-sdk:
name: publish-scroll-sdk-to-github
runs-on: ubuntu-latest
needs:
- helm-chart-testing-scroll-sdk
outputs:
charts: ${{ steps.list-changed.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.event.repository.default_branch }}
list-files: shell
filters: |
addedOrModified:
- added|modified: 'charts/scroll-sdk/**'
- name: Helm registry login
run: |
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

- name: Push chart to ghcr
if: steps.filter.outputs.addedOrModified == 'true'
env:
HELM_EXPERIMENTAL_OCI: 1
run: |
set -x
CHARTS=()
PATHS=(${{ steps.filter.outputs.addedOrModified_files }})
echo ${PATHS}
# Get only the chart paths
for i in "${PATHS[@]}"
do
CHARTS+=($(echo $i | awk -F "/" '{print $2}'))
done
# Remove duplicates
CHARTS=( `for i in ${CHARTS[@]}; do echo $i; done | sort -u` )
Expand Down
107 changes: 1 addition & 106 deletions .github/workflows/publish-dev-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- name: Helm registry login
run: |
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

Expand Down Expand Up @@ -78,7 +78,6 @@ jobs:
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

# We filter here the scroll-sdk chart
- name: Push chart to ghcr
if: steps.filter.outputs.addedOrModified == 'true'
env:
Expand All @@ -92,110 +91,6 @@ jobs:
for i in "${PATHS[@]}"
do
chart=$(echo $i | awk -F "/" '{print $2}')
if [ "$chart" != "scroll-sdk" ]; then
CHARTS+=($chart)
fi
done
# Remove duplicates
CHARTS=( `for i in ${CHARTS[@]}; do echo $i; done | sort -u` )
echo "CHARTS: ${CHARTS[@]}"
for chart in ${CHARTS[@]}; do
helm dependencies build charts/$chart
helm package charts/$chart
export CHART_VERSION=$(grep 'version:' charts/$chart/Chart.yaml | head -n1 | awk '{ print $2 }')
helm push $chart-${CHART_VERSION}.tgz oci://${HELM_REGISTRY}
done
helm-chart-testing-scroll-sdk:
name: chart-testing-scroll-sdk
runs-on: ubuntu-latest
needs:
- publish-ghcr-not-scroll-sdk
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- uses: actions/setup-python@v5
with:
python-version: '3.x'
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.0

- name: Setup scroll-sdk values
run: cd charts/scroll-sdk && docker run --rm -t -v .:/contracts/volume scrolltech/scroll-stack-contracts:gen-configs-v0.0.18

- name: Helm registry login
run: |
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

# List scroll-sdk chart if it has changed
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --chart-dirs charts/scroll-sdk --target-branch ${{ github.event.repository.default_branch }} )
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --config ct.yaml --charts scroll-sdk --target-branch ${{ github.event.repository.default_branch }}

publish-ghcr-scroll-sdk:
name: publish-scroll-sdk-to-github
runs-on: ubuntu-latest
needs:
- helm-chart-testing-scroll-sdk
outputs:
charts: ${{ steps.list-changed.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.event.repository.default_branch }}
list-files: shell
filters: |
addedOrModified:
- added|modified: 'charts/scroll-sdk/**'
- name: Helm registry login
run: |
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

- name: Replace helm registry by helm/dev
run: |
sed -i 's|oci://ghcr.io/scroll-tech/scroll-sdk/helm|oci://ghcr.io/scroll-tech/scroll-sdk/helm/dev|g' charts/scroll-sdk/Chart.yaml
- name: Push chart to ghcr
if: steps.filter.outputs.addedOrModified == 'true'
env:
HELM_EXPERIMENTAL_OCI: 1
run: |
set -x
CHARTS=()
PATHS=(${{ steps.filter.outputs.addedOrModified_files }})
echo ${PATHS}
# Get only the chart paths
for i in "${PATHS[@]}"
do
CHARTS+=($(echo $i | awk -F "/" '{print $2}'))
done
# Remove duplicates
CHARTS=( `for i in ${CHARTS[@]}; do echo $i; done | sort -u` )
Expand Down
2 changes: 1 addition & 1 deletion charts/scroll-proving-sdk/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v2
description: scroll-proving-sdk helm charts
name: scroll-proving-sdk
version: 0.0.1
version: 0.0.2
appVersion: v0.1.0
kubeVersion: ">=1.22.0-0"
maintainers:
Expand Down
4 changes: 2 additions & 2 deletions charts/scroll-proving-sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# scroll-proving-sdk

![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square)
![Version: 0.0.2](https://img.shields.io/badge/Version-0.0.2-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square)

scroll-proving-sdk helm charts

Expand Down Expand Up @@ -54,7 +54,7 @@ Kubernetes: `>=1.22.0-0`
| resources.limits.memory | string | `"500Mi"` | |
| resources.requests.cpu | string | `"50m"` | |
| resources.requests.memory | string | `"100Mi"` | |
| scrollConfig | string | `"{\n \"prover_name_prefix\": \"sindri_\",\n \"keys_dir\": \"keys\",\n \"coordinator\": {\n \"base_url\": \"https://coordinator-api.oct.sdk.scroll.xyz\",\n \"retry_count\": 3,\n \"retry_wait_time_sec\": 5,\n \"connection_timeout_sec\": 60\n },\n \"l2geth\": {\n \"endpoint\": \"https://l2-rpc.oct.sdk.scroll.xyz\"\n },\n \"prover\": {\n \"circuit_type\": 3,\n \"circuit_version\": \"v0.13.1\",\n \"n_workers\": 1,\n \"cloud\": {\n \"base_url\": \"https://sindri.app/api/v1/\",\n \"api_key\": \"sindri_TQcZKJHoPhAho7UuBFw8evEvP4nQkjQ4_0807\",\n \"retry_count\": 3,\n \"retry_wait_time_sec\": 5,\n \"connection_timeout_sec\": 60\n }\n }\n}"` | |
| scrollConfig | object | `{}` | |
| service.main.enabled | bool | `true` | |
| service.main.ports.http.enabled | bool | `true` | |
| service.main.ports.http.port | int | `80` | |
Expand Down
3 changes: 2 additions & 1 deletion charts/scroll-proving-sdk/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ probes:
startup:
<<: *default_probes

scrollConfig: {}
scrollConfig: |
{}

0 comments on commit f8df307

Please sign in to comment.