Skip to content

Commit

Permalink
add skaffold build test (#29)
Browse files Browse the repository at this point in the history
* add skaffold build test

* upgrade custom actions

* use a later version of skaffold

* instruct earthly to create the correct image

* fix helm chart, based on skaffold testing. yay!

* bump chart
  • Loading branch information
djeebus authored Dec 12, 2022
1 parent 45afc22 commit ee98401
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/on_pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- '!.tool-versions'
- '!COPYING.LGPL-3'
- '!.gitattributes'
- '!..gitignore'
- '!.gitignore'


jobs:
Expand All @@ -33,3 +33,23 @@ jobs:
# intentionally avoiding --push, this is just
# to test the command
- run: earthly +release

skaffold:
runs-on: ubuntu-22.04
steps:
- uses: earthly/actions-setup@v1
with: { version: v0.6.30 }

- uses: actions/checkout@v3

- name: start minikube
uses: hiberbee/[email protected]

- name: setup helm
uses: hiberbee/[email protected]

- name: run skaffold
uses: hiberbee/[email protected]
with:
skaffold-version: 2.0.3
command: run
2 changes: 1 addition & 1 deletion charts/prom-aggregation-gateway/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: prom-aggregation-gateway
version: 0.5.0
version: 0.5.1
home: https://github.com/zapier/prom-aggregation-gateway
maintainers:
- name: djeebus
Expand Down
6 changes: 3 additions & 3 deletions charts/prom-aggregation-gateway/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ spec:
{{- end }}
{{- end }}
args:
- --listen
- --apiListen
- :{{ .Values.controller.apiPort }}
- --metricsListen
- --lifecycleListen
- :{{ .Values.controller.lifecyclePort }}
ports:
- name: apiPort
- name: api-port
containerPort: {{ .Values.controller.apiPort }}
- name: lifecycle
containerPort: {{ .Values.controller.lifecyclePort }}
Expand Down
4 changes: 2 additions & 2 deletions charts/prom-aggregation-gateway/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ spec:
selector:
{{- include "prom-aggregation-gateway.selectorLabels" . | nindent 4 }}
ports:
- name: apiPort
- name: api-port
port: {{ .Values.service.port }}
targetPort: apiPort
targetPort: api-port
{{- if eq .Values.service.type "NodePort" }}
nodePort: {{ .Values.service.nodePort }}
{{- else if ne (default .Values.controller.nodePort 12345) 12345 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ spec:
matchLabels:
{{- include "prom-aggregation-gateway.selectorLabels" . | nindent 6 }}
endpoints:
- port: apiPort
- port: api-port
{{- end }}
2 changes: 1 addition & 1 deletion skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:
artifacts:
- image: ghcr.io/zapier/prom-aggregation-gateway
custom:
buildCommand: earthly +build-docker --version=dev
buildCommand: earthly +build-docker --version=dev --image_name=ghcr.io/zapier/prom-aggregation-gateway
tagPolicy:
customTemplate:
template: dev
Expand Down

0 comments on commit ee98401

Please sign in to comment.