Remove Travis CI (#2005)

This change moves the continuous integration to Circle CI only as
maintaining 2 systems has a cost.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
Simon Pasquier 2019-08-26 11:15:28 +02:00 committed by GitHub
parent c92047250f
commit b11dc2ebc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 24 deletions

View File

@ -3,8 +3,39 @@ version: 2.1
orbs:
prometheus: prometheus/prometheus@0.1.0
go: circleci/go@0.2.0
jobs:
test_frontend:
# We need to use a machine executor because the front-end validation runs
# containers with mounted volumes which isn't supported with the docker
# executor (even with setup_remote_docker).
machine: true
steps:
- checkout
- run: sudo service docker restart
- run:
name: Remove existing Go installation
command: sudo rm -rf /usr/local/go
# Whenever the Go version is updated here, .travis.yml and .promu.yml
# should also be updated.
- go/install:
version: "1.12.9"
- run:
name: Remove generated code
command: make clean
- run:
name: Generate front-end code
command: make all
working_directory: ~/project/ui/app
- run:
name: Generate assets
command: make assets
- run:
name: Generate API v2 code
command: make apiv2
- run: git diff --exit-code
test:
docker:
# Whenever the Go version is updated here, .travis.yml and .promu.yml
@ -59,10 +90,15 @@ jobs:
- prometheus/store_artifact:
file: amtool
workflows:
version: 2
alertmanager:
jobs:
- test_frontend:
filters:
tags:
only: /.*/
- test:
filters:
tags:
@ -75,6 +111,7 @@ workflows:
- prometheus/publish_master:
context: org-context
requires:
- test_frontend
- test
- build
filters:

View File

@ -1,21 +0,0 @@
sudo: false
language: go
go_import_path: github.com/prometheus/alertmanager
services:
- docker
# Whenever the Go version is updated here, .circleci/config.yml and .promu.yml
# should also be updated.
go:
- 1.12.x
script:
# test front-end
- make clean
- cd ui/app/ && make && cd ../..
- make assets apiv2
- git diff --exit-code
# test back-end
- make
- git diff --exit-code

View File

@ -25,8 +25,11 @@ STATICCHECK_IGNORE =
# Will build both the front-end as well as the back-end
build-all: assets apiv2 build
assets: ui/app/script.js ui/app/index.html ui/app/lib template/default.tmpl
GO111MODULE=$(GO111MODULE) $(GO) generate ./asset
.PHONY: assets
assets: asset/assets_vfsdata.go
asset/assets_vfsdata.go: ui/app/script.js ui/app/index.html ui/app/lib template/default.tmpl
GO111MODULE=$(GO111MODULE) $(GO) generate $(GOOPTS) ./asset
@$(GOFMT) -w ./asset
ui/app/script.js: $(shell find ui/app/src -iname *.elm) api/v2/openapi.yaml

View File

@ -15,7 +15,7 @@
package asset
import (
// The blank import is to make govendor happy.
// The blank import is to make go modules happy.
_ "github.com/shurcooL/vfsgen"
)