Skip to content

Commit 8026374

Browse files
committed
Fix Helm push
1 parent ba33633 commit 8026374

File tree

3 files changed

+30
-7
lines changed

3 files changed

+30
-7
lines changed

.github/workflows/release.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,25 @@ jobs:
5656
docker tag coder-logstream-kube:latest $BASE:latest
5757
docker push $IMAGE
5858
docker push $BASE:latest
59+
60+
- name: Authenticate to Google Cloud
61+
uses: google-github-actions/auth@v1
62+
with:
63+
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_ID_PROVIDER }}
64+
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
65+
66+
- name: Setup GCloud SDK
67+
uses: "google-github-actions/setup-gcloud@v1"
68+
69+
- name: Publish Helm Chart
70+
run: |
71+
set -euo pipefail
72+
version="$(./scripts/version.sh)"
73+
./scripts/helm.sh --version $version
74+
75+
mkdir -p build/helm
76+
cp "build/${version}.tgz" build/helm
77+
gsutil cp gs://helm.coder.com/logstream-kube/index.yaml build/helm/index.yaml
78+
helm repo index build/helm --url https://helm.coder.com/logstream-kube --merge build/helm/index.yaml
79+
gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/${version}.tgz gs://helm.coder.com/logstream-kube
80+
gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/index.yaml gs://helm.coder.com/logstream-kube

logger_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ func TestPodEventLogger(t *testing.T) {
3434
client := fake.NewSimpleClientset()
3535
ctx := context.Background()
3636
reporter, err := newPodEventLogger(ctx, podEventLoggerOptions{
37-
client: client,
38-
coderURL: agentURL,
39-
namespace: namespace,
40-
logger: slogtest.Make(t, nil),
37+
client: client,
38+
coderURL: agentURL,
39+
namespace: namespace,
40+
logger: slogtest.Make(t, nil),
41+
logDebounce: time.Millisecond,
4142
})
4243
require.NoError(t, err)
4344

scripts/helm.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# If no version is specified, defaults to the version from ./version.sh.
1010
#
1111
# If no output path is specified, defaults to
12-
# "$repo_root/build/coder_helm_$version.tgz".
12+
# "$repo_root/build/coder_logstream_kube_helm_$version.tgz".
1313
#
1414
# If the --push parameter is specified, the resulting artifact will be published
1515
# to the Coder OSS repo. This requires `gsutil` to be installed and configured.
@@ -54,12 +54,12 @@ done
5454
# Remove the "v" prefix.
5555
version="${version#v}"
5656
if [[ "$version" == "" ]]; then
57-
version="$(execrelative ./version.sh)"
57+
version="$(./scripts/version.sh)"
5858
fi
5959

6060
if [[ "$output_path" == "" ]]; then
6161
mkdir -p build
62-
output_path="$(realpath "build/coder_helm_$version.tgz")"
62+
output_path="$(realpath "build/$version.tgz")"
6363
fi
6464

6565
# Make a destination temporary directory, as you cannot fully control the output

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy