diff --git a/.azure-pipeline/pipeline.yml b/.azure-pipeline/pipeline.yml new file mode 100644 index 0000000..a204e9b --- /dev/null +++ b/.azure-pipeline/pipeline.yml @@ -0,0 +1,18 @@ +--- +trigger: + - master + +pr: + branches: + include: + - master + +stages: +- stage: precheck + jobs: + - job: spellcheck + dependsOn: [] + pool: + vmImage: "ubuntu-18.04" + steps: + - script: scripts/spellcheck.sh diff --git a/buddy.yml b/buddy.yml deleted file mode 100644 index b9f3b5e..0000000 --- a/buddy.yml +++ /dev/null @@ -1,87 +0,0 @@ ---- -- pipeline: "build-code" - on: "EVENT" - - events: - - type: "PUSH" - refs: - - "refs/heads/master" - - "refs/pull/*" - - priority: "NORMAL" - fail_on_prepare_env_warning: true - actions: - - action: "Execute: go build -o k8s-secret-injector" - type: "BUILD" - working_directory: "/src/github.com/OT-CONTAINER-KIT/k8s-secret-injector" - docker_image_name: "library/golang" - docker_image_tag: "1.16.0" - execute_commands: - - "export GOPATH=/" - - "export GO15VENDOREXPERIMENT=1" - - "go get -d" - - "go build -o k8s-secret-injector" - volume_mappings: - - "/:/src/github.com/OT-CONTAINER-KIT/k8s-secret-injector" - shell: "BASH" - run_next_parallel: true - - action: "Build Docker image" - type: "DOCKERFILE" - dockerfile_path: "Dockerfile" - run_next_parallel: true - -- pipeline: "code-quality" - on: "EVENT" - - events: - - type: "PUSH" - refs: - - "refs/heads/master" - - "refs/pull/*" - priority: "NORMAL" - fail_on_prepare_env_warning: true - actions: - - action: "Lint Dockerfile" - type: "DOCKERFILE_LINTER" - local_path: "Dockerfile" - shell_type: "sh" - ignore_codes: "ER0015,EF0003" - run_next_parallel: true - - - action: "Execute: golang ci linter" - type: "BUILD" - working_directory: "/src/github.com/OT-CONTAINER-KIT/k8s-secret-injector" - docker_image_name: "library/golang" - docker_image_tag: "1.16.0" - execute_commands: - - "export GOPATH=/" - - "export GO15VENDOREXPERIMENT=1" - - "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.40.0" - - "./bin/golangci-lint run ./... --timeout 5m0s" - volume_mappings: - - "/:/src/github.com/OT-CONTAINER-KIT/k8s-secret-injector" - shell: "BASH" - run_next_parallel: true - -- pipeline: "publish-image" - on: "EVENT" - - events: - - type: "PUSH" - refs: - - "refs/heads/master" - - "refs/pull/*" - priority: "NORMAL" - fail_on_prepare_env_warning: true - actions: - - action: "Push Docker image" - type: "DOCKER_PUSH" - login: "abhishek-dubey" - password: "secure!b1YxTrhil5I5L6q+u3Ctiw==.Ix9cDbdNIKsSty7IWShSfw==" - docker_image_tag: "$BUDDY_EXECUTION_BRANCH,latest,$BUDDY_EXECUTION_TAG" - repository: "$IMAGE_NAME" - registry: "quay.io" - trigger_conditions: - - trigger_condition: "VAR_IS" - trigger_variable_value: "master" - trigger_variable_key: "BUDDY_EXECUTION_BRANCH" diff --git a/scripts/spellcheck.sh b/scripts/spellcheck.sh new file mode 100755 index 0000000..a220608 --- /dev/null +++ b/scripts/spellcheck.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +install_spellcheck() { + apt-get update -y + apt-get install -y aspell +} + +run_spellcheck() { + aspell ../README.md + aspell ../CHANGELOG.md + aspell ../DEVELOPMENT.md +} + +main() { + install_spellcheck + run_spellcheck +} + +main