generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Integration guide for sample-app (#1733)
Co-authored-by: Rakesh Garimella <[email protected]> Co-authored-by: Nina Hingerl <[email protected]>
- Loading branch information
1 parent
a099d94
commit 09d6fd9
Showing
23 changed files
with
1,051 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build Sample App Image | ||
|
||
on: | ||
pull_request_target: | ||
paths: | ||
- "docs/user/integration/sample-app/**" | ||
types: [ opened, edited, synchronize, reopened, ready_for_review ] | ||
push: | ||
branches: | ||
- main | ||
- sample-app | ||
paths: | ||
- "docs/user/integration/sample-app/**" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
envs: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tags: ${{ steps.create-tags.outputs.tags }} | ||
|
||
steps: | ||
- name: create tags | ||
id: create-tags | ||
run: | | ||
if [[ $GITHUB_EVENT_NAME == 'push' || $GITHUB_EVENT_NAME == 'merge_group' ]]; then | ||
echo 'TAGS=latest' >> "$GITHUB_OUTPUT" | ||
else | ||
{ | ||
echo 'tags<<TAGS' | ||
echo 'PR-${{ github.event.pull_request.number }}' | ||
echo '${{ github.event.pull_request.head.sha }}' | ||
echo 'TAGS' | ||
} >> "$GITHUB_OUTPUT" | ||
fi | ||
build-image: | ||
needs: envs | ||
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main | ||
with: | ||
name: samples/telemetry-sample-app | ||
dockerfile: Dockerfile | ||
context: docs/user/integration/sample-app | ||
tags: ${{ needs.envs.outputs.tags }} | ||
list-images: | ||
needs: build-image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: List images | ||
run: | | ||
echo "${{ needs.build-image.outputs.images }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Telemetry Self Monitor Image Builder | ||
name: Build Telemetry Self Monitor Image | ||
|
||
on: | ||
pull_request_target: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM golang:1.23 AS builder | ||
RUN mkdir /app | ||
ADD . /app | ||
WORKDIR /app | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o main ./... | ||
|
||
FROM scratch | ||
LABEL [email protected]:kyma-project/telemetry-manager.git | ||
|
||
COPY --from=builder /app . | ||
EXPOSE 8080 | ||
|
||
CMD ["./main"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
|
||
required = [ | ||
"golang.org/x/lint/golint" | ||
] | ||
|
||
[[constraint]] | ||
version = "v0.9.2" | ||
name = "github.com/prometheus/client_golang" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
APP_NAME = sample-app | ||
|
||
build: | ||
go mod vendor | ||
go generate ./... | ||
CGO_ENABLED=0 go build -o ./bin/app $(buildpath) | ||
|
||
run: build | ||
./bin/app | ||
|
||
image: | ||
docker build -t $(APP_NAME):latest . | ||
|
||
clean: | ||
rm -f ./bin/app |
Oops, something went wrong.