forked from rancher/wrangler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rancher#270 from KevinJoiner/wrangler-ci
Wrangler CI
- Loading branch information
Showing
16 changed files
with
101 additions
and
32 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 |
---|---|---|
@@ -1,13 +1,52 @@ | ||
--- | ||
kind: pipeline | ||
type: docker | ||
name: fossa | ||
|
||
steps: | ||
- name: fossa | ||
image: rancher/drone-fossa:latest | ||
settings: | ||
api_key: | ||
from_secret: FOSSA_API_KEY | ||
when: | ||
instance: | ||
- drone-publish.rancher.io | ||
- name: fossa | ||
image: rancher/drone-fossa:latest | ||
settings: | ||
api_key: | ||
from_secret: FOSSA_API_KEY | ||
when: | ||
instance: | ||
- drone-publish.rancher.io | ||
|
||
--- | ||
kind: pipeline | ||
type: docker | ||
name: amd64 | ||
|
||
platform: | ||
os: linux | ||
arch: amd64 | ||
|
||
steps: | ||
- name: test | ||
image: registry.suse.com/bci/golang:1.19 | ||
commands: | ||
- zypper -n install tar gzip | ||
- "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.51.1;" | ||
- ./scripts/ci | ||
volumes: | ||
- name: docker | ||
path: /var/run/docker.sock | ||
|
||
--- | ||
kind: pipeline | ||
type: docker | ||
name: arm64 | ||
|
||
platform: | ||
os: linux | ||
arch: arm64 | ||
|
||
steps: | ||
- name: test | ||
image: registry.suse.com/bci/golang:1.19 | ||
commands: | ||
- ./scripts/ci | ||
volumes: | ||
- name: docker | ||
path: /var/run/docker.sock |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,30 @@ | ||
#! /bin/bash | ||
set -e | ||
|
||
cd $(dirname $0)/.. | ||
PATH=${PATH}:./bin | ||
echo "Validating" | ||
|
||
if ! command -v golangci-lint; then | ||
echo Skipping validation: no golangci-lint available | ||
else | ||
echo Running: golangci-lint | ||
golangci-lint run | ||
fi | ||
|
||
echo Running: go generate | ||
go generate ./... | ||
|
||
echo Tidying up modules | ||
go mod tidy | ||
|
||
echo Verifying modules | ||
go mod verify | ||
|
||
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then | ||
echo "Encountered dirty repo!" | ||
exit 1 | ||
fi | ||
|
||
echo "Running Test" | ||
go test ./... |