edited ci config

This commit is contained in:
Smart-SangGe 2022-07-27 12:11:27 +08:00
parent 6e81d229f6
commit 3d35dfa658
2 changed files with 24 additions and 30 deletions

View File

@ -1,26 +1,10 @@
# You can override the included template(s) by including variable overrides image: golang:latest
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
stages: stages:
- build - build
- test
- deploy job_build:
- review stage: build
- dast script:
- staging - go build console.go
- canary
- production
- incremental rollout 10%
- incremental rollout 25%
- incremental rollout 50%
- incremental rollout 100%
- performance
- cleanup
sast:
stage: test
include:
- template: Auto-DevOps.gitlab-ci.yml

View File

@ -95,11 +95,10 @@ func listener(port int) {
} }
} }
}() }()
fmt.Println("waiting exit") exitsignal := <-exit // 2. 尝试从通道中读取内容,若通道为空,则阻塞在此
aaaa := <-exit // 2. 尝试从通道中读取内容,若通道为空,则阻塞在此
sstop <- "stop sender" sstop <- "stop sender"
rstop <- "stop receiver" rstop <- "stop receiver"
fmt.Printf("command: %v\n", aaaa) fmt.Printf("command: %v\n", exitsignal)
return return
} }
@ -256,10 +255,11 @@ func dial(host string, port int) {
} }
} }
}() }()
aaaa := <-exit //尝试从通道中读取内容,若通道为空,则阻塞在此
exitsignal := <-exit //尝试从通道中读取内容,若通道为空,则阻塞在此
sstop <- "stop sender" sstop <- "stop sender"
rstop <- "stop receiver" rstop <- "stop receiver"
fmt.Printf("command: %v\n", aaaa) fmt.Printf("command: %v\n", exitsignal)
return return
} }
@ -358,6 +358,16 @@ func sender(conn *net.TCPConn, exit chan string, receive chan int, sstop chan st
receive <- 1 receive <- 1
return return
} }
if strings.HasPrefix(inp, "cd ..") {
fmt.Println("don't use .. change dir")
return
}
if strings.HasPrefix(inp, "cd .") {
fmt.Println("don't use . change dir")
return
}
conn.Write([]byte(inp)) conn.Write([]byte(inp))
receive <- 1 receive <- 1
return return