Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
feature: add the yamllint tool in circleci config
Browse files Browse the repository at this point in the history
1. add the yamllint tool
2. repair the format of template yaml file of dfget/dfdaemon

Signed-off-by: fengzixu <[email protected]>
  • Loading branch information
fengzixu committed Dec 7, 2019
1 parent 20dca47 commit 6b7ed5b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
10 changes: 7 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
docker:
# this image is built from Dockerfile
# https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile
- image: pouchcontainer/pouchlinter:v0.2.4
- image: dragonflyoss/linter:v0.2.7
working_directory: /go/src/github.com/dragonflyoss/Dragonfly
steps:
- checkout
Expand All @@ -36,11 +36,15 @@ jobs:
- run:
name: use opensource tool client9/misspell to correct commonly misspelled English words
command: |
find ./* -name "*" | xargs misspell -error
find . -name "*" | xargs misspell -error
- run:
name: use yamllint tool to check the format of all yaml files
command: |
find . -name "*.yml" | xargs yamllint
- run:
name: use ShellCheck (https://github.com/koalaman/shellcheck) to check the validateness of shell scripts in pouch repo
command: |
find ./ -name "*.sh" | xargs shellcheck
find . -name "*.sh" | xargs shellcheck
- run:
name: validate go mod files
command: |
Expand Down
32 changes: 16 additions & 16 deletions docs/config/dfdaemon_config_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,38 @@
registry_mirror:
# url for the registry mirror
# Remote url for the registry mirror, default is https://index.docker.io
  remote: https://index.docker.io
remote: https://index.docker.io
# whether to ignore https certificate errors
  insecure: false
insecure: false
# optional certificates if the remote server uses self-signed certificates
  certs: []
certs: []

# Proxies is the list of rules for the transparent proxy. If no rules
# are provided, all requests will be proxied directly. Request will be
# proxied with the first matching rule.
proxies:
# proxy all http image layer download requests with dfget
  - regx: blobs/sha256.*
- regx: blobs/sha256.*
# change http requests to some-registry to https and proxy them with dfget
  - regx: some-registry/
    use_https: true
- regx: some-registry/
use_https: true
# proxy requests directly, without dfget
  - regx: no-proxy-reg
    direct: true
- regx: no-proxy-reg
direct: true

# HijackHTTPS is the list of hosts whose https requests should be hijacked
# by dfdaemon. Dfdaemon will be able to proxy requests from them with dfget
# if the url matches the proxy rules. The first matched rule will be used.
hijack_https:
# key pair used to hijack https requests
  cert: df.crt
  key: df.key
  hosts:
    - regx: mirror.aliyuncs.com:443 # regexp to match request hosts
# whether to ignore https certificate errors
    insecure: false
# optional certificates if the host uses self-signed certificates
    certs: []
cert: df.crt
key: df.key
hosts:
- regx: mirror.aliyuncs.com:443 # regexp to match request hosts
# whether to ignore https certificate errors
insecure: false
# optional certificates if the host uses self-signed certificates
certs: []

# dfget properties
# node: specify the addresses
Expand Down
4 changes: 2 additions & 2 deletions docs/config/dfget_config_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# Nodes specify supernodes.
# Where the host is necessary, the port(default: 8002) and the weight(default:1) are optional.
nodes:
 - 127.0.0.1=1
 - 10.10.10.1:8002=2
- 127.0.0.1=1
- 10.10.10.1:8002=2

# LocalLimit rate limit about a single download task, format: G(B)/g/M(B)/m/K(B)/k/B
# pure number will also be parsed as Byte.
Expand Down

0 comments on commit 6b7ed5b

Please sign in to comment.