Skip to content

Commit

Permalink
Cleanup things and test the build (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
sudermanjr committed Sep 5, 2023
1 parent bd504cd commit 3e2de5d
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 946 deletions.
28 changes: 14 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
version: 2.1

orbs:
rok8s: fairwinds/rok8s-scripts@11
rok8s: fairwinds/rok8s-scripts@12
oss-docs: fairwinds/oss-docs@0

references:
Expand All @@ -24,9 +24,9 @@ references:
workspace-location: /
pre_script: end_to_end_testing/pre_go.sh
script: end_to_end_testing/run_go.sh
command_runner_image: quay.io/reactiveops/ci-images:v11-buster
command_runner_image: quay.io/reactiveops/ci-images:v12-buster
enable_docker_layer_caching: false
store-test-results: /tmp/test-results
store-test-results: /tmp/test-results/
requires:
- test
- snapshot
Expand All @@ -41,21 +41,21 @@ references:
command: |
apk --update add curl yq
cd /tmp
curl -LO https://releases.hashicorp.com/vault/1.9.4/vault_1.9.4_linux_amd64.zip
unzip vault_1.9.4_linux_amd64.zip
curl -LO https://releases.hashicorp.com/vault/1.14.2/vault_1.14.2_linux_amd64.zip
unzip vault_1.14.2_linux_amd64.zip
mv vault /usr/bin/vault
jobs:
test:
working_directory: /home/circleci/go/src/github.com/fairwindsops/reckoner
docker:
- image: cimg/go:1.18
- image: cimg/go:1.20
steps:
- checkout
- run: make test
snapshot:
working_directory: /go/src/github.com/fairwindsops/reckoner
docker:
- image: goreleaser/goreleaser:v1.10.3
- image: goreleaser/goreleaser:v1.20.0
steps:
- checkout
- setup_remote_docker
Expand All @@ -74,7 +74,7 @@ jobs:
resource_class: large
shell: /bin/bash
docker:
- image: goreleaser/goreleaser:v1.10.3
- image: goreleaser/goreleaser:v1.20.0
steps:
- checkout
- setup_remote_docker
Expand Down Expand Up @@ -108,16 +108,16 @@ workflows:
branches:
only: /.*/
- rok8s/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.20.2"
kind_node_image: "kindest/node:v1.20.2@sha256:15d3b5c4f521a84896ed1ead1b14e4774d02202d5c65ab68f30eeaf310a3b1a7"
name: "End-To-End Kubernetes 1.25"
kind_node_image: "kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1"
<<: *e2e_configuration
- rok8s/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.21.1"
kind_node_image: "kindest/node:v1.21.2@sha256:9d07ff05e4afefbba983fac311807b3c17a5f36e7061f6cb7e2ba756255b2be4"
name: "End-To-End Kubernetes 1.26"
kind_node_image: "kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb"
<<: *e2e_configuration
- rok8s/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.22.0"
kind_node_image: "kindest/node:v1.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047"
name: "End-To-End Kubernetes 1.27"
kind_node_image: "kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72"
<<: *e2e_configuration
release:
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ govet-report.out
/bin
/build
/dist
/reckoner-go
/reckoner
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GOCMD=GO111MODULE=on go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
BINARY_NAME=reckoner-go
BINARY_NAME=reckoner
COMMIT := $(shell git rev-parse HEAD)
VERSION := "0.0.0"

Expand Down
32 changes: 0 additions & 32 deletions docs/changelog_details/schema_validation.md

This file was deleted.

2 changes: 1 addition & 1 deletion end_to_end_testing/course_files/25_test_import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ charts:
import-test:
repository: fairwinds-incubator
chart: basic-demo
version: 0.4.3
version: 1.0.0
values:
expect-value: 1.05
expect-bool-value: false
10 changes: 5 additions & 5 deletions end_to_end_testing/run_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ set -x
set -e

# Install Go
curl -LO https://go.dev/dl/go1.18.5.linux-amd64.tar.gz
curl -LO https://go.dev/dl/go1.20.7.linux-amd64.tar.gz

tar -C /usr/local -xzf go1.18.5.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.20.7.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version

# build
cd /reckoner
make build

mv /reckoner/reckoner-go /usr/local/bin/reckoner
mv /reckoner/reckoner /usr/local/bin/reckoner
reckoner version

curl -LO https://github.com/ovh/venom/releases/download/v0.28.0/venom.linux-amd64
curl -LO https://github.com/ovh/venom/releases/download/v1.1.0/venom.linux-amd64
mv venom.linux-amd64 /usr/local/bin/venom
chmod +x /usr/local/bin/venom

Expand All @@ -26,5 +26,5 @@ mkdir -p /tmp/test-results
cd /reckoner/end_to_end_testing

# The parallelization number must remain relatively low otherwise the tests become flaky due to resources and pending pods and such
venom run tests/* --log debug --output-dir=/tmp/test-results --parallel=2 --strict
venom run tests/* --output-dir=/tmp/test-results
exit $?
2 changes: 1 addition & 1 deletion end_to_end_testing/tests/25_import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ testcases:
assertions:
- "result.code ShouldEqual 0"
- 'result.systemout ShouldContainSubstring "namespace: {{.namespace}}"'
- 'result.systemout ShouldContainSubstring "version: 0.4.3"'
- 'result.systemout ShouldContainSubstring "version: 1.0.0"'
- 'result.systemout ShouldContainSubstring "chart: basic-demo"'
- 'result.systemout ShouldContainSubstring "name: {{.release}}"'
- 'result.systemout ShouldContainSubstring "expect-value: 1.05"'
Expand Down
2 changes: 1 addition & 1 deletion end_to_end_testing/tests/26_shell_executor_secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ testcases:
- name: 26 - cleanup
steps:
- script: |
helm -n {{.namespace}} delete
helm -n {{.namespace}} delete {{.release}}
kubectl delete ns {{.namespace}}
12 changes: 1 addition & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/fairwindsops/reckoner

go 1.18
go 1.20

require (
github.com/Masterminds/semver/v3 v3.2.0
Expand All @@ -27,14 +27,6 @@ require (
)

require (
cloud.google.com/go/compute v1.14.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.28 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/acomagu/bufpipe v1.0.4 // indirect
Expand All @@ -49,7 +41,6 @@ require (
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-cmp v0.5.9 // indirect
Expand All @@ -64,7 +55,6 @@ require (
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
Expand Down
Loading

0 comments on commit 3e2de5d

Please sign in to comment.