-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
version: 2.1 | ||
|
||
executors: | ||
go-build: | ||
docker: | ||
- image: quay.io/getpantheon/go-build | ||
auth: | ||
username: $QUAY_USER | ||
password: $QUAY_PASSWD | ||
|
||
commands: | ||
save-go-mod-cache: | ||
steps: | ||
- save_cache: | ||
key: v4-dependencies-{{ checksum "go.sum" }} | ||
paths: | ||
- /go/pkg/mod | ||
- /home/circleci/go/pkg/mod | ||
restore-go-mod-cache: | ||
steps: | ||
- restore_cache: | ||
keys: | ||
- v4-dependencies-{{ checksum "go.sum" }} | ||
|
||
# By default, CircleCI uses ssh, and authenticates as a user with read access to projects, but not write access. | ||
# In order for `git push` command to work, we need to have CircleCI use HTTPS with the provided oauth token | ||
# instead of ssh (the token is for pantheon-releases which has write access, but the default circle user does not) | ||
configure-https-git: | ||
steps: | ||
- run: git config --global url."https://$GITHUB_TOKEN:[email protected]/pantheon-systems/".insteadOf "[email protected]:pantheon-systems/" | ||
|
||
jobs: | ||
update-mod-cache: | ||
executor: go-build | ||
steps: | ||
- checkout | ||
- restore-go-mod-cache | ||
- run: go mod download | ||
- save-go-mod-cache | ||
# build all the code | ||
build: | ||
executor: go-build | ||
steps: | ||
- checkout | ||
- restore-go-mod-cache | ||
- run: make build | ||
# Tests the code | ||
test: | ||
executor: go-build | ||
steps: | ||
- checkout | ||
- restore-go-mod-cache | ||
- run: | ||
name: lint and test | ||
command: make test-circle | ||
# Tag for release | ||
release: | ||
executor: go-build | ||
steps: | ||
- checkout | ||
- configure-https-git | ||
- run: autotag | ||
- run: git push --tags | ||
- run: | ||
name: go releaser | ||
command: curl -sL https://git.io/goreleaser | bash -s -- --parallelism=2 | ||
|
||
workflows: | ||
version: 2 | ||
build-deploy: | ||
jobs: | ||
- update-mod-cache: | ||
context: | ||
- docker-executor-auth | ||
- sig-go-project | ||
- build: | ||
context: | ||
- docker-executor-auth | ||
- sig-go-project | ||
requires: | ||
- update-mod-cache | ||
- test: | ||
context: | ||
- docker-executor-auth | ||
- sig-go-project | ||
requires: | ||
- update-mod-cache | ||
- release: | ||
context: | ||
- docker-executor-auth | ||
- sig-go-release | ||
requires: | ||
- test | ||
filters: | ||
branches: | ||
only: | ||
- main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/pyml-validator | ||
/pyml-validator.yml | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
project_name: pyml-validator | ||
|
||
# don't compile anything | ||
builds: | ||
- skip: true # TODO: Build for releases. | ||
|
||
# configure what shows up in the changelog | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" | ||
- Merge pull request | ||
- Merge branch | ||
|
||
# make a zip of the source | ||
# https://goreleaser.com/customization/source/ | ||
source: | ||
enabled: true |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Code owners. See: | ||
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners | ||
|
||
* @pantheon-systems/cms-platform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
APP := pyml-validator | ||
|
||
include devops/make/common.mk | ||
include devops/make/common-kube.mk | ||
include devops/make/common-go.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
package main | ||
|
||
func main() {} |