diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b735ce..4940481 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,11 @@ name: gokong build on: push: - branches: [ master ] - pull_request: + branches: + - develop + - stage + - master + jobs: build: name: building gokong diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05d13a5..7442bcf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,28 +15,21 @@ on: tags: - 'v*' jobs: - goreleaser: + build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2.3.4 - - - name: Unshallow - run: git fetch --prune --unshallow - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 + - name: Import GPG key id: import_gpg - uses: hashicorp/ghaction-import-gpg@v2.1.0 - env: - # These secrets will need to be configured for the repository: + uses: crazy-max/ghaction-import-gpg@v6 + with: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} PASSPHRASE: ${{ secrets.PASSPHRASE }} + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2.5.0 @@ -46,4 +39,4 @@ jobs: env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} # GitHub sets this automatically - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/kong/resource_kong_route.go b/kong/resource_kong_route.go index 046a0d8..5bedeb0 100644 --- a/kong/resource_kong_route.go +++ b/kong/resource_kong_route.go @@ -122,18 +122,18 @@ func resourceKongRoute() *schema.Resource { ForceNew: false, Default: 426, }, - "request_buffering": { - Type: schema.TypeBool, - Optional: true, - ForceNew: false, - Default: true, - }, - "response_buffering": { - Type: schema.TypeBool, - Optional: true, - ForceNew: false, - Default: true, - }, + // "request_buffering": { + // Type: schema.TypeBool, + // Optional: true, + // ForceNew: false, + // Default: true, + // }, + // "response_buffering": { + // Type: schema.TypeBool, + // Optional: true, + // ForceNew: false, + // Default: true, + // }, "tags": { Type: schema.TypeList, Optional: true, @@ -304,19 +304,19 @@ func resourceKongRouteRead(ctx context.Context, d *schema.ResourceData, meta int } } - if route.RequestBuffering != nil { - err := d.Set("request_buffering", route.RequestBuffering) - if err != nil { - return diag.FromErr(err) - } - } + // if route.RequestBuffering != nil { + // err := d.Set("request_buffering", route.RequestBuffering) + // if err != nil { + // return diag.FromErr(err) + // } + // } - if route.ResponseBuffering != nil { - err := d.Set("response_buffering", route.ResponseBuffering) - if err != nil { - return diag.FromErr(err) - } - } + // if route.ResponseBuffering != nil { + // err := d.Set("response_buffering", route.ResponseBuffering) + // if err != nil { + // return diag.FromErr(err) + // } + // } err = d.Set("tags", route.Tags) if err != nil { @@ -373,8 +373,8 @@ func createKongRouteRequestFromResourceData(d *schema.ResourceData) *kong.Route }, PathHandling: readStringPtrFromResource(d, "path_handling"), HTTPSRedirectStatusCode: readIntPtrFromResource(d, "https_redirect_status_code"), - RequestBuffering: readBoolPtrFromResource(d, "request_buffering"), - ResponseBuffering: readBoolPtrFromResource(d, "response_buffering"), + // RequestBuffering: readBoolPtrFromResource(d, "request_buffering"), + // ResponseBuffering: readBoolPtrFromResource(d, "response_buffering"), Tags: readStringArrayPtrFromResource(d, "tags"), Headers: readMapStringArrayFromResource(d, "header"), } diff --git a/kong/resource_kong_route_test.go b/kong/resource_kong_route_test.go index 736d90d..da72b65 100644 --- a/kong/resource_kong_route_test.go +++ b/kong/resource_kong_route_test.go @@ -33,8 +33,8 @@ func TestAccKongRoute(t *testing.T) { resource.TestCheckResourceAttr("kong_route.route", "regex_priority", "1"), resource.TestCheckResourceAttr("kong_route.route", "path_handling", "v1"), resource.TestCheckResourceAttr("kong_route.route", "https_redirect_status_code", "301"), - resource.TestCheckResourceAttr("kong_route.route", "request_buffering", "false"), - resource.TestCheckResourceAttr("kong_route.route", "response_buffering", "false"), + // resource.TestCheckResourceAttr("kong_route.route", "request_buffering", "false"), + // resource.TestCheckResourceAttr("kong_route.route", "response_buffering", "false"), resource.TestCheckResourceAttr("kong_route.route", "header.#", "2"), resource.TestCheckResourceAttr("kong_route.route", "header.0.name", "x-test-1"), resource.TestCheckResourceAttr("kong_route.route", "header.0.values.#", "2"), @@ -66,8 +66,8 @@ func TestAccKongRoute(t *testing.T) { resource.TestCheckResourceAttr("kong_route.route", "regex_priority", "2"), resource.TestCheckResourceAttr("kong_route.route", "path_handling", "v0"), resource.TestCheckResourceAttr("kong_route.route", "https_redirect_status_code", "426"), - resource.TestCheckResourceAttr("kong_route.route", "request_buffering", "true"), - resource.TestCheckResourceAttr("kong_route.route", "response_buffering", "true"), + // resource.TestCheckResourceAttr("kong_route.route", "request_buffering", "true"), + // resource.TestCheckResourceAttr("kong_route.route", "response_buffering", "true"), resource.TestCheckResourceAttr("kong_route.route", "header.#", "1"), resource.TestCheckResourceAttr("kong_route.route", "header.0.name", "x-test-1"), resource.TestCheckResourceAttr("kong_route.route", "header.0.values.#", "1"), @@ -216,8 +216,8 @@ resource "kong_route" "route" { service_id = "${kong_service.service.id}" path_handling = "v1" https_redirect_status_code = 301 - request_buffering = false - response_buffering = false + // request_buffering = false + // response_buffering = false header { name = "x-test-1" values = ["a", "b"] @@ -248,8 +248,8 @@ resource "kong_route" "route" { service_id = "${kong_service.service.id}" path_handling = "v0" https_redirect_status_code = 426 - request_buffering = true - response_buffering = true + // request_buffering = true + // response_buffering = true header { name = "x-test-1" values = ["a"]