-
Notifications
You must be signed in to change notification settings - Fork 11
/
Taskfile.yaml
49 lines (42 loc) · 2.47 KB
/
Taskfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: '3'
env:
IMAGE_NAME: '{{ .IMAGE_NAME | default "<YOUR-USERNAME>/<IMAGE-NAME>:<IMAGE-TAG>" }}'
tasks:
certs_windows:
desc: "Generate SSL certificates for Windows environment using OpenSSL, including CA and server certificates."
cmds:
- mkdir -p "./cmd/proxy/.cert"
- openssl ecparam -out ./cmd/proxy/.cert/ca.key -name prime256v1 -genkey
- openssl req -new -sha256 -key ./cmd/proxy/.cert/ca.key -out ./cmd/proxy/.cert/ca.csr
- openssl x509 -req -sha256 -days 3650 -in ./cmd/proxy/.cert/ca.csr -signkey ./cmd/proxy/.cert/ca.key -out ./cmd/proxy/.cert/ca.crt
- openssl ecparam -out ./cmd/proxy/.cert/server.key -name prime256v1 -genkey
- openssl req -new -sha256 -key ./cmd/proxy/.cert/server.key -out ./cmd/proxy/.cert/server.csr
- openssl x509 -req -in ./cmd/proxy/.cert/server.csr -CA ./cmd/proxy/.cert/ca.crt -CAkey ./cmd/proxy/.cert/ca.key -CAcreateserial -out ./cmd/proxy/.cert/server.crt -days 3650 -sha256
- openssl x509 -in ./cmd/proxy/.cert/server.crt -text -noout
certs:
desc: "Generate SSL certificates for non-Windows environments using OpenSSL, including CA and server certificates."
cmds:
- mkdir -p "./cmd/proxy/.cert"
- openssl ecparam -out ./cmd/proxy/.cert/ca.key -name prime256v1 -genkey
- openssl req -new -sha256 -key ./cmd/proxy/.cert/ca.key -out ./cmd/proxy/.cert/ca.csr
- openssl x509 -req -sha256 -days 3650 -in ./cmd/proxy/.cert/ca.csr -signkey ./cmd/proxy/.cert/ca.key -out ./cmd/proxy/.cert/ca.crt
- openssl ecparam -out ./cmd/proxy/.cert/server.key -name prime256v1 -genkey
- openssl req -new -sha256 -key ./cmd/proxy/.cert/server.key -out ./cmd/proxy/.cert/server.csr
- openssl x509 -req -in ./cmd/proxy/.cert/server.csr -CA ./cmd/proxy/.cert/ca.crt -CAkey ./cmd/proxy/.cert/ca.key -CAcreateserial -out ./cmd/proxy/.cert/server.crt -days 3650 -sha256
- openssl x509 -in ./cmd/proxy/.cert/server.crt -text -noout
mocks:
desc: "Generate mock implementations for testing using Mockery."
cmds:
- mockery
build:
desc: "Build a project using Golang"
cmds:
- go build -o ./out/app ./cmd/proxy
dockerBuild:
desc: "Build a Docker image using the specified Dockerfile and tag it with the provided image name."
cmds:
- docker build -t {{ .IMAGE_NAME }} -f .\build\Dockerfile .
dockerPush:
desc: "Push the Docker image to the remote registry with the specified image name."
cmds:
- docker push {{ .IMAGE_NAME }}