Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
netcode committed Aug 8, 2023
1 parent ca2bc41 commit 2014f12
Show file tree
Hide file tree
Showing 46 changed files with 3,813 additions and 922 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/docker.yaml
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
6 changes: 3 additions & 3 deletions .prettierrc
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
}
29 changes: 13 additions & 16 deletions Examples/simple-springboot-app/README.md
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 |
4 changes: 2 additions & 2 deletions Examples/simple-springboot-app/init.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: "spring-boot"
name: 'spring-boot'
port: 3000
headers:
headers:
22 changes: 11 additions & 11 deletions Examples/simple-springboot-app/templates/404.yaml
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'
82 changes: 41 additions & 41 deletions Examples/simple-springboot-app/templates/actuators.yaml
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 Examples/simple-springboot-app/templates/api_articles.yaml
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 Examples/simple-springboot-app/templates/api_authors.yaml
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'
42 changes: 21 additions & 21 deletions Examples/simple-springboot-app/templates/api_login.yaml
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"}'
Loading

0 comments on commit 2014f12

Please sign in to comment.