Skip to content

Commit 60c2dc6

Browse files
authored
Merge pull request #25 from energywebfoundation/develop
merge develop to master
2 parents 3008661 + 33b644c commit 60c2dc6

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
4848
echo "IMAGE_TAG=$(uuidgen)" >> $GITHUB_OUTPUT
4949
echo "TAG_DRY_RUN=true" >> $GITHUB_OUTPUT
50-
echo "PUSH_DOCKER=false" >> $GITHUB_OUTPUT
50+
echo "PUSH_DOCKER=true" >> $GITHUB_OUTPUT
5151
elif [ "${{ github.ref }}" = "refs/heads/master" ]; then
5252
echo "ENVIRONMENT=staging" >> $GITHUB_OUTPUT
5353
echo "PRERELEASE=true" >> $GITHUB_OUTPUT

cmd/sample-app/main.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
package main
22

33
import (
4+
"errors"
45
"io"
56
"log"
67
"net/http"
8+
"os"
79

810
"github.com/energywebfoundation/sample-go-app/internal/latestblock"
911
)
1012

1113
func main() {
1214

15+
shouldCrash := os.Getenv("SHOULD_CRASH")
16+
17+
if shouldCrash == "true" {
18+
panic(errors.New("SHOULD_CRASH is set to true"))
19+
20+
return
21+
}
22+
1323
shouldReturnHealth := true
1424

1525
handlers := latestblock.WrapperStruct{RpcUrl: "https://volta-rpc.energyweb.org"}

helm/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ spec:
3434
{{- toYaml .Values.securityContext | nindent 12 }}
3535
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
3636
imagePullPolicy: {{ .Values.image.pullPolicy }}
37+
env:
38+
- name: "SHOULD_CRASH"
39+
value: {{.Values.shouldCrash}}
3740
ports:
3841
- name: http
3942
containerPort: {{ .Values.service.port }}

helm/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ imagePullSecrets: []
1414
nameOverride: "sample-go-app"
1515
fullnameOverride: "sample-go-app"
1616

17-
restartPolicy: "Never"
17+
restartPolicy: "Always"
18+
shouldCrash: "False"
1819

1920
serviceAccount:
2021
# Specifies whether a service account should be created

0 commit comments

Comments
 (0)