Skip to content

Commit

Permalink
Merge pull request #4 from kubescape/update-go-version
Browse files Browse the repository at this point in the history
Update go version
  • Loading branch information
amirmalka committed Aug 22, 2023
2 parents af982d3 + c9b890b commit 5bd1eef
Show file tree
Hide file tree
Showing 11 changed files with 184 additions and 197 deletions.
77 changes: 0 additions & 77 deletions .github/workflows/build.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/pr-checks.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/pr-created.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: pull_request_created
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
branches:
- 'main'
paths-ignore:
- '*.md'
- '*.yaml'
- '.github/workflows/*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pr-created:
uses: kubescape/workflows/.github/workflows/incluster-comp-pr-created.yaml@main
with:
GO_VERSION: "1.20"
CGO_ENABLED: 0
secrets: inherit
42 changes: 42 additions & 0 deletions .github/workflows/pr-merged.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: pr-merged
on:
pull_request_target:
types: [closed]
branches:
- 'main'
paths-ignore:
- '*.md'
- '*.yaml'
- '.github/workflows/*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pr-merged:
if: ${{ github.event.pull_request.merged == true }} ## Skip if not merged
uses: kubescape/workflows/.github/workflows/incluster-comp-pr-merged.yaml@main
with:
IMAGE_NAME: quay.io/${{ github.repository_owner }}/http-request
IMAGE_TAG: v0.2.${{ github.run_number }}
COMPONENT_NAME: http-request
CGO_ENABLED: 0
GO111MODULE: "on"
BUILD_PLATFORM: linux/amd64,linux/arm64
GO_VERSION: "1.20"
REQUIRED_TESTS: '[
"vulnerability_scanning_triggering_with_cron_job",
"registry_scanning_triggering_with_cron_job",
"ks_microservice_ns_creation",
"ks_microservice_on_demand",
"ks_microservice_mitre_framework_on_demand",
"ks_microservice_nsa_and_mitre_framework_demand",
"ks_microservice_triggering_with_cron_job",
"ks_microservice_update_cronjob_schedule",
"ks_microservice_delete_cronjob",
"ks_microservice_create_2_cronjob_mitre_and_nsa"
]'
COSIGN: true
HELM_E2E_TEST: true
secrets: inherit
48 changes: 0 additions & 48 deletions .github/workflows/publish.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine as builder
FROM golang:1.20-alpine as builder

ENV RELEASE=$image_version

Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module github.com/kubescape/http-request

go 1.18
go 1.20

require (
github.com/armosec/utils-go v0.0.12
github.com/stretchr/testify v1.7.0
github.com/armosec/utils-go v0.0.26
github.com/stretchr/testify v1.8.4
)

require (
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
17 changes: 8 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
github.com/armosec/utils-go v0.0.12 h1:NXkG/BhbSVAmTVXr0qqsK02CmxEiXuJyPmdTRcZ4jAo=
github.com/armosec/utils-go v0.0.12/go.mod h1:F/K1mI/qcj7fNuJl7xktoCeHM83azOF0Zq6eC2WuPyU=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/armosec/utils-go v0.0.26 h1:EPHu0P8XfoCrsNDf3OlO1RexFlgy77wGS1lY5aNI9Fk=
github.com/armosec/utils-go v0.0.26/go.mod h1:ZEFiSv8KpTFNT19jHis1IengiF/BGDvg7tHmXo+cwxs=
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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
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=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"fmt"
"log"
)

Expand All @@ -11,8 +12,10 @@ func main() {
log.Fatal(err)
}

if err := Request(parser); err != nil {
if response, err := Request(parser); err != nil {
log.Fatal(err)
} else {
fmt.Printf("response: %s", response)
}

}

0 comments on commit 5bd1eef

Please sign in to comment.