From eb34898237e6c77c87de40ab9acf4546dd8b31b8 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Sat, 13 Jul 2024 19:22:22 +0200 Subject: [PATCH 01/20] Replace deprecated MAINTAINER with LABEL in Dockerfiles (#949) * Replace deprecated MAINTAINER with LABEL in Dockerfiles * fix md5sums --- integration-tests/Dockerfile_alpine3 | 2 +- integration-tests/Dockerfile_alpine3.md5 | 2 +- integration-tests/Dockerfile_centos7 | 2 +- integration-tests/Dockerfile_centos7.md5 | 2 +- integration-tests/Dockerfile_trusty | 2 +- integration-tests/Dockerfile_trusty.md5 | 2 +- integration-tests/Dockerfile_wheezy | 2 +- integration-tests/Dockerfile_wheezy.md5 | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/integration-tests/Dockerfile_alpine3 b/integration-tests/Dockerfile_alpine3 index c573021ee..dd5486743 100644 --- a/integration-tests/Dockerfile_alpine3 +++ b/integration-tests/Dockerfile_alpine3 @@ -1,5 +1,5 @@ FROM alpine:3.19 -MAINTAINER Ahmed +LABEL org.opencontainers.image.authors="Ahmed" # install apache2 and remove un-needed services RUN apk update && \ diff --git a/integration-tests/Dockerfile_alpine3.md5 b/integration-tests/Dockerfile_alpine3.md5 index f4bdce743..5500581e1 100644 --- a/integration-tests/Dockerfile_alpine3.md5 +++ b/integration-tests/Dockerfile_alpine3.md5 @@ -1 +1 @@ -f9c8c187e94693c4625a8c8d01fae3bf Dockerfile_alpine3 +3c4e7fbf89cd2edfeae94728e247213d Dockerfile_alpine3 diff --git a/integration-tests/Dockerfile_centos7 b/integration-tests/Dockerfile_centos7 index 39c22aeef..18b30e874 100644 --- a/integration-tests/Dockerfile_centos7 +++ b/integration-tests/Dockerfile_centos7 @@ -1,5 +1,5 @@ FROM centos:7.2.1511 -MAINTAINER Ahmed +LABEL org.opencontainers.image.authors="Ahmed" ENV container docker RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ diff --git a/integration-tests/Dockerfile_centos7.md5 b/integration-tests/Dockerfile_centos7.md5 index 43a835cb5..f158ee573 100644 --- a/integration-tests/Dockerfile_centos7.md5 +++ b/integration-tests/Dockerfile_centos7.md5 @@ -1 +1 @@ -1f7064dbc55b5c3e1fbb23f2e6457a13 Dockerfile_centos7 +148b069bc0a023068cbcdfe8b24fe036 Dockerfile_centos7 diff --git a/integration-tests/Dockerfile_trusty b/integration-tests/Dockerfile_trusty index 04e0f8235..74ce18d4f 100644 --- a/integration-tests/Dockerfile_trusty +++ b/integration-tests/Dockerfile_trusty @@ -1,5 +1,5 @@ FROM ubuntu-upstart:trusty -MAINTAINER Ahmed +LABEL org.opencontainers.image.authors="Ahmed" RUN apt-get update && \ apt-get install -y apache2=2.4.7-1ubuntu4.22 tinyproxy && \ diff --git a/integration-tests/Dockerfile_trusty.md5 b/integration-tests/Dockerfile_trusty.md5 index 5a2c288f6..73eb85c15 100644 --- a/integration-tests/Dockerfile_trusty.md5 +++ b/integration-tests/Dockerfile_trusty.md5 @@ -1 +1 @@ -ac8c8df3415c0eecdbedc322480e696e Dockerfile_trusty +9db0e607ec52f1fd1290785721733180 Dockerfile_trusty diff --git a/integration-tests/Dockerfile_wheezy b/integration-tests/Dockerfile_wheezy index 9992d09b9..9c83d08c3 100644 --- a/integration-tests/Dockerfile_wheezy +++ b/integration-tests/Dockerfile_wheezy @@ -1,5 +1,5 @@ FROM debian:wheezy -MAINTAINER Ahmed +LABEL org.opencontainers.image.authors="Ahmed" RUN echo 'deb http://archive.debian.org/debian wheezy main' > /etc/apt/sources.list RUN echo 'deb http://archive.debian.org/debian-security wheezy/updates main' >> /etc/apt/sources.list diff --git a/integration-tests/Dockerfile_wheezy.md5 b/integration-tests/Dockerfile_wheezy.md5 index 0121d5cf2..84e9e5dd6 100644 --- a/integration-tests/Dockerfile_wheezy.md5 +++ b/integration-tests/Dockerfile_wheezy.md5 @@ -1 +1 @@ -485a260105b0f1da058fa4af863e2ecc Dockerfile_wheezy +557a19e04e66f0a9afb6035952b5ca18 Dockerfile_wheezy From db068fe3669376c4b977532b741bbacf5be85cc2 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Sat, 13 Jul 2024 19:44:13 +0200 Subject: [PATCH 02/20] Add labels to container images in build_images.sh (#948) --- development/build_images.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/development/build_images.sh b/development/build_images.sh index fd5bb0299..9238294be 100755 --- a/development/build_images.sh +++ b/development/build_images.sh @@ -5,9 +5,21 @@ set -xeu SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" INTEGRATION_TEST_DIR="$SCRIPT_DIR/../integration-tests/" +LABEL_DATE=$(date -u +'%Y-%m-%dT%H:%M:%S.%3NZ') +LABEL_URL="https://github.com/goss-org/goss" +LABEL_REVISION=$(git rev-parse HEAD) for docker_file in $INTEGRATION_TEST_DIR/Dockerfile_*; do [[ $docker_file == *.md5 ]] && continue os=$(cut -d '_' -f2 <<<"$docker_file") - docker build -t "aelsabbahy/goss_${os}:latest" - < "$docker_file" + docker build \ + --label "org.opencontainers.image.created=$LABEL_DATE" \ + --label "org.opencontainers.image.description=Quick and Easy server testing/validation" \ + --label "org.opencontainers.image.licenses=Apache-2.0" \ + --label "org.opencontainers.image.revision=$LABEL_REVISION" \ + --label "org.opencontainers.image.source=$LABEL_URL" \ + --label "org.opencontainers.image.title=goss" \ + --label "org.opencontainers.image.url=$LABEL_URL" \ + --label "org.opencontainers.image.version=manual" \ + -t "aelsabbahy/goss_${os}:latest" - < "$docker_file" done From 364b0d3485681d0dd903a1cd6a4d7e642858b868 Mon Sep 17 00:00:00 2001 From: Ilya Kheifets <138466237+ikheifets-splunk@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:04:41 +0200 Subject: [PATCH 03/20] go: bump version on 1.22 (#953) Signed-off-by: Ilya Kheifets --- .travis.yml | 2 +- Dockerfile | 2 +- go.mod | 39 ++++++++++++++++++++------------------- go.sum | 38 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index f18455cba..f6cbb8033 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: go go: - - 1.21.x + - 1.22.x os: - osx diff --git a/Dockerfile b/Dockerfile index 93a143a3d..73e4f50d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.21 +ARG GO_VERSION=1.22 FROM docker.io/golang:${GO_VERSION}-alpine AS base diff --git a/go.mod b/go.mod index 959bbba8f..7e88ac01f 100644 --- a/go.mod +++ b/go.mod @@ -1,25 +1,25 @@ module github.com/goss-org/goss -go 1.21 +go 1.22 require ( github.com/Masterminds/sprig/v3 v3.2.3 github.com/achanda/go-sysctl v0.0.0-20160222034550-6be7678c45d2 github.com/blang/semver/v4 v4.0.0 github.com/cheekybits/genny v1.0.0 - github.com/fatih/color v1.16.0 + github.com/fatih/color v1.17.0 github.com/goss-org/GOnetstat v0.0.0-20230101144325-22be0bd9e64d github.com/goss-org/go-ps v0.0.0-20230609005227-7b318e6a56e5 github.com/hashicorp/logutils v1.0.0 - github.com/miekg/dns v1.1.58 + github.com/miekg/dns v1.1.61 github.com/moby/sys/mountinfo v0.7.1 github.com/oleiade/reflections v1.0.1 github.com/onsi/gomega v1.33.1 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pmezard/go-difflib v1.0.0 - github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/common v0.50.0 - github.com/samber/lo v1.39.0 + github.com/prometheus/client_golang v1.19.1 + github.com/prometheus/common v0.55.0 + github.com/samber/lo v1.46.0 github.com/stretchr/testify v1.9.0 github.com/tidwall/gjson v1.17.1 github.com/urfave/cli v1.22.14 @@ -31,31 +31,32 @@ require ( github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/huandu/xstrings v1.4.0 // indirect + github.com/huandu/xstrings v1.5.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/shopspring/decimal v1.3.1 // indirect + github.com/shopspring/decimal v1.4.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.25.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/exp v0.0.0-20240716160929-1d5bc16f04a8 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/net v0.27.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - golang.org/x/tools v0.20.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/tools v0.23.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/go.sum b/go.sum index 6f024b4cc..ace20f754 100644 --- a/go.sum +++ b/go.sum @@ -14,6 +14,8 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -24,6 +26,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= @@ -46,6 +50,8 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= +github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= @@ -60,6 +66,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= +github.com/miekg/dns v1.1.61 h1:nLxbwF3XxhwVSm8g9Dghm9MHPaUZuqhPiGL+675ZmEs= +github.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eykwQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= @@ -68,6 +76,8 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.7.1 h1:/tTvQaSJRr2FshkhXiIpux6fQ2Zvc4j7tAhMTStAG2g= github.com/moby/sys/mountinfo v0.7.1/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/oleiade/reflections v1.0.1 h1:D1XO3LVEYroYskEsoSiGItp9RUxG6jWnCVvrqH0HHQM= github.com/oleiade/reflections v1.0.1/go.mod h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60= github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= @@ -80,21 +90,33 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA= github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= +github.com/samber/lo v1.46.0 h1:w8G+oaCPgz1PoCJztqymCFaKwXt+5cCXn51uPxExFfQ= +github.com/samber/lo v1.46.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= @@ -124,17 +146,25 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240716160929-1d5bc16f04a8 h1:Z+vTUQyBb738QmIhbJx3z4htsxDeI+rd0EHvNm8jHkg= +golang.org/x/exp v0.0.0-20240716160929-1d5bc16f04a8/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= @@ -149,6 +179,8 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= @@ -158,14 +190,20 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From 6ef233dca2b9b2cf8805a3d8885589528dddb6ba Mon Sep 17 00:00:00 2001 From: Ahmed Elsabbahy Date: Thu, 18 Jul 2024 12:08:10 -0700 Subject: [PATCH 04/20] Fixed: the user-agent test on release builds (#955) The user-agent test assumed goss will always have v0.0.0, this is not the case in a release build. --- integration-tests/goss/goss-shared.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/goss/goss-shared.yaml b/integration-tests/goss/goss-shared.yaml index 220ec4e8c..b3dc4a01a 100644 --- a/integration-tests/goss/goss-shared.yaml +++ b/integration-tests/goss/goss-shared.yaml @@ -206,7 +206,7 @@ http: headers: ["Content-Type: application/json"] body: - '"Foo": "bar"' - - '"User-Agent": "goss/0.0.0"' + - '/"User-Agent": "goss/[0-9]+.[0-9]+.[0-9]+"/' http://httpbin/headers?host: status: 200 timeout: 60000 From aed56336c3e8ff683e9540065b502f423dd6760d Mon Sep 17 00:00:00 2001 From: Ahmed Elsabbahy Date: Fri, 19 Jul 2024 08:19:56 -0700 Subject: [PATCH 05/20] Fix test file for release (#956) --- integration-tests/goss/goss-shared.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/goss/goss-shared.yaml b/integration-tests/goss/goss-shared.yaml index b3dc4a01a..42e8a5e75 100644 --- a/integration-tests/goss/goss-shared.yaml +++ b/integration-tests/goss/goss-shared.yaml @@ -206,7 +206,7 @@ http: headers: ["Content-Type: application/json"] body: - '"Foo": "bar"' - - '/"User-Agent": "goss/[0-9]+.[0-9]+.[0-9]+"/' + - '/"User-Agent": "goss/v?[0-9]+.[0-9]+.[0-9]+"/' http://httpbin/headers?host: status: 200 timeout: 60000 From 5cb881b8513f9c452b2ba0735b1e397398721629 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:07:39 +0200 Subject: [PATCH 06/20] ci: add integration tests for windows and macOS (#950) --- .github/workflows/golangci.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/golangci.yaml b/.github/workflows/golangci.yaml index c04a58a99..b6ddfd13b 100644 --- a/.github/workflows/golangci.yaml +++ b/.github/workflows/golangci.yaml @@ -41,10 +41,14 @@ jobs: - name: Unit tests and coverage run: make cov - integartion-test: + integration-test: needs: [coverage] name: Integration tests - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 @@ -52,4 +56,12 @@ jobs: go-version-file: go.mod - name: Integration tests - run: make test-int-all + shell: bash + run: | + os_name="$(go env GOOS)" + if [[ "${os_name}" == "darwin" || "${os_name}" == "windows" ]]; then + make "test-int-${os_name}-all" + else + # linux runs all tests; + make test-int-all + fi From 1215fceea6c4dd426cdb612777c3567033446788 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Thu, 1 Aug 2024 22:08:39 +0200 Subject: [PATCH 07/20] fix(ci): rework get latest tag for build Docker image (#954) * fix getting tag when building container * add debug informations * fix debug output --- .github/workflows/docker-goss.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-goss.yaml b/.github/workflows/docker-goss.yaml index 78e07bdcd..5516a6119 100644 --- a/.github/workflows/docker-goss.yaml +++ b/.github/workflows/docker-goss.yaml @@ -45,13 +45,25 @@ jobs: ghcr.io/${{ github.repository_owner }}/goss - name: Get latest git tag - uses: actions-ecosystem/action-get-latest-tag@v1 + if: github.ref_name == 'master' id: get-latest-tag + run: | + # source: https://github.com/actions-ecosystem/action-get-latest-tag/blob/main/entrypoint.sh + set -e + git config --global --add safe.directory /github/workspace + git fetch --tags --force + # This suppress an error occurred when the repository is a complete one. + git fetch --prune --unshallow 2>/dev/null || true + latest_tag=$(git describe --abbrev=0 --tags || true) + echo "tag=${latest_tag}" >> "$GITHUB_OUTPUT" + echo "Latest tag: $latest_tag" - name: Set short git commit SHA + if: github.ref_name == 'master' run: | calculatedSha=$(git rev-parse --short ${{ github.sha }}) echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV + echo "COMMIT_SHORT_SHA: $calculatedSha" - name: Get the current version of Go from project. run: echo "GO_VERSION_FROM_PROJECT=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV From 61f7ff9927ab0a46b84239b117bf3fe3cfc89549 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Sat, 10 Aug 2024 22:55:17 +0200 Subject: [PATCH 08/20] docs: fix links to documentation (https://goss.readthedocs.io) and bump version examples (#958) * docs: bump version in setup example * docs: bump version in setup examples * docs: fix links to documentation --- README.md | 12 ++++++------ extras/dgoss/README.md | 4 ++-- extras/kgoss/README.md | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cc5d40434..fe18d0fc8 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ This will install goss and [dgoss](https://github.com/goss-org/goss/tree/master/ # Install latest version to /usr/local/bin curl -fsSL https://goss.rocks/install | sh -# Install v0.3.16 version to ~/bin -curl -fsSL https://goss.rocks/install | GOSS_VER=v0.3.16 GOSS_DST=~/bin sh +# Install v0.4.8 version to ~/bin +curl -fsSL https://goss.rocks/install | GOSS_VER=v0.4.8 GOSS_DST=~/bin sh ``` @@ -73,12 +73,12 @@ chmod +rx /usr/local/bin/dgoss ```bash # See https://github.com/goss-org/goss/releases for release versions -VERSION=v0.3.10 +VERSION=v0.4.8 curl -L "https://github.com/goss-org/goss/releases/download/${VERSION}/goss-linux-amd64" -o /usr/local/bin/goss chmod +rx /usr/local/bin/goss # (optional) dgoss docker wrapper (use 'master' for latest version) -VERSION=v0.3.10 +VERSION=v0.4.8 curl -L "https://github.com/goss-org/goss/releases/download/${VERSION}/dgoss" -o /usr/local/bin/dgoss chmod +rx /usr/local/bin/dgoss ``` @@ -93,11 +93,11 @@ make build ## Full Documentation -[Full Documentation](https://github.com/goss-org/goss/blob/e73553f9c3065ac297499dafb4f8abef6acb24ad/docs/manual.md) +[Full Documentation](https://goss.readthedocs.io/en/stable/) ## Using the container image -[Using the Goss container image](docs/container_image.md) +[Using the Goss container image](https://goss.readthedocs.io/en/stable/container_image/) ## Quick start diff --git a/extras/dgoss/README.md b/extras/dgoss/README.md index ebe7fd3fd..8dd1d827d 100644 --- a/extras/dgoss/README.md +++ b/extras/dgoss/README.md @@ -25,8 +25,8 @@ Since goss runs on the target container, dgoss can be used on a Mac OSX system b curl -L https://raw.githubusercontent.com/goss-org/goss/master/extras/dgoss/dgoss -o /usr/local/bin/dgoss chmod +rx /usr/local/bin/dgoss -# Download desired goss version to your preferred location (e.g. v0.3.6) -curl -L https://github.com/goss-org/goss/releases/download/v0.3.6/goss-linux-amd64 -o ~/Downloads/goss-linux-amd64 +# Download desired goss version to your preferred location (e.g. v0.4.8) +curl -L https://github.com/goss-org/goss/releases/download/v0.4.8/goss-linux-amd64 -o ~/Downloads/goss-linux-amd64 # Set your GOSS_PATH to the above location export GOSS_PATH=~/Downloads/goss-linux-amd64 diff --git a/extras/kgoss/README.md b/extras/kgoss/README.md index eb9f14d47..09e8f776f 100644 --- a/extras/kgoss/README.md +++ b/extras/kgoss/README.md @@ -59,7 +59,7 @@ chmod a+rx "${dest_dir}/kgoss" ## install goss if [[ ! $(which jq) ]]; then echo "jq is required, get from https://stedolan.github.io/jq"; fi -version=v0.3.8 +version=v0.4.8 arch=amd64 host=github.com # for private repos, leave `host` blank or same as above: From 5cdd0f953dcd36c6499c83c5aaf50ca0c320511c Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Sat, 10 Aug 2024 22:58:09 +0200 Subject: [PATCH 09/20] ci: bump httpd in rockylinux9 (#961) --- integration-tests/goss/rockylinux9/goss-aa-expected.yaml | 2 +- integration-tests/goss/rockylinux9/goss-expected.yaml | 2 +- integration-tests/goss/vars.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/integration-tests/goss/rockylinux9/goss-aa-expected.yaml b/integration-tests/goss/rockylinux9/goss-aa-expected.yaml index 7fd1552f4..38c05599c 100644 --- a/integration-tests/goss/rockylinux9/goss-aa-expected.yaml +++ b/integration-tests/goss/rockylinux9/goss-aa-expected.yaml @@ -2,7 +2,7 @@ package: httpd: installed: true versions: - - 2.4.57-8.el9 + - 2.4.57-11.el9_4 port: tcp:80: listening: true diff --git a/integration-tests/goss/rockylinux9/goss-expected.yaml b/integration-tests/goss/rockylinux9/goss-expected.yaml index bbd4249ea..9a1bacb13 100644 --- a/integration-tests/goss/rockylinux9/goss-expected.yaml +++ b/integration-tests/goss/rockylinux9/goss-expected.yaml @@ -15,7 +15,7 @@ package: httpd: installed: true versions: - - 2.4.57-8.el9 + - 2.4.57-11.el9_4 vim-tiny: installed: false addr: diff --git a/integration-tests/goss/vars.yaml b/integration-tests/goss/vars.yaml index 0cc72dbab..23b0c3b05 100644 --- a/integration-tests/goss/vars.yaml +++ b/integration-tests/goss/vars.yaml @@ -16,7 +16,7 @@ centos7: rockylinux9: proxy: http://127.0.0.1:8888 packages: - httpd: "2.4.57-8.el9" + httpd: "2.4.57-11.el9_4" services: httpd: [] trusty: From 191fe3229e1de36ca8f72f5b96fb9c0809790c43 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Thu, 15 Aug 2024 22:16:34 +0200 Subject: [PATCH 10/20] Build own docker images for integration tests (#901) * Build own docker images and upload to ghcr * update md5 sum for dockerfiles * minor text updates * Remove outdated lines from Dockerfile_arch * generate the list of dockerfiles dynamically * update wheezy checksum * fix line endings * disable automatic builds * bump httpd version for rockylinux --- .../workflows/docker-integration-tests.yaml | 80 +++++++++++++++++++ integration-tests/Dockerfile_arch | 3 +- integration-tests/Dockerfile_arch.md5 | 2 +- integration-tests/Dockerfile_wheezy | 4 +- integration-tests/Dockerfile_wheezy.md5 | 2 +- .../goss/rockylinux9/goss-aa-expected.yaml | 2 +- .../goss/rockylinux9/goss-expected.yaml | 2 +- integration-tests/goss/vars.yaml | 2 +- 8 files changed, 89 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/docker-integration-tests.yaml diff --git a/.github/workflows/docker-integration-tests.yaml b/.github/workflows/docker-integration-tests.yaml new file mode 100644 index 000000000..e091866dc --- /dev/null +++ b/.github/workflows/docker-integration-tests.yaml @@ -0,0 +1,80 @@ +name: Docker images for integration tests + +on: +# push: +# branches: +# - master + workflow_dispatch: + +env: + PLATFORMS: "linux/amd64" + +jobs: + list-dockerfiles: + name: Create list of existing dockerfiles + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Get file list + id: set-matrix + run: | + # lists all Dockerfile_* and ignore (grep) files with extension (e.g. *.md5) + # tranforms the file list in JSON array (StackOverflow#10234327) + # converts the list into objects of dockerfile and image name + ls integration-tests/Dockerfile_* | + grep -Ev "\..{0,3}$" | + jq -R -s 'split("\n")[:-1]' | + jq '. | map({dockerfile: ., image: sub(".*_"; "")})' > filelist.json + echo "matrix=$(jq -c . filelist.json)" >> "$GITHUB_OUTPUT" + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + docker: + needs: [list-dockerfiles] + name: Build and push Docker image + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: ${{ fromJson(needs.list-dockerfiles.outputs.matrix) }} + permissions: + packages: write + contents: read + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} + + - name: Build and push tag + uses: docker/build-push-action@v5 + with: + context: . + file: ${{ matrix.dockerfile }} + push: true + tags: | + ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}:latest + labels: ${{ steps.meta.outputs.labels }} + platforms: ${{ env.PLATFORMS }} diff --git a/integration-tests/Dockerfile_arch b/integration-tests/Dockerfile_arch index 678333459..0f0627cd6 100644 --- a/integration-tests/Dockerfile_arch +++ b/integration-tests/Dockerfile_arch @@ -1,7 +1,6 @@ -FROM base/archlinux +FROM archlinux:base MAINTAINER @siddharthist -RUN pacman -Sy --noconfirm systemd-sysvcompat RUN ln -s /does_not_exist /foo && \ chmod 700 ~root RUN mkfifo /pipe diff --git a/integration-tests/Dockerfile_arch.md5 b/integration-tests/Dockerfile_arch.md5 index 368bc9e84..aa80cc1d1 100644 --- a/integration-tests/Dockerfile_arch.md5 +++ b/integration-tests/Dockerfile_arch.md5 @@ -1 +1 @@ -7743af2cd089e92858eca1715db25949 Dockerfile_arch +8fc3ce0c000f89ab09488cccb3ba8e66 Dockerfile_arch diff --git a/integration-tests/Dockerfile_wheezy b/integration-tests/Dockerfile_wheezy index 9c83d08c3..f3c76e36c 100644 --- a/integration-tests/Dockerfile_wheezy +++ b/integration-tests/Dockerfile_wheezy @@ -4,7 +4,9 @@ LABEL org.opencontainers.image.authors="Ahmed" RUN echo 'deb http://archive.debian.org/debian wheezy main' > /etc/apt/sources.list RUN echo 'deb http://archive.debian.org/debian-security wheezy/updates main' >> /etc/apt/sources.list -RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y apache2 apache2-doc apache2-utils chkconfig vim-tiny ca-certificates tinyproxy && apt-get remove -y vim-tiny && apt-get clean +RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install --yes --force-yes \ + apache2 apache2-doc apache2-utils chkconfig vim-tiny ca-certificates tinyproxy && \ + apt-get remove -y vim-tiny && apt-get clean RUN chkconfig apache2 on RUN chkconfig tinyproxy on diff --git a/integration-tests/Dockerfile_wheezy.md5 b/integration-tests/Dockerfile_wheezy.md5 index 84e9e5dd6..fd678787c 100644 --- a/integration-tests/Dockerfile_wheezy.md5 +++ b/integration-tests/Dockerfile_wheezy.md5 @@ -1 +1 @@ -557a19e04e66f0a9afb6035952b5ca18 Dockerfile_wheezy +3775dbcd23497095da8f5b7ddb62a540 Dockerfile_wheezy diff --git a/integration-tests/goss/rockylinux9/goss-aa-expected.yaml b/integration-tests/goss/rockylinux9/goss-aa-expected.yaml index 38c05599c..a5e1aa637 100644 --- a/integration-tests/goss/rockylinux9/goss-aa-expected.yaml +++ b/integration-tests/goss/rockylinux9/goss-aa-expected.yaml @@ -2,7 +2,7 @@ package: httpd: installed: true versions: - - 2.4.57-11.el9_4 + - 2.4.57-11.el9_4.1 port: tcp:80: listening: true diff --git a/integration-tests/goss/rockylinux9/goss-expected.yaml b/integration-tests/goss/rockylinux9/goss-expected.yaml index 9a1bacb13..0e950c209 100644 --- a/integration-tests/goss/rockylinux9/goss-expected.yaml +++ b/integration-tests/goss/rockylinux9/goss-expected.yaml @@ -15,7 +15,7 @@ package: httpd: installed: true versions: - - 2.4.57-11.el9_4 + - 2.4.57-11.el9_4.1 vim-tiny: installed: false addr: diff --git a/integration-tests/goss/vars.yaml b/integration-tests/goss/vars.yaml index 23b0c3b05..0686fd1a4 100644 --- a/integration-tests/goss/vars.yaml +++ b/integration-tests/goss/vars.yaml @@ -16,7 +16,7 @@ centos7: rockylinux9: proxy: http://127.0.0.1:8888 packages: - httpd: "2.4.57-11.el9_4" + httpd: "2.4.57-11.el9_4.1" services: httpd: [] trusty: From 2d8846d3e62db048df6aafb6ea91454ae67a3515 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Fri, 16 Aug 2024 01:53:02 +0200 Subject: [PATCH 11/20] add md5 checksum of dockerfiles to image labels (#967) --- .github/workflows/docker-integration-tests.yaml | 7 +++++++ development/build_images.sh | 2 ++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/docker-integration-tests.yaml b/.github/workflows/docker-integration-tests.yaml index e091866dc..74986a9eb 100644 --- a/.github/workflows/docker-integration-tests.yaml +++ b/.github/workflows/docker-integration-tests.yaml @@ -61,12 +61,19 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: MD5 of Dockerfile + id: md5_result + run: | + echo "md5=$(md5sum "${{ matrix.dockerfile }}" | awk '{ print $1 }')" >> $GITHUB_OUTPUT + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: images: | ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} + labels: | + rocks.goss.dockerfile-md5=${{ steps.md5_result.outputs.md5 }} - name: Build and push tag uses: docker/build-push-action@v5 diff --git a/development/build_images.sh b/development/build_images.sh index 9238294be..fe1fd2b98 100755 --- a/development/build_images.sh +++ b/development/build_images.sh @@ -12,6 +12,7 @@ LABEL_REVISION=$(git rev-parse HEAD) for docker_file in $INTEGRATION_TEST_DIR/Dockerfile_*; do [[ $docker_file == *.md5 ]] && continue os=$(cut -d '_' -f2 <<<"$docker_file") + md5=$(md5sum "$docker_file" | awk '{ print $1 }') docker build \ --label "org.opencontainers.image.created=$LABEL_DATE" \ --label "org.opencontainers.image.description=Quick and Easy server testing/validation" \ @@ -21,5 +22,6 @@ for docker_file in $INTEGRATION_TEST_DIR/Dockerfile_*; do --label "org.opencontainers.image.title=goss" \ --label "org.opencontainers.image.url=$LABEL_URL" \ --label "org.opencontainers.image.version=manual" \ + --label "rocks.goss.dockerfile-md5"=$md5 \ -t "aelsabbahy/goss_${os}:latest" - < "$docker_file" done From 9d9b95f1eeef8c0a550c151ad92f8a72226bc725 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Thu, 29 Aug 2024 20:48:32 +0200 Subject: [PATCH 12/20] fix: convert line endings of Dockerfile to linux (#952) * fix: convert line endings of Dockerfile to linux * bump httpd version --------- Co-authored-by: Ahmed Elsabbahy --- Dockerfile | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 73e4f50d6..2849a2b8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,19 @@ -ARG GO_VERSION=1.22 - -FROM docker.io/golang:${GO_VERSION}-alpine AS base - -ARG GOSS_VERSION=v0.0.0 -WORKDIR /build - -RUN --mount=target=. \ - CGO_ENABLED=0 go build \ - -ldflags "-X github.com/goss-org/goss/util.Version=${GOSS_VERSION} -s -w" \ - -o "/release/goss" \ - ./cmd/goss - -FROM alpine:3.19 - -COPY --from=base /release/* /usr/bin/ - -RUN mkdir /goss -VOLUME /goss +ARG GO_VERSION=1.22 + +FROM docker.io/golang:${GO_VERSION}-alpine AS base + +ARG GOSS_VERSION=v0.0.0 +WORKDIR /build + +RUN --mount=target=. \ + CGO_ENABLED=0 go build \ + -ldflags "-X github.com/goss-org/goss/util.Version=${GOSS_VERSION} -s -w" \ + -o "/release/goss" \ + ./cmd/goss + +FROM alpine:3.19 + +COPY --from=base /release/* /usr/bin/ + +RUN mkdir /goss +VOLUME /goss From b2bf15a4eefa5826263c929ab33af1ec910246ac Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Thu, 29 Aug 2024 20:50:30 +0200 Subject: [PATCH 13/20] use variables to set container registry and repository in scripts (#968) * use variables to set container registry and repository in scripts * remove "docker.io" * fix tests.sh --- development/build_images.sh | 3 ++- development/push_images.sh | 3 ++- integration-tests/test.sh | 9 +++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/development/build_images.sh b/development/build_images.sh index fe1fd2b98..fcfc1da9f 100755 --- a/development/build_images.sh +++ b/development/build_images.sh @@ -4,6 +4,7 @@ set -xeu SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" INTEGRATION_TEST_DIR="$SCRIPT_DIR/../integration-tests/" +CONTAINER_REPOSITORY="aelsabbahy" LABEL_DATE=$(date -u +'%Y-%m-%dT%H:%M:%S.%3NZ') LABEL_URL="https://github.com/goss-org/goss" @@ -23,5 +24,5 @@ for docker_file in $INTEGRATION_TEST_DIR/Dockerfile_*; do --label "org.opencontainers.image.url=$LABEL_URL" \ --label "org.opencontainers.image.version=manual" \ --label "rocks.goss.dockerfile-md5"=$md5 \ - -t "aelsabbahy/goss_${os}:latest" - < "$docker_file" + -t "$CONTAINER_REPOSITORY/goss_${os}:latest" - < "$docker_file" done diff --git a/development/push_images.sh b/development/push_images.sh index fcbc45574..680f96055 100755 --- a/development/push_images.sh +++ b/development/push_images.sh @@ -3,7 +3,8 @@ set -xeu SCRIPT_DIR=$(readlink -f "$(dirname "$0")") -images=$(docker images | grep '^aelsabbahy/goss_.*latest' | awk '$0=$1') +CONTAINER_REPOSITORY="aelsabbahy" +images=$(docker images | grep "^$CONTAINER_REPOSITORY/goss_.*latest" | awk '$0=$1') # Use md5sum to determine if CI needs to do a docker build pushd "$SCRIPT_DIR/../integration-tests"; diff --git a/integration-tests/test.sh b/integration-tests/test.sh index 2b9936d19..e92d08b09 100755 --- a/integration-tests/test.sh +++ b/integration-tests/test.sh @@ -8,6 +8,7 @@ os="${1:?"Need OS as 1st arg. e.g. alpine arch centos7 rockylinux9 trusty wheezy arch="${2:?"Need arch as 2nd arg. e.g. amd64 386"}" vars_inline="{inline: bar, overwrite: bar}" +container_repository="aelsabbahy" # setup places us inside repo-root; this preserves current behaviour with least change. cd integration-tests @@ -15,10 +16,10 @@ cd integration-tests cp "../release/goss-linux-$arch" "goss/$os/" # Run build if Dockerfile has changed but hasn't been pushed to dockerhub if ! md5sum -c "Dockerfile_${os}.md5"; then - docker build -t "aelsabbahy/goss_${os}:latest" - < "Dockerfile_$os" + docker build -t "$container_repository/goss_${os}:latest" - < "Dockerfile_$os" # Pull if image doesn't exist locally -elif ! docker images | grep "aelsabbahy/goss_$os";then - docker pull "aelsabbahy/goss_$os" +elif ! docker images | grep "$container_repository/goss_$os";then + docker pull "$container_repository/goss_$os" fi container_name="goss_int_test_${os}_${arch}" @@ -37,7 +38,7 @@ network=goss-test docker network create --driver bridge --subnet '172.19.0.0/16' $network docker run -d --name httpbin --network $network kennethreitz/httpbin opts=(--env OS=$os --cap-add SYS_ADMIN -v "$PWD/goss:/goss" -d --name "$container_name" --security-opt seccomp:unconfined --security-opt label:disable --privileged) -id=$(docker run "${opts[@]}" --network $network "aelsabbahy/goss_$os" /sbin/init) +id=$(docker run "${opts[@]}" --network $network "$container_repository/goss_$os" /sbin/init) ip=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' "$id") trap "rv=\$?; docker rm -vf $id;docker rm -vf httpbin;docker network rm $network; exit \$rv" INT TERM EXIT # Give httpd time to start up, adding 1 second to see if it helps with intermittent CI failures From 02d6c53a32b92d52023e31fc305322e220b97070 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:54:44 -0700 Subject: [PATCH 14/20] Bump docker/build-push-action from 5 to 6 (#943) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-goss.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-goss.yaml b/.github/workflows/docker-goss.yaml index 5516a6119..8784fc561 100644 --- a/.github/workflows/docker-goss.yaml +++ b/.github/workflows/docker-goss.yaml @@ -70,7 +70,7 @@ jobs: - name: Build master goss image if: github.ref_name == 'master' - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: build-args: | GO_VERSION=${{ env.GO_VERSION_FROM_PROJECT }} @@ -84,7 +84,7 @@ jobs: - name: Build release goss image if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: build-args: | GO_VERSION=${{ env.GO_VERSION_FROM_PROJECT }} From 3bd49c111663fb0b83ee8ac65c46b9522ac794c2 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:55:23 +0200 Subject: [PATCH 15/20] Add Github action to build release artifacts (#916) * Add Github action to build release artifacts * some improvements * disable travis deploy * fix line endings --- .github/workflows/release.yaml | 51 +++++++++++++++++++++++++++++++ .travis.yml | 56 +++++++++++++++++----------------- Makefile | 8 ++++- 3 files changed, 86 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..98e96535a --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,51 @@ +name: "Build release artifacts" +on: + push: + tags: + - "v*" + workflow_dispatch: + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Get version from tag + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + run: echo "TRAVIS_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + + - run: make release + - run: make dgoss-sha256 dcgoss-sha256 kgoss-sha256 + + - name: "Upload binary as artifact" + uses: actions/upload-artifact@v4 + with: + retention-days: 5 + if-no-files-found: error + name: build + path: | + release/* + extras/*/*goss + extras/*/*goss.sha256 + + attach-assets: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + needs: ["build"] + runs-on: ubuntu-latest + steps: + - name: Fetch all binaries + uses: actions/download-artifact@v4 + - name: Attach to release + uses: softprops/action-gh-release@v2 + with: + files: build/** + fail_on_unmatched_files: true diff --git a/.travis.yml b/.travis.yml index f6cbb8033..424ec3bc6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,31 +30,31 @@ before_install: script: - ./ci/build.sh -deploy: - provider: releases - api_key: - secure: ijNltjw/mIHIOx8vLZ6asUun3SbY7D+XZbs5NX8vcIv0jvOiwaaT1hqny7SQBHfGZzqHsYUSS/GYAYJdBqKFFfGmTZsl90hFT6D0RGdz9C71UVxNFX4wQ5KQ/WVvdMT2SrLymGvu9TvoU0VG8OWqWVdxSlUPf6qOTGAagrzg+Tbsbb6czeiG67mlBBL23XSlfMG1p45UxzvI41SZj2R3ElUb0hym1CrFaoC36PBGrb0x41TXzvd8J7cu6xDzgczYhnYQQZpS6f2YcqNV1z0f+P67EQqQiDWIIcK2jE/YG+RgM8cbpLMiMec8CDiwNCsejBA5EbVMlGJlODvBXT5NmMBeugueqfSHEfkl5qZTQG4AOAT7UsqbnM7r0NqzmaE5Lj90igvJK6rNsH1ZRe79WfSsTtuzlkkouHGvyoz0M8gnMSzpbbwoyIy+UT0hhPMoZvIpXfr43en5WkbkPKfop0p4Vjc8NGg0iD45q1JAvIVTtz/WvWTknM1P8e3u+TiDTaZkcJJmFaBqgaeLoWktOGfi54p9nhgQnSyBYt4PyvhWDQs7QFmX0BdKlqJCESvUOJTe1t6zJJsV7Gn/3sGCN7JUEwbnXTsCoMjjFFUvQdm0Ur7t7/2xU3kO+dyfqcdM/5SYFeppQcjHI0ckhI51mIoBTsJsGvaVwKKL1I4cyBU= - file: - - release/goss-darwin-amd64 - - release/goss-darwin-amd64.sha256 - - release/goss-darwin-arm64 - - release/goss-darwin-arm64.sha256 - - release/goss-linux-amd64 - - release/goss-linux-amd64.sha256 - - release/goss-linux-386 - - release/goss-linux-386.sha256 - - release/goss-linux-arm - - release/goss-linux-arm.sha256 - - release/goss-linux-arm64 - - release/goss-linux-arm64.sha256 - - release/goss-linux-s390x - - release/goss-linux-s390x.sha256 - - release/goss-windows-amd64.exe - - release/goss-windows-amd64.exe.sha256 - - extras/dgoss/dgoss - - extras/dgoss/dgoss.sha256 - skip_cleanup: true - on: - repo: goss-org/goss - tags: true - condition: $TRAVIS_OS_NAME = linux +# deploy: +# provider: releases +# api_key: +# secure: ijNltjw/mIHIOx8vLZ6asUun3SbY7D+XZbs5NX8vcIv0jvOiwaaT1hqny7SQBHfGZzqHsYUSS/GYAYJdBqKFFfGmTZsl90hFT6D0RGdz9C71UVxNFX4wQ5KQ/WVvdMT2SrLymGvu9TvoU0VG8OWqWVdxSlUPf6qOTGAagrzg+Tbsbb6czeiG67mlBBL23XSlfMG1p45UxzvI41SZj2R3ElUb0hym1CrFaoC36PBGrb0x41TXzvd8J7cu6xDzgczYhnYQQZpS6f2YcqNV1z0f+P67EQqQiDWIIcK2jE/YG+RgM8cbpLMiMec8CDiwNCsejBA5EbVMlGJlODvBXT5NmMBeugueqfSHEfkl5qZTQG4AOAT7UsqbnM7r0NqzmaE5Lj90igvJK6rNsH1ZRe79WfSsTtuzlkkouHGvyoz0M8gnMSzpbbwoyIy+UT0hhPMoZvIpXfr43en5WkbkPKfop0p4Vjc8NGg0iD45q1JAvIVTtz/WvWTknM1P8e3u+TiDTaZkcJJmFaBqgaeLoWktOGfi54p9nhgQnSyBYt4PyvhWDQs7QFmX0BdKlqJCESvUOJTe1t6zJJsV7Gn/3sGCN7JUEwbnXTsCoMjjFFUvQdm0Ur7t7/2xU3kO+dyfqcdM/5SYFeppQcjHI0ckhI51mIoBTsJsGvaVwKKL1I4cyBU= +# file: +# - release/goss-darwin-amd64 +# - release/goss-darwin-amd64.sha256 +# - release/goss-darwin-arm64 +# - release/goss-darwin-arm64.sha256 +# - release/goss-linux-amd64 +# - release/goss-linux-amd64.sha256 +# - release/goss-linux-386 +# - release/goss-linux-386.sha256 +# - release/goss-linux-arm +# - release/goss-linux-arm.sha256 +# - release/goss-linux-arm64 +# - release/goss-linux-arm64.sha256 +# - release/goss-linux-s390x +# - release/goss-linux-s390x.sha256 +# - release/goss-windows-amd64.exe +# - release/goss-windows-amd64.exe.sha256 +# - extras/dgoss/dgoss +# - extras/dgoss/dgoss.sha256 +# skip_cleanup: true +# on: +# repo: goss-org/goss +# tags: true +# condition: $TRAVIS_OS_NAME = linux diff --git a/Makefile b/Makefile index b5148e82f..724e66187 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ DOCS_DEPS := $(VENV)/.docs.dependencies .PHONY: all build install test release bench fmt lint vet test-int-all gen centos7 wheezy trusty alpine3 arch test-int32 centos7-32 wheezy-32 trusty-32 alpine3-32 arch-32 -all: test-short-all test-int-all dgoss-sha256 +all: test-short-all test-int-all dgoss-sha256 dcgoss-sha256 kgoss-sha256 test-short-all: fmt lint vet test @@ -144,6 +144,12 @@ arch: build dgoss-sha256: cd extras/dgoss/ && sha256sum dgoss > dgoss.sha256 +dcgoss-sha256: + cd extras/dcgoss/ && sha256sum dcgoss > dcgoss.sha256 + +kgoss-sha256: + cd extras/kgoss/ && sha256sum kgoss > kgoss.sha256 + $(PYTHON): $(info Creating virtualenv in $(VENV)) @python -m venv $(VENV) From 60fb9bdd9db9e6e59d2c7445e52244d0b749fcdf Mon Sep 17 00:00:00 2001 From: "R.I.Pienaar" Date: Sat, 14 Sep 2024 06:27:37 +0200 Subject: [PATCH 16/20] Update dependencies (#974) Signed-off-by: R.I.Pienaar --- go.mod | 17 +++++---- go.sum | 109 +++++++++------------------------------------------------ 2 files changed, 24 insertions(+), 102 deletions(-) diff --git a/go.mod b/go.mod index 7e88ac01f..b0375c1e9 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/goss-org/goss go 1.22 require ( - github.com/Masterminds/sprig/v3 v3.2.3 + github.com/Masterminds/sprig/v3 v3.3.0 github.com/achanda/go-sysctl v0.0.0-20160222034550-6be7678c45d2 github.com/blang/semver/v4 v4.0.0 github.com/cheekybits/genny v1.0.0 @@ -28,8 +28,9 @@ require ( ) require ( + dario.cat/mergo v1.0.1 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.2.1 // indirect + github.com/Masterminds/semver/v3 v3.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect @@ -37,7 +38,6 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/huandu/xstrings v1.5.0 // indirect - github.com/imdario/mergo v0.3.16 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect @@ -47,16 +47,15 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shopspring/decimal v1.4.0 // indirect - github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/cast v1.7.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect - golang.org/x/crypto v0.25.0 // indirect - golang.org/x/exp v0.0.0-20240716160929-1d5bc16f04a8 // indirect + golang.org/x/crypto v0.26.0 // indirect golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.27.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect golang.org/x/tools v0.23.0 // indirect google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/go.sum b/go.sum index ace20f754..f1b3a22aa 100644 --- a/go.sum +++ b/go.sum @@ -1,19 +1,18 @@ +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= -github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= -github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= +github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= github.com/achanda/go-sysctl v0.0.0-20160222034550-6be7678c45d2 h1:NYoPVh1XuUB5VBWLXRKoqzQhl4bajIxh+XuURbJ0uwc= github.com/achanda/go-sysctl v0.0.0-20160222034550-6be7678c45d2/go.mod h1:DCNKSpXhum14Y258jSbRmJvcesbzEdBPincz7yJUx3k= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= @@ -24,8 +23,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= -github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -38,7 +35,6 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/goss-org/GOnetstat v0.0.0-20230101144325-22be0bd9e64d h1:50mlZKtg8BUvBtFs0ioVpSgMMwcKaJefg/2pZ+lQf98= @@ -47,14 +43,8 @@ github.com/goss-org/go-ps v0.0.0-20230609005227-7b318e6a56e5 h1:NW0Jo4leMIrQxNOy github.com/goss-org/go-ps v0.0.0-20230609005227-7b318e6a56e5/go.mod h1:FYj70SLmogHdTTDGnIVaaK0iczROlsxmoMCwfAUuIE8= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= -github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= -github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -64,14 +54,10 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= -github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= github.com/miekg/dns v1.1.61 h1:nLxbwF3XxhwVSm8g9Dghm9MHPaUZuqhPiGL+675ZmEs= github.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eykwQ= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.7.1 h1:/tTvQaSJRr2FshkhXiIpux6fQ2Zvc4j7tAhMTStAG2g= @@ -88,43 +74,27 @@ github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaR github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= -github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA= -github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/samber/lo v1.46.0 h1:w8G+oaCPgz1PoCJztqymCFaKwXt+5cCXn51uPxExFfQ= github.com/samber/lo v1.46.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= -github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= +github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -140,75 +110,28 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= -golang.org/x/exp v0.0.0-20240716160929-1d5bc16f04a8 h1:Z+vTUQyBb738QmIhbJx3z4htsxDeI+rd0EHvNm8jHkg= -golang.org/x/exp v0.0.0-20240716160929-1d5bc16f04a8/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From 9fdeed8557dca447961e4b5512fc93a3028ac27f Mon Sep 17 00:00:00 2001 From: Ahmed Elsabbahy Date: Tue, 24 Sep 2024 18:51:22 -0700 Subject: [PATCH 17/20] Changed: updated build-push-actions v5->v6 (#980) --- .github/workflows/docker-integration-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-integration-tests.yaml b/.github/workflows/docker-integration-tests.yaml index 74986a9eb..16ee012ab 100644 --- a/.github/workflows/docker-integration-tests.yaml +++ b/.github/workflows/docker-integration-tests.yaml @@ -76,7 +76,7 @@ jobs: rocks.goss.dockerfile-md5=${{ steps.md5_result.outputs.md5 }} - name: Build and push tag - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . file: ${{ matrix.dockerfile }} From 5704120d25902119cb1139e04bca3db7742a9f73 Mon Sep 17 00:00:00 2001 From: Ahmed Elsabbahy Date: Wed, 25 Sep 2024 11:07:07 -0700 Subject: [PATCH 18/20] bump to go 1.23 to fix cve (fixes #973) (#983) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 424ec3bc6..8951c66b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: go go: - - 1.22.x + - 1.23.x os: - osx From 7a3bcdad189fd678fa3577680d3d0f3663c80903 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:18:53 +0100 Subject: [PATCH 19/20] ci: add schedule for trivy scans (#944) * ci: add schedule for trivy scans * fix line endings * bump trivy version * bump trivy --- .github/workflows/docker-goss.yaml | 2 +- .github/workflows/trivy-schedule.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/trivy-schedule.yaml diff --git a/.github/workflows/docker-goss.yaml b/.github/workflows/docker-goss.yaml index 8784fc561..e7a9f8296 100644 --- a/.github/workflows/docker-goss.yaml +++ b/.github/workflows/docker-goss.yaml @@ -98,7 +98,7 @@ jobs: platforms: ${{ env.PLATFORMS }} - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@master + uses: aquasecurity/trivy-action@0.24.0 with: image-ref: ghcr.io/${{ github.repository_owner }}/goss:master format: "sarif" diff --git a/.github/workflows/trivy-schedule.yaml b/.github/workflows/trivy-schedule.yaml new file mode 100644 index 000000000..db3569875 --- /dev/null +++ b/.github/workflows/trivy-schedule.yaml @@ -0,0 +1,27 @@ +name: Trivy Code Scanning + +on: + schedule: + - cron: "0 3 * * 5" + workflow_dispatch: + +jobs: + trivy-scan: + name: Trivy scan + runs-on: ubuntu-latest + permissions: + packages: read + security-events: write + + steps: + - name: Run Trivy vulnerability scanner + uses: aquasecurity/trivy-action@0.24.0 + with: + image-ref: ghcr.io/${{ github.repository_owner }}/goss:latest + format: "sarif" + output: "trivy-results.sarif" + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: "trivy-results.sarif" From 6434d958ca750abd2122ebfe08597dd90b7867e9 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:20:35 +0100 Subject: [PATCH 20/20] dgoss: add flag for debugging (#998) --- extras/dgoss/README.md | 15 +++++++++++++++ extras/dgoss/dgoss | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/extras/dgoss/README.md b/extras/dgoss/README.md index 8dd1d827d..218e40d01 100644 --- a/extras/dgoss/README.md +++ b/extras/dgoss/README.md @@ -80,6 +80,21 @@ This allows the user to leverage the `goss add|autoadd` commands to write tests The following environment variables can be set to change the behavior of dgoss. +#### DEBUG + +Enables debug output of `dgoss`. + +When running in debug mode, the tmp dir with the container output will not be cleaned up. + +Note: Debug output of `dgoss` is from `dgoss` shell script and not debug output of `goss` +(`dgoss run -e GOSS_LOGLEVEL=DEBUG jenkins:alpine`). + +**Default:** empty + +**Example:** + +`DEBUG=true dgoss run jenkins:alpine` + #### GOSS_PATH Location of the goss binary to use. (Default: `$(which goss)`) diff --git a/extras/dgoss/dgoss b/extras/dgoss/dgoss index 962d429c9..498c6ebb1 100755 --- a/extras/dgoss/dgoss +++ b/extras/dgoss/dgoss @@ -1,6 +1,7 @@ #!/bin/bash set -e +[ "$DEBUG" ] && set -x USAGE="USAGE: $(basename "$0") [run|edit] " GOSS_FILES_PATH="${GOSS_FILES_PATH:-.}" @@ -22,7 +23,7 @@ cleanup() { if [ -n "$CONTAINER_LOG_OUTPUT" ]; then cp "$tmp_dir/docker_output.log" "$CONTAINER_LOG_OUTPUT" fi - rm -rf "$tmp_dir" + [ "$DEBUG" ] || rm -rf "$tmp_dir" if [[ $id ]];then info "Deleting container" $CONTAINER_RUNTIME rm -vf "$id" > /dev/null