Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*): format .conform.yaml #71

Merged
merged 1 commit into from
Oct 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 46 additions & 52 deletions .conform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,29 @@ metadata:
binaryPath: /conform
gitRepository: github.com/autonomy/conform
maintainer: Andrew Rynhard <[email protected]>

policies:
- type: conventionalCommit
spec:
types:
- "chore"
- "docs"
- "perf"
- "refactor"
- "style"
- "test"
scopes:
- "ci"
- "cli"
- "docker"
- "fmt"
- "git"
- "metadata"
- "pipeline"
- "policy"
- "readme"
- "renderer"
- "service"
- "*"

- type: conventionalCommit
spec:
types:
- chore
- docs
- perf
- refactor
- style
- test
scopes:
- ci
- cli
- docker
- fmt
- git
- metadata
- pipeline
- policy
- readme
- renderer
- service
- '*'
script:
template: |
#!/bin/bash
Expand Down Expand Up @@ -69,28 +67,25 @@ script:
docker push {{ .Repository }}:{{ .Version.Major }}.{{ .Version.Minor }}.{{ .Version.Patch }}
fi
fi

pipeline:
stages:
- src
- test
- build

- src
- test
- build
stages:
build:
tasks:
- binary
- image
src:
tasks:
- src
- src
test:
artifacts:
- source: /src/github.com/autonomy/conform/coverage.txt
destination: coverage.txt
- source: /src/github.com/autonomy/conform/coverage.txt
destination: coverage.txt
tasks:
- test
build:
tasks:
- binary
- image

- test
tasks:
binary:
template: |
Expand All @@ -102,14 +97,13 @@ tasks:
{{ else }}
RUN go build -o {{ index .Variables "binaryPath" }}
{{ end }}
test:
image:
template: |
FROM autonomy/conform:src AS {{ .Docker.CurrentStage }}
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.10.1
RUN chmod +x ./hack/test.sh
RUN ./hack/test.sh --lint ./hack/golangci-lint.yaml
RUN ./hack/test.sh --unit
RUN ./hack/test.sh --coverage
FROM alpine:3.8 AS {{ .Docker.CurrentStage }}
LABEL maintainer="{{ index .Variables "maintainer" }}"
RUN apk --no-cache add bash
COPY --from=binary {{ index .Variables "binaryPath" }} /bin
ENTRYPOINT ["conform"]
src:
template: |
FROM golang:1.11.1 AS {{ .Docker.CurrentStage }}
Expand All @@ -119,11 +113,11 @@ tasks:
COPY ./ ./
RUN go mod download
RUN go mod verify

image:
test:
template: |
FROM alpine:3.8 AS {{ .Docker.CurrentStage }}
LABEL maintainer="{{ index .Variables "maintainer" }}"
RUN apk --no-cache add bash
COPY --from=binary {{ index .Variables "binaryPath" }} /bin
ENTRYPOINT ["conform"]
FROM autonomy/conform:src AS {{ .Docker.CurrentStage }}
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.10.1
RUN chmod +x ./hack/test.sh
RUN ./hack/test.sh --lint ./hack/golangci-lint.yaml
RUN ./hack/test.sh --unit
RUN ./hack/test.sh --coverage