This commit is contained in:
cnbattle
2019-12-23 09:34:39 +08:00
parent af6e671346
commit 124b0f9b69
3 changed files with 36 additions and 27 deletions
+11 -11
View File
@@ -16,24 +16,24 @@ steps:
- name: gopath
path: /go
# - name: lint
# pull: always
# image: golang:1.13
# commands:
# - make lint
# volumes:
# - name: gopath
# path: /go
- name: misspell
- name: lint
pull: always
image: golang:1.13
commands:
- make misspell-check
- make lint
volumes:
- name: gopath
path: /go
# - name: misspell
# pull: always
# image: golang:1.13
# commands:
# - make misspell-check
# volumes:
# - name: gopath
# path: /go
- name: test
pull: always
image: golang:1.13-alpine
+25
View File
@@ -0,0 +1,25 @@
ignoreGeneratedHeader = false
severity = "warning"
confidence = 0.8
errorCode = 1
warningCode = 1
[rule.blank-imports]
[rule.context-as-argument]
[rule.context-keys-type]
[rule.dot-imports]
[rule.error-return]
[rule.error-strings]
[rule.error-naming]
[rule.exported]
[rule.if-return]
[rule.increment-decrement]
[rule.var-naming]
[rule.var-declaration]
[rule.package-comments]
[rule.range]
[rule.receiver-naming]
[rule.time-naming]
[rule.unexported-return]
[rule.indent-error-flow]
[rule.errorf]
-16
View File
@@ -117,22 +117,6 @@ endif
docker tag $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE):latest $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE):$(tag)
docker push $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE):$(tag)
ssh-server:
adduser -h /home/drone-scp -s /bin/bash -D -S drone-scp
echo drone-scp:1234 | chpasswd
mkdir -p /home/drone-scp/.ssh
chmod 700 /home/drone-scp/.ssh
cp tests/.ssh/id_rsa.pub /home/drone-scp/.ssh/authorized_keys
chown -R drone-scp /home/drone-scp/.ssh
# install ssh and start server
apk add --update openssh openrc
rm -rf /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_dsa_key
sed -i 's/AllowTcpForwarding no/AllowTcpForwarding yes/g' /etc/ssh/sshd_config
./tests/entrypoint.sh /usr/sbin/sshd -D &
coverage:
sed -i '/main.go/d' coverage.txt
clean:
$(GO) clean -x -i ./...
rm -rf coverage.txt $(EXECUTABLE) $(DIST)