import (
_ "net/http/pprof"
"net/http"
)
package main | |
import ( | |
"fmt" | |
"net" | |
"os" | |
"os/exec" | |
) | |
func main() { |
version: '3.7' | |
services: | |
drone-server: | |
container_name: drone_server | |
image: drone/drone:1 | |
ports: | |
- 8080:80 | |
volumes: | |
- /var/lib/drone:/data |
ARG BUILD_IMAGE=maven:3.5-jdk-11 | |
ARG RUNTIME_IMAGE=openjdk:11-jdk-slim | |
############################################################################################# | |
### Stage where Docker is pulling all maven dependencies ### | |
############################################################################################# | |
FROM ${BUILD_IMAGE} as dependencies | |
ARG PROXY_SET=false | |
ARG PROXY_HOST= |
# Consul connect and Nginx | |
## Example docker compose | |
```yaml | |
nginx: | |
image: nginx:latest | |
volumes: | |
- ./docker-compose-nginx.conf:/etc/nginx/nginx.conf:ro | |
ports: | |
- "8181:80" |
const http = require('http'); | |
const os = require('os'); | |
let num = 0; | |
setTimeout(() => { | |
console.log(os.hostname(), num); | |
process.exit(0); | |
}, 60000); |
Some Jenkinsfile examples |
We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.
Let’s create our table driven test, for convenience, I chose to use t.Log
as the test function.
Notice that we don't have any assertion in this test, it is not needed to for the demonstration.
func TestTLog(t *testing.T) {
t.Parallel()
An application's metrics names and types make up an implicit contract which consequences of ignoring can be serious.
Metric are used by systems admins to configure monitoring systems. Good metric names accurately and consistently convey meaning of the associated metric data. Admins should not have to look at the application code to understand what each metric represents. The name of a metric is often the only documentation available. Critical human decisions may have to be quickly made based on metrics, in these situations, their names should be as helpful and trustable as possible.
Dashboards and alerting systems entirely depend on the metrics applications provides them. Changing the identifiers or meaning of the metrics will break these downstream applications, negating the very reason to emit metrics in the first place :
- Alarms that shouldn't have gone off will go off