Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Initial commit #2

Merged
merged 7 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ build/

# Brew
Brewfile.lock.json

# Environment
.env

# VSCode
.vscode/settings.json

1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# TODO: update this
before:
hooks:
- make install-tools
- go generate ./...
builds:
- dir: ./
Expand Down
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"request": "launch",
"mode": "auto",
"program": "${fileDirname}",
"args": []
"args": [],
"envFile": "${workspaceFolder}/.env" // Add this line to source the .env file
}
]
}
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
-include .env
export
include ./Makefile.Common

BUILD_DIR ?= $(SRC_ROOT)/build
OS := $(shell uname | tr '[:upper:]' '[:lower:]')
ARCH := $(shell uname -m)
GENQLIENT := $(TOOLS_BIN_DIR)/genqlient

CHECKS = generate lint test tidy fmt

Expand Down Expand Up @@ -46,3 +49,7 @@ checks: install-tools
else \
echo "completed successfully."; \
fi

.PHONY: run
run: build
$(BUILD_DIR)/dora-the-explorer
54 changes: 54 additions & 0 deletions dorateamhelper.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package main

type DoraTeam struct {
Level string
MinutesBetweenDeploys int
}

// Performance level Elite:
// Deployment Frequency: On-demand (multiple deploys per day)
// Change lead time: Less than one day
// Change failure rate: 5%
// Failed deployment recovery time: Less than one hour
func NewEliteDoraTeam() *DoraTeam {
return &DoraTeam{
Level: "Elite",
MinutesBetweenDeploys: 240, // 4 hours
}
}

// Performance level High:
// Deployment Frequency: Between once per day and once per week
// Change lead time: Between one day and one week
// Change failure rate: 10%
// Failed deployment recovery time: Less than one day
func NewHighDoraTeam() *DoraTeam {
return &DoraTeam{
Level: "High",
MinutesBetweenDeploys: 60,
}
}

// Performance level Medium:
// Deployment Frequency: Between once per week and once per month
// Change lead time: Between one week and one month
// Change failure rate: 15%
// Failed deployment recovery time: Between one day and one week
func NewMediumDoraTeam() *DoraTeam {
return &DoraTeam{
Level: "Medium",
MinutesBetweenDeploys: 1440,
}
}

// Performance level Low:
// Deployment Frequency: Between once per week and once per month
// Change lead time: Between one week and one month
// Change failure rate: 64%
// Failed deployment recovery time: Between one month and six months
func NewLowDoraTeam() *DoraTeam {
return &DoraTeam{
Level: "Low",
MinutesBetweenDeploys: 10080,
}
}
Loading
Loading