From 98bb2e71037cb03fd1b35d7db141258cd41519bd Mon Sep 17 00:00:00 2001 From: Wilian Gabriel Date: Thu, 24 Feb 2022 15:37:15 -0300 Subject: [PATCH] workflow:feat - Automating the release notes In this PR I'll update Release Beta, RC and Final to set automatic body in release notes.I changed file release.yml to release-final.yml Signed-off-by: Wilian Gabriel --- .github/CODEOWNERS | 2 +- .github/workflows/release-alpha.yml | 3 +- .github/workflows/release-beta.yml | 22 ++++-- .../{release.yml => release-final.yml} | 25 +++++-- .github/workflows/release-rc.yml | 22 ++++-- .goreleaser.yml | 41 ++++++++++-- config/samples/sample_install_dependencies.sh | 3 - go.mod | 67 ++++++++++++++++++- go.sum | 27 +------- magefile.go | 3 +- 10 files changed, 155 insertions(+), 60 deletions(-) rename .github/workflows/{release.yml => release-final.yml} (88%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7dc4d579..ed3710a8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,4 @@ # GitHub code owners # See https://github.com/blog/2392-introducing-code-owners -* @wiliansilvazup @matheusalcantarazup @lucasbrunozup @nathanmartinszup @iancardosozup +* @wiliansilvazup @lucasbrunozup @nathanmartinszup @iancardosozup @matheusalcantarazup @oliveirafelipezup diff --git a/.github/workflows/release-alpha.yml b/.github/workflows/release-alpha.yml index 9e1991ed..320edec3 100644 --- a/.github/workflows/release-alpha.yml +++ b/.github/workflows/release-alpha.yml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: ReleaseAlpha +name: release-alpha on: push: @@ -25,6 +25,7 @@ jobs: permissions: contents: write packages: write + issues: write runs-on: ubuntu-latest env: COSIGN_KEY_LOCATION: "/tmp/cosign.key" diff --git a/.github/workflows/release-beta.yml b/.github/workflows/release-beta.yml index ace03b0a..cceada5d 100644 --- a/.github/workflows/release-beta.yml +++ b/.github/workflows/release-beta.yml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: ReleaseBeta +name: release-beta on: workflow_dispatch: @@ -27,11 +27,12 @@ jobs: permissions: contents: write packages: write + issues: write runs-on: ubuntu-latest env: COSIGN_KEY_LOCATION: "/tmp/cosign.key" #private key used to sing the artefacts and images location. COSIGN_PWD: ${{ secrets.COSIGN_PWD }} - + if: contains('["wiliansilvazup","matheusalcantarazup","lucasbrunozup","nathanmartinszup","iancardosozup","oliveirafelipezup"]', github.actor) steps: - name: Checkout uses: actions/checkout@v3 @@ -66,7 +67,7 @@ jobs: uses: crazy-max/ghaction-import-gpg@v4 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} + passphrase: ${{ secrets.GPG_PASSWORD }} git_user_signingkey: true git_commit_gpgsign: true @@ -93,9 +94,9 @@ jobs: - name: Checkout Release Branch run: mage CheckoutReleaseBranch ${{ steps.updated-version.outputs.nextReleaseBranchName }} - # Creates a tag with the next version created during the last step, but still don't publish it. - - name: Create tag - run: mage CreateLocalTag ${{ steps.updated-version.outputs.nextBetaVersion }} + # Creates a tag with the next version created during the last step + - name: Create and push tag + run: mage -v createAndPushTag ${{ steps.updated-version.outputs.nextBetaVersion }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 @@ -105,8 +106,15 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COSIGN_PWD: ${{ secrets.COSIGN_PWD }} GORELEASER_CURRENT_TAG: ${{ steps.updated-version.outputs.nextBetaVersion }} + GORELEASER_PREVIOUS_TAG: ${{ steps.updated-version.outputs.actualBetaVersion }} # Publish the release and tag using mage - name: Push All - run: mage GitPushAll + if: ${{ success() }} + run: mage -v gitPushAll + + - name: Remove updates + if: ${{ !success() }} + run: mage -v removeTag ${{ steps.updated-version.outputs.nextBetaVersion }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release-final.yml similarity index 88% rename from .github/workflows/release.yml rename to .github/workflows/release-final.yml index 20a8c120..aa369ebe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release-final.yml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Release +name: release-final on: workflow_dispatch: @@ -26,15 +26,16 @@ on: permissions: read-all jobs: - Release: + ReleaseFinal: permissions: contents: write packages: write + issues: write runs-on: ubuntu-latest env: COSIGN_KEY_LOCATION: "/tmp/cosign.key" #private key used to sing the artefacts and images location. COSIGN_PWD: ${{ secrets.COSIGN_PWD }} - + if: contains('["wiliansilvazup","matheusalcantarazup","lucasbrunozup","nathanmartinszup","iancardosozup","oliveirafelipezup"]', github.actor) steps: - name: Checkout uses: actions/checkout@v3 @@ -69,7 +70,7 @@ jobs: uses: crazy-max/ghaction-import-gpg@v4 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} + passphrase: ${{ secrets.GPG_PASSWORD }} git_user_signingkey: true git_commit_gpgsign: true @@ -96,9 +97,9 @@ jobs: - name: Checkout Release Branch run: mage CheckoutReleaseBranch ${{ steps.updated-version.outputs.nextReleaseBranchName }} - # Creates a tag with the next version created during the last step, but still don't publish it. - - name: Create tag - run: mage CreateLocalTag ${{ steps.updated-version.outputs.nextReleaseVersion }} + # Creates a tag with the next version created during the last step + - name: Create and push tag + run: mage -v createAndPushTag ${{ steps.updated-version.outputs.nextReleaseVersion }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 @@ -108,11 +109,14 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COSIGN_PWD: ${{ secrets.COSIGN_PWD }} GORELEASER_CURRENT_TAG: ${{ steps.updated-version.outputs.nextReleaseVersion }} + GORELEASER_PREVIOUS_TAG: ${{ steps.updated-version.outputs.actualReleaseVersion }} # This step updates the defaults.json to the platform version passed in the workflow input for all microservices. # The README.md and kustomization.yaml also are updated to match the new operator version that ir being released. - name: Update versioning files + if: ${{ success() }} run: mage UpdateVersioningFiles env: HORUSEC_PLATFORM_VERSION: ${{ github.event.inputs.horusecPlatformVersion }} @@ -122,6 +126,7 @@ jobs: # The changes made in the last step are committed to the branch that the workflow was triggered, this commit is not # going to trigger any workflow cause the skip ci in the commit message. - name: Commit changes + if: ${{ success() }} uses: EndBug/add-and-commit@v8.0.2 with: push: true @@ -137,6 +142,7 @@ jobs: # workflow is started from a branch that isn't the main branch, for example a release branch. # When the workflow it's triggered to run on main, the commit it's going to be made directly to the main branch. - name: Cherry pick + if: ${{ success() }} id: cherry-pick run: mage CherryPick @@ -144,6 +150,7 @@ jobs: # into the main branch. As the last commit, this also needs to run only when the release workflow is started from a # branch that isn't the main branch. Others workflows should be skipped cause of the skip ci in the pull request title. - name: Create Pull Request + if: ${{ success() }} uses: repo-sync/pull-request@v2 with: source_branch: "${{ steps.cherry-pick.outputs.cherryPickBranchName }}" @@ -151,3 +158,7 @@ jobs: pr_title: "versioning:release - [skip ci] automatic pull request updating versioning files" pr_body: "This is a automatic pull request that contains changes to files that need to be updated with the new release version. Where the commit ${{ steps.cherry-pick.outputs.commitShaToPick }} was cherry picked from the release branch, which already contains all the necessary changes." github_token: ${{ secrets.HORUSEC_PUSH_TOKEN }} + + - name: Remove updates + if: ${{ !success() }} + run: mage -v removeTag ${{ steps.updated-version.outputs.nextReleaseVersion }} \ No newline at end of file diff --git a/.github/workflows/release-rc.yml b/.github/workflows/release-rc.yml index db135fa1..3ce4e408 100644 --- a/.github/workflows/release-rc.yml +++ b/.github/workflows/release-rc.yml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: ReleaseRC +name: release-rc on: workflow_dispatch: @@ -27,11 +27,12 @@ jobs: permissions: contents: write packages: write + issues: write runs-on: ubuntu-latest env: COSIGN_KEY_LOCATION: "/tmp/cosign.key" #private key used to sing the artefacts and images location. COSIGN_PWD: ${{ secrets.COSIGN_PWD }} - + if: contains('["wiliansilvazup","matheusalcantarazup","lucasbrunozup","nathanmartinszup","iancardosozup","oliveirafelipezup"]', github.actor) steps: - name: Checkout uses: actions/checkout@v3 @@ -66,7 +67,7 @@ jobs: uses: crazy-max/ghaction-import-gpg@v4 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} + passphrase: ${{ secrets.GPG_PASSWORD }} git_user_signingkey: true git_commit_gpgsign: true @@ -93,9 +94,9 @@ jobs: - name: Checkout Release Branch run: mage CheckoutReleaseBranch ${{ steps.updated-version.outputs.nextReleaseBranchName }} - # Creates a tag with the next version created during the last step, but still don't publish it. - - name: Create tag - run: mage CreateLocalTag ${{ steps.updated-version.outputs.nextRCVersion }} + # Creates a tag with the next version created during the last step + - name: Create and push tag + run: mage -v createAndPushTag ${{ steps.updated-version.outputs.nextRCVersion }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 @@ -105,8 +106,15 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COSIGN_PWD: ${{ secrets.COSIGN_PWD }} GORELEASER_CURRENT_TAG: ${{ steps.updated-version.outputs.nextRCVersion }} + GORELEASER_PREVIOUS_TAG: ${{ steps.updated-version.outputs.actualRCVersion }} # Publish the release and tag using mage - name: Push All - run: mage GitPushAll + if: ${{ success() }} + run: mage -v gitPushAll + + - name: Remove updates + if: ${{ !success() }} + run: mage -v removeTag ${{ steps.updated-version.outputs.nextRCVersion }} \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index 9a52b14f..22cef328 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -28,18 +28,49 @@ builds: goarch: - amd64 binary: horusec-operator + changelog: - skip: true + skip: false + use: github + groups: + - title: 'Features' + regexp: "^.*:(feature|feat)\\s-.*$" + order: 0 + - title: 'Bug fixes' + regexp: "^.*:(bugfix|fix)\\s-.*$" + order: 1 + - title: 'Hotfixes' + regexp: "^.*:hotfix\\s-.*$" + order: 2 + - title: 'Chores' + regexp: "^.*:chore\\s-.*$" + order: 3 + - title: Others + order: 999 + filters: + exclude: + - '^deps:chore.*$' + - '^Commit\sfrom\sGitHub\sActions.*$' + - '^build(deps):.*$' + - '^Update\sdependency.*$' + - '^versioning:release.*$' + snapshot: name_template: "{{ incpatch .Version }}-next" archives: - format: binary release: - draft: true + prerelease: auto + draft: false + mode: append extra_files: - glob: ./deployments/cosign.pub - ids: - - + footer: | + ## Docker images + - `docker pull horuszup/horusec-operator:{{ .Tag }}` + + **Full Changelog**: https://github.com/ZupIT/horusec-operator/compare/{{ .PreviousTag }}...{{ .Tag }} + signs: - cmd: cosign stdin: '{{ .Env.COSIGN_PWD }}' @@ -58,7 +89,7 @@ dockers: - horusec-operator - image_templates: - "horuszup/horusec-operator:{{ .Tag }}" - skip_push: false + skip_push: "false" dockerfile: ./deployments/dockerfiles/Dockerfile.gorelease - image_templates: - "horuszup/horusec-operator:latest" diff --git a/config/samples/sample_install_dependencies.sh b/config/samples/sample_install_dependencies.sh index ff8b7f2b..df0cd08f 100755 --- a/config/samples/sample_install_dependencies.sh +++ b/config/samples/sample_install_dependencies.sh @@ -34,7 +34,6 @@ export POSTGRES_PASSWORD=$(kubectl get secret postgresql -o jsonpath="{.data.pos export RABBITMQ_USERNAME="user" export RABBITMQ_PASSWORD=$(kubectl get secret rabbitmq -o jsonpath="{.data.rabbitmq-password}" | base64 --decode) export JWT_SECRET="4ff42f67-5929-fc52-65f1-3afc77ad86d5" -export CONFIDENTIAL_CLIENT_SECRET="4ff42f67-5929-fc52-65f1-3afc77ad86d5" # waits for postgres to be ready kubectl wait --for=condition=ready pod postgresql-0 --timeout 300s @@ -48,5 +47,3 @@ kubectl create secret generic horusec-analytic-database --from-literal="username kubectl create secret generic horusec-broker --from-literal="username=$RABBITMQ_USERNAME" --from-literal="password=$RABBITMQ_PASSWORD" kubectl create secret generic horusec-jwt --from-literal=jwt-token=$JWT_SECRET - -kubectl create secret generic horusec-keycloak-client --from-literal="client-secret=$CONFIDENTIAL_CLIENT_SECRET" \ No newline at end of file diff --git a/go.mod b/go.mod index d768ebf4..f12150b5 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,8 @@ module github.com/ZupIT/horusec-operator -go 1.16 +go 1.17 require ( - github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect github.com/ZupIT/horusec-devkit v1.0.23 github.com/go-logr/logr v0.4.0 github.com/golang/mock v1.6.0 @@ -15,10 +14,72 @@ require ( github.com/opentracing/opentracing-go v1.2.0 github.com/stretchr/testify v1.7.0 github.com/uber/jaeger-client-go v2.29.1+incompatible - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect go.uber.org/zap v1.21.0 k8s.io/api v0.22.2 k8s.io/apimachinery v0.22.2 k8s.io/client-go v0.22.2 sigs.k8s.io/controller-runtime v0.10.3 ) + +require ( + cloud.google.com/go v0.65.0 // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.18 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.13 // 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/HdrHistogram/hdrhistogram-go v1.1.2 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/go-logr/zapr v0.4.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-github/v40 v40.0.0 // indirect + github.com/google/go-querystring v1.1.0 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/nxadm/tail v1.4.8 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect + golang.org/x/net v0.0.0-20220114011407-0dd24b26b47d // indirect + golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect + golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect + golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.27.1 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/apiextensions-apiserver v0.22.2 // indirect + k8s.io/component-base v0.22.2 // indirect + k8s.io/klog/v2 v2.9.0 // indirect + k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect + k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect +) diff --git a/go.sum b/go.sum index 04c1441f..1f4c9271 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,7 @@ github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMo github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/ZupIT/horusec-devkit v1.0.22 h1:RW7ZzZWEOdFqlCN6ZBYzSg0UMtOnaaZQ95iaLCqn+1g= -github.com/ZupIT/horusec-devkit v1.0.22/go.mod h1:QiWTanEkeMikccopaW1ZG/ie74ODZekOUu2i8kgkARo= +github.com/ZupIT/horusec-devkit v1.0.23 h1:CBL5ya45zLMXYYgmdAtShAm3VC1F7KQGiRaIU3WGTow= github.com/ZupIT/horusec-devkit v1.0.23/go.mod h1:01lg6tLZkqwJE/Nn8Prnq7bFjq9Agf4zwbuV47sxMno= github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -181,15 +180,10 @@ github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aA github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/spec v0.19.14/go.mod h1:gwrgJS15eCUgjLpMjBJmbZezCsw88LmgeEip0M63doA= -github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= -github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= @@ -376,7 +370,6 @@ github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFF github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -423,8 +416,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/migueleliasweb/go-github-mock v0.0.6 h1:JYB8HK7PvchVaCpO4YbstTaaZz8WFwqAQ2UT7ugjiOU= -github.com/migueleliasweb/go-github-mock v0.0.6/go.mod h1:mD5w+9J3oBBMLr7uD6owEYlYBAL8tZd+BA7iGjI4EU8= +github.com/migueleliasweb/go-github-mock v0.0.7 h1:4/uRfgFh/urIyXD0W6TP09323PBqNYCUpJftc4dePmI= github.com/migueleliasweb/go-github-mock v0.0.7/go.mod h1:mD5w+9J3oBBMLr7uD6owEYlYBAL8tZd+BA7iGjI4EU8= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -440,7 +432,6 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= @@ -495,7 +486,6 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= @@ -569,12 +559,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14/go.mod h1:gxQT6pBGRuIGunNf/+tSOB5OHvguWi8Tbt82WOkf35E= github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w= -github.com/swaggo/http-swagger v1.1.2/go.mod h1:mX5nhypDmoSt4iw2mc5aKXxRFvp1CLLcCiog2B9M+Ro= github.com/swaggo/http-swagger v1.2.5/go.mod h1:CcoICgY3yVDk2u1LQUCMHbAj0fjlxIX+873psXlIKNA= -github.com/swaggo/swag v1.7.0/go.mod h1:BdPIL73gvS9NBsdi7M1JOxLvlbfvNRaBP8m6WT6Aajo= -github.com/swaggo/swag v1.7.8/go.mod h1:gZ+TJ2w/Ve1RwQsA2IRoSOTidHz6DX+PIG8GWvbnoLU= github.com/swaggo/swag v1.7.9/go.mod h1:gZ+TJ2w/Ve1RwQsA2IRoSOTidHz6DX+PIG8GWvbnoLU= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -639,8 +625,6 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.20.0 h1:N4oPlghZwYG55MlU6LXk/Zp00FVNE9X9wrYO8CEs4lc= -go.uber.org/zap v1.20.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -659,8 +643,6 @@ golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce h1:Roh6XWxHFKrPgC/EQhVubSAGQ6Ozk6IdxHSzt1mR0EI= -golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -736,9 +718,7 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201207224615-747e23833adb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= @@ -908,8 +888,6 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20201120155355-20be4ac4bd6e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208062317-e652b2f42cc7/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1005,7 +983,6 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/magefile.go b/magefile.go index 47cd000a..5456f07c 100644 --- a/magefile.go +++ b/magefile.go @@ -20,9 +20,9 @@ import ( "fmt" "os" + "github.com/magefile/mage/sh" // mage:import _ "github.com/ZupIT/horusec-devkit/pkg/utils/mageutils" - "github.com/magefile/mage/sh" ) const ( @@ -47,6 +47,7 @@ const ( envReleaseVersion = "HORUSEC_RELEASE_VERSION" ) +// UpdateVersioningFiles update project version in all files func UpdateVersioningFiles() error { if err := sh.RunV("npm", "install", "-g", "json"); err != nil { return err