Merge pull request #1050 from prymitive/openapi-client

feat(ci): rebuild openapi client code in CI and check for differences
This commit is contained in:
Łukasz Mierzwa
2019-10-18 16:21:12 +01:00
committed by GitHub
5 changed files with 22 additions and 6 deletions

View File

@@ -107,6 +107,18 @@ jobs:
<<: *DEFAULTS_JS
script: make lint-docs
- stage: Lint
name: Verify OpenAPI client code
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
language: generic
addons:
apt:
packages:
- docker-ce
script:
- travis_retry make openapi-client
- git diff --exit-code
- stage: Snapshots
name: Percy UI snapshots
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)

View File

@@ -1,11 +1,11 @@
FROM node:10.16.3-alpine as nodejs-builder
RUN apk add --update make git
RUN apk update && apk upgrade && apk add --update make git
COPY Makefile /src/Makefile
COPY ui /src/ui
RUN make -C /src ui
FROM golang:1.13.3-alpine as go-builder
RUN apk add --update make git
RUN apk update && apk upgrade && apk add --update make git
COPY Makefile /src/Makefile
COPY go.mod /src/go.mod
COPY go.sum /src/go.sum

View File

@@ -167,6 +167,10 @@ format-go: .build/deps-build-go.ok
format-js: .build/deps-build-node.ok
cd ui && ./node_modules/.bin/prettier --write 'src/**/*.js'
.PHONY: openapi-client
openapi-client:
for f in $(wildcard internal/mapper/*/Dockerfile) ; do $(MAKE) -C `dirname "$$f"` ; done
.PHONY: show-version
show-version:
@echo $(VERSION)

View File

@@ -1,11 +1,11 @@
FROM node:10.16.3-alpine as nodejs-builder
RUN apk add --update make git
RUN apk update && apk upgrade && apk add --update make git
COPY Makefile /src/Makefile
COPY ui /src/ui
RUN make -C /src ui
FROM golang:1.13.3-alpine as go-builder
RUN apk add --update make git
RUN apk update && apk upgrade && apk add --update make git
COPY Makefile /src/Makefile
COPY go.mod /src/go.mod
COPY go.sum /src/go.sum
@@ -18,7 +18,7 @@ ARG VERSION
RUN CGO_ENABLED=0 make -C /src VERSION="${VERSION:-dev}" karma
FROM alpine:3.10
RUN apk add --update supervisor python && rm -rf /tmp/* /var/cache/apk/*
RUN apk update && apk upgrade && apk add --update supervisor python && rm -rf /tmp/* /var/cache/apk/*
COPY demo/supervisord.conf /etc/supervisord.conf
COPY --from=prom/alertmanager:v0.19.0 /bin/alertmanager /alertmanager
COPY demo/alertmanager.yaml /etc/alertmanager.yaml

View File

@@ -1,6 +1,6 @@
FROM quay.io/goswagger/swagger:v0.20.1
RUN apk add --update curl
RUN apk update && apk upgrade && apk add --update curl
COPY run.sh /run.sh