-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
3,813 additions
and
922 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
name: Release docker image | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: datadog/hash | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: datadog/hash | ||
|
||
permissions: | ||
contents: read | ||
contents: read | ||
|
||
jobs: | ||
docker-build-push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
docker-build-push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/[email protected] | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/[email protected] | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
push: true | ||
build-args: | | ||
VERSION=${{ github.ref_name }} | ||
tags: | | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | ||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
push: true | ||
build-args: | | ||
VERSION=${{ github.ref_name }} | ||
tags: | | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest |
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,5 +1,5 @@ | ||
{ | ||
"useTabs": false, | ||
"tabWidth": 4, | ||
"singleQuote": true | ||
"useTabs": false, | ||
"tabWidth": 4, | ||
"singleQuote": true | ||
} |
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,26 +1,23 @@ | ||
|
||
Springboot Sample Application | ||
------- | ||
## Springboot Sample Application | ||
|
||
Features | ||
|
||
- Springboot Favicon, to be easily identified via `http.favicon.hash:116323821` | ||
- Default Actuators endpoints | ||
- Sample API endpoints | ||
- default 404 errors | ||
- Springboot Favicon, to be easily identified via `http.favicon.hash:116323821` | ||
- Default Actuators endpoints | ||
- Sample API endpoints | ||
- default 404 errors | ||
|
||
### Auth | ||
|
||
| Method | Url | Decription | | ||
| ------ | --- | ---------- | | ||
| POST | /api/login | Log in | | ||
|
||
| Method | Url | Decription | | ||
| ------ | ---------- | ---------- | | ||
| POST | /api/login | Log in | | ||
|
||
### Articles & Authors | ||
|
||
| Method | Url | Description | | ||
| ------ | --- | ----------- | | ||
| GET | /api/articles | Get all articles | | ||
| Method | Url | Description | | ||
| ------ | ----------------- | ----------------- | | ||
| GET | /api/articles | Get all articles | | ||
| GET | /api/article/{id} | Get article by id | | ||
| GET | /api/authors | Get all authors | | ||
| GET | /api/author/{id} | Get author info | | ||
| GET | /api/authors | Get all authors | | ||
| GET | /api/author/{id} | Get author info | |
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,3 +1,3 @@ | ||
name: "spring-boot" | ||
name: 'spring-boot' | ||
port: 3000 | ||
headers: | ||
headers: |
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,14 +1,14 @@ | ||
id: not_found | ||
info: | ||
title: "404 not found" | ||
title: '404 not found' | ||
requests: | ||
- expect: | ||
method: GET | ||
path: '*' | ||
reply: | ||
status: 404 | ||
headers: | ||
content-type: "text/html" | ||
body: | ||
cache: false | ||
view: "404.html" | ||
- expect: | ||
method: GET | ||
path: '*' | ||
reply: | ||
status: 404 | ||
headers: | ||
content-type: 'text/html' | ||
body: | ||
cache: false | ||
view: '404.html' |
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,47 +1,47 @@ | ||
id: actuators | ||
info: | ||
title: "Springboot Actuators" | ||
title: 'Springboot Actuators' | ||
requests: | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/actuator/health' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: "application/vnd.spring-boot.actuator.v3+json" | ||
body: | ||
contents: '{"status":"UP"}' | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/actuator/health' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: 'application/vnd.spring-boot.actuator.v3+json' | ||
body: | ||
contents: '{"status":"UP"}' | ||
|
||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/actuator/beans' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: "application/json" | ||
body: | ||
view: "actuators_beans.json" | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/actuator/beans' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: 'application/json' | ||
body: | ||
view: 'actuators_beans.json' | ||
|
||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/actuator/configprops' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: "application/vnd.spring-boot.actuator.v3+json" | ||
body: | ||
view: "actuators_configprops.json" | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/actuator/configprops' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: 'application/vnd.spring-boot.actuator.v3+json' | ||
body: | ||
view: 'actuators_configprops.json' | ||
|
||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/actuator/env' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: "application/vnd.spring-boot.actuator.v3+json" | ||
body: | ||
view: "actuators_env.json" | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/actuator/env' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: 'application/vnd.spring-boot.actuator.v3+json' | ||
body: | ||
view: 'actuators_env.json' |
42 changes: 21 additions & 21 deletions
42
Examples/simple-springboot-app/templates/api_articles.yaml
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,24 +1,24 @@ | ||
id: api_posts | ||
info: | ||
title: "API Posts" | ||
title: 'API Posts' | ||
requests: | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/api/article/:articleId(\d+)' | ||
reply: | ||
status: 500 | ||
headers: | ||
content-type: "text/html" | ||
body: | ||
contents: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2" | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/api/articles' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: "application/json" | ||
body: | ||
view: "articles.json" | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/api/article/:articleId(\d+)' | ||
reply: | ||
status: 500 | ||
headers: | ||
content-type: 'text/html' | ||
body: | ||
contents: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2" | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/api/articles' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: 'application/json' | ||
body: | ||
view: 'articles.json' |
42 changes: 21 additions & 21 deletions
42
Examples/simple-springboot-app/templates/api_authors.yaml
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,24 +1,24 @@ | ||
id: api_users | ||
info: | ||
title: "API User" | ||
title: 'API User' | ||
requests: | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/api/authors' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: "application/json" | ||
body: | ||
view: "users.json" | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/api/author/:userId(\d+)' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: "application/json" | ||
body: | ||
view: "user-api.json" | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/api/authors' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: 'application/json' | ||
body: | ||
view: 'users.json' | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/api/author/:userId(\d+)' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: 'application/json' | ||
body: | ||
view: 'user-api.json' |
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,24 +1,24 @@ | ||
id: api_auth | ||
info: | ||
title: "API Auth" | ||
title: 'API Auth' | ||
requests: | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/api/login' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: "application/json" | ||
body: | ||
contents: '{"status":"error", "message":"Please use POST request to login"}' | ||
- isTrap: true | ||
expect: | ||
method: POST | ||
path: '/api/login' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: "application/json" | ||
body: | ||
contents: '{"status":"error", "message":"Invalid credentials"}' | ||
- isTrap: true | ||
expect: | ||
method: GET | ||
path: '/api/login' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: 'application/json' | ||
body: | ||
contents: '{"status":"error", "message":"Please use POST request to login"}' | ||
- isTrap: true | ||
expect: | ||
method: POST | ||
path: '/api/login' | ||
reply: | ||
status: 200 | ||
headers: | ||
content-type: 'application/json' | ||
body: | ||
contents: '{"status":"error", "message":"Invalid credentials"}' |
Oops, something went wrong.