You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.5 KiB
68 lines
1.5 KiB
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "build",
|
|
"type": "shell",
|
|
"group": {
|
|
"kind": "build",
|
|
"isDefault": true
|
|
},
|
|
"presentation": {
|
|
"echo": true,
|
|
"panel": "new"
|
|
},
|
|
"options": {
|
|
"cwd": "${workspaceRoot}",
|
|
"env": {
|
|
"APP": "authDBService",
|
|
"GOOS": "linux",
|
|
"GOARCH": "amd64",
|
|
"GOBIN": "${env:GOPATH}/bin"
|
|
},
|
|
"args": ["ldflags '-s -w'"]
|
|
},
|
|
"command": "go build -o $GOBIN/$APP-$GOOS-$GOARCH -ldflags \"-s -w\" ./cmd/main.go",
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "docker-build",
|
|
"type": "shell",
|
|
"group": {
|
|
"kind": "build"
|
|
},
|
|
"presentation": {
|
|
"echo": true,
|
|
"panel": "new"
|
|
},
|
|
"options": {
|
|
"cwd": "${workspaceRoot}",
|
|
"env": {
|
|
"TAG": "slaventius/test3k_auth_db:latest"
|
|
},
|
|
"args": ["--no-cache", "--tag $TAG"]
|
|
},
|
|
"command": "sudo docker build --no-cache --tag $TAG ./build/",
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "docker-push",
|
|
"type": "shell",
|
|
"group": {
|
|
"kind": "build"
|
|
},
|
|
"presentation": {
|
|
"echo": true,
|
|
"panel": "new"
|
|
},
|
|
"options": {
|
|
"cwd": "${workspaceRoot}",
|
|
"env": {
|
|
"TAG": "slaventius/test3k_auth_db:latest"
|
|
}
|
|
},
|
|
"command": "sudo docker push $TAG",
|
|
"problemMatcher": []
|
|
}
|
|
]
|
|
}
|
|
|