Skip to content

Commit

Permalink
chore: upgrade to latest go and all deps, add image release for quay.io
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
  • Loading branch information
galexrt committed Nov 13, 2023
1 parent c085803 commit 20ac187
Show file tree
Hide file tree
Showing 14 changed files with 207 additions and 162 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@ on:
push:
tags:
- 'v*'

jobs:
build_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true

- uses: actions/setup-go@v4
with:
go-version: '^1.20'
go-version: '^1.21'

- name: Run tests
run: |
make test
make promu
make check_license
- name: Build and release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -26,11 +30,21 @@ jobs:
promu crossbuild tarballs
promu checksum .tarballs
promu release .tarballs
- name: Build and push to GHCR.io
- name: Push to GHCR.io
uses: elgohr/Publish-Docker-Github-Action@3.04
with:
name: ${{ github.repository }}
registry: ghcr.io
username: cloudical-io
username: galexrt
password: ${{ secrets.GITHUB_TOKEN }}
tag_names: true

- name: Push to Quay.io
uses: elgohr/Publish-Docker-Github-Action@3.04
with:
name: ${{ github.repository }}
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}
tag_names: true
3 changes: 3 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main

jobs:
generate-and-publish:
runs-on: ubuntu-latest
Expand All @@ -12,9 +13,11 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: false

- name: Build
run: |
mkdocs build --clean
- name: Deploy to GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true

- uses: actions/setup-go@v4
with:
go-version: '^1.20'
go-version: '^1.21'

- name: Run tests
run: |
make test
Expand Down
2 changes: 1 addition & 1 deletion .promu.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
go:
version: 1.20
version: 1.21
repository:
path: github.com/galexrt/ancientt
build:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/galexrt/container-toolbox:v20230608-123938-740
FROM ghcr.io/galexrt/container-toolbox:v20231109-123917-402

ARG BUILD_DATE="N/A"
ARG REVISION="N/A"
Expand All @@ -7,13 +7,13 @@ ARG ANCIENTT_VERSION="N/A"

LABEL org.opencontainers.image.authors="Alexander Trost <galexrt@googlemail.com>" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.title="cloudical-io/ancientt" \
org.opencontainers.image.title="galexrt/ancientt" \
org.opencontainers.image.description="A tool to automate network testing tools, like iperf3, in dynamic environments such as Kubernetes and more to come dynamic environments." \
org.opencontainers.image.documentation="https://github.com/galexrt/ancientt/blob/main/README.md" \
org.opencontainers.image.url="https://github.com/galexrt/ancientt" \
org.opencontainers.image.source="https://github.com/galexrt/ancientt" \
org.opencontainers.image.revision="${REVISION}" \
org.opencontainers.image.vendor="cloudical-io" \
org.opencontainers.image.vendor="galexrt" \
org.opencontainers.image.version="${ANCIENTT_VERSION}"

ADD .build/linux-amd64/ancientt /bin/ancientt
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ A tool to automate network testing tools, like iperf3, in dynamic environments s

Container Image available from:

* [GHCR.io](https://github.com/users/cloudical-io/packages/container/package/ancientt)
* [GHCR.io](https://github.com/users/galexrt/packages/container/package/ancientt)
* [Quay.io](https://quay.io/repository/galexrt/ancientt?tab=tags)

Container Image Tags:

Expand Down Expand Up @@ -59,7 +60,7 @@ See [Demos](docs/demos.md).

## Development

**Golang version**: `v1.20` or higher (tested with `v1.20.4` on `linux/amd64`)
**Golang version**: `v1.21` or higher (tested with `v1.21.1` on `linux/amd64`)

### Creating Release

Expand All @@ -74,9 +75,9 @@ See [Demos](docs/demos.md).

### Building

The quickest way to just get `ancientt` built is to run the following command:
The quickest way to just get `ancientt` built is to run the following command (requires `go` installed on the system):

```bash
```console
go get -u github.com/galexrt/ancientt/cmd/ancientt
```

Expand Down
2 changes: 1 addition & 1 deletion docs/config-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runner:
kubernetes:
# Assuming you are in your home directory
kubeconfig: .kube/config
image: quay.io/galexrt/container-toolbox:v20230608-123938-740
image: quay.io/galexrt/container-toolbox:v20231109-123917-402
namespace: ancientt
timeouts:
deleteTimeout: 20
Expand Down
2 changes: 1 addition & 1 deletion docs/config-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ RunnerKubernetes Kubernetes Runner config options
| ----- | ----------- | ------ | -------- | ---------- |
| inClusterConfig | If the Kubernetes client should use the in-cluster config for the cluster communication | bool | true | |
| kubeconfig | Path to your kubeconfig file, if not set the following order will be tried out, `KUBECONFIG` and `$HOME/.kube/config` | string | false | |
| image | The image used for the spawned Pods for the tests (default: `quay.io/galexrt/container-toolbox:v20230608-123938-740`) | string | false | |
| image | The image used for the spawned Pods for the tests (default: `quay.io/galexrt/container-toolbox:v20231109-123917-402`) | string | false | |
| namespace | Namespace to execute the tests in | string | true | max=63 |
| hostNetwork | If `hostNetwork` mode should be used for the test Pods | *bool | false | |
| timeouts | Timeout settings for operations against the Kubernetes API | *[KubernetesTimeouts](#kubernetestimeouts) | false | |
Expand Down
2 changes: 1 addition & 1 deletion docs/demos.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runner:
name: kubernetes
kubernetes:
kubeconfig: .kube/config
image: quay.io/galexrt/container-toolbox:v20230608-123938-740
image: quay.io/galexrt/container-toolbox:v20231109-123917-402
hosts:
ignoreSchedulingDisabled: true
tests:
Expand Down
102 changes: 55 additions & 47 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
module github.com/galexrt/ancientt

go 1.20
go 1.21

toolchain go1.21.1

require (
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/creasty/defaults v1.7.0
github.com/go-playground/validator/v10 v10.14.1
github.com/go-playground/validator/v10 v10.16.0
github.com/go-sql-driver/mysql v1.7.1
github.com/jmoiron/sqlx v1.3.5
github.com/k0kubun/pp v3.0.1+incompatible
github.com/logrusorgru/aurora v2.0.3+incompatible
github.com/mattn/go-isatty v0.0.19
github.com/mattn/go-sqlite3 v1.14.17
github.com/mattn/go-isatty v0.0.20
github.com/mattn/go-sqlite3 v1.14.18
github.com/mitchellh/go-homedir v1.1.0
github.com/prometheus/common v0.44.0
github.com/prometheus/common v0.45.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.16.0
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.17.0
github.com/stretchr/testify v1.8.4
github.com/wcharczuk/go-chart v2.0.2-0.20190910040548-3a7bc5543113+incompatible
github.com/xuri/excelize/v2 v2.7.1
github.com/xuri/excelize/v2 v2.8.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.28.0-alpha.2
k8s.io/apimachinery v0.28.0-alpha.2
k8s.io/client-go v0.28.0-alpha.2
k8s.io/api v0.28.3
k8s.io/apimachinery v0.28.3
k8s.io/client-go v0.28.3
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/blend/go-sdk v2.0.0+incompatible // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-playground/locales v0.14.1 // indirect
Expand All @@ -45,11 +47,11 @@ require (
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/imdario/mergo v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand All @@ -58,46 +60,52 @@ require (
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.15.1 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.3 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/sagikazarmark/locafero v0.3.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/xuri/efp v0.0.0-20230422071738-01f4e37c47e9 // indirect
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect
golang.org/x/crypto v0.10.0 // indirect
golang.org/x/image v0.8.0 // indirect
golang.org/x/net v0.11.0 // indirect
golang.org/x/oauth2 v0.9.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/term v0.9.0 // indirect
golang.org/x/text v0.10.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.30.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53 // indirect
github.com/xuri/nfp v0.0.0-20230919160717-d98342af3f05 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/image v0.14.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/oauth2 v0.14.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/term v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230606174411-725288a7abf1 // indirect
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961 => k8s.io/kube-openapi v0.0.0-20230606174411-725288a7abf1

replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.16
Loading

0 comments on commit 20ac187

Please sign in to comment.