diff --git a/.github/workflows/docker-build-api-executors-tag.yaml b/.github/workflows/docker-build-api-executors-tag.yaml index 378e39bc15e..0259327fd58 100644 --- a/.github/workflows/docker-build-api-executors-tag.yaml +++ b/.github/workflows/docker-build-api-executors-tag.yaml @@ -702,6 +702,63 @@ jobs: docker push kubeshop/testkube-cypress-executor:${{ steps.tag.outputs.tag }}-${{ matrix.version }}-amd64 docker push kubeshop/testkube-cypress-executor:${{ steps.tag.outputs.tag }}-${{ matrix.version }}-arm64v8 + executor_postman_node21: + runs-on: ubuntu-latest + steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + + - name: Checkout + uses: actions/checkout@v4 + + - uses: sigstore/cosign-installer@v3.5.0 + - uses: anchore/sbom-action/download-syft@v0.15.11 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Set-up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + cache: false + + - name: Go Cache + uses: actions/cache@v4 + with: + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: postman-node-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Release + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: latest + args: release -f goreleaser_files/.goreleaser-docker-build-executor-postman-node21.yml + env: + GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} + DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" + DOCKER_BUILDX_CACHE_FROM: "type=gha" + DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" + executor_cypress_manifest: needs: executor_cypress strategy: diff --git a/.github/workflows/docker-build-develop.yaml b/.github/workflows/docker-build-develop.yaml index cd81bc5a4ed..6551912f497 100644 --- a/.github/workflows/docker-build-develop.yaml +++ b/.github/workflows/docker-build-develop.yaml @@ -654,6 +654,70 @@ jobs: run: | docker push kubeshop/testkube-playwright-executor:${{ steps.commit.outputs.short }} + executor_postman_node21: + runs-on: ubuntu-latest + steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Set-up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + cache: false + + - name: Go Cache + uses: actions/cache@v4 + with: + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: postman-node-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - id: commit + uses: prompt/actions-commit-hash@v3 + + - name: Release + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: latest + args: release -f goreleaser_files/.goreleaser-docker-build-executor-postman-node21.yml --snapshot + env: + GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} + DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" + DOCKER_BUILDX_CACHE_FROM: "type=gha" + DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" + IMAGE_TAG_SHA: true + + - name: Push image to the Registry + run: | + docker push kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }}-arm64v8 + docker push kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }}-amd64 + + docker manifest create kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }} --amend kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }}-arm64v8 --amend kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }}-amd64 + docker manifest push -p kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }} + + workflow_dispatch: needs: [api, single_executor, executor_jmeter, executor_jmeterd, jmeterd_slave, executor_maven, executor_gradle, executor_cypress, executor_playwright] runs-on: ubuntu-latest diff --git a/.github/workflows/docker-build-release.yaml b/.github/workflows/docker-build-release.yaml index d5f8e6ae433..9a44eb91476 100644 --- a/.github/workflows/docker-build-release.yaml +++ b/.github/workflows/docker-build-release.yaml @@ -715,6 +715,69 @@ jobs: run: | docker push kubeshop/testkube-playwright-executor:${{ steps.commit.outputs.short }} + executor_postman_node21: + runs-on: ubuntu-latest + steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Set-up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + cache: false + + - name: Go Cache + uses: actions/cache@v4 + with: + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: postman-node-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - id: commit + uses: prompt/actions-commit-hash@v3 + + - name: Release + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: latest + args: release -f goreleaser_files/.goreleaser-docker-build-executor-postman-node21.yml --snapshot + env: + GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} + DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" + DOCKER_BUILDX_CACHE_FROM: "type=gha" + DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" + IMAGE_TAG_SHA: true + + - name: Push image to the Registry + run: | + docker push kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }}-arm64v8 + docker push kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }}-amd64 + + docker manifest create kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }} --amend kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }}-arm64v8 --amend kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }}-amd64 + docker manifest push -p kubeshop/testkube-postman-executor:node21-${{ steps.commit.outputs.short }} + workflow_dispatch: needs: [ api, single_executor, executor_jmeter, executor_jmeterd, jmeterd_slave, executor_maven, executor_gradle, executor_cypress, executor_playwright ] runs-on: ubuntu-latest diff --git a/README.md b/README.md index 0d6e5eefc67..ade5b2914df 100644 --- a/README.md +++ b/README.md @@ -110,5 +110,5 @@ Shout-out to our contributors 🎉 - you're great! Go to [contribution document](CONTRIBUTING.md) to read more how can you help us 🔥 # Feedback -Whether it helps you or not - we'd LOVE to hear from you. Please let us know what you think and of course, how we can make it better +Whether it helps you or not - we'd LOVE to hear from you. Please let us know what you think and of course, how we can make it better. Please join our growing community on [Slack](https://testkubeworkspace.slack.com/join/shared_invite/zt-2arhz5vmu-U2r3WZ69iPya5Fw0hMhRDg#/shared-invite/email) diff --git a/cmd/tcl/testworkflow-toolkit/artifacts/handler_test.go b/cmd/tcl/testworkflow-toolkit/artifacts/handler_test.go index a36ea4220b5..26e30dbd97b 100644 --- a/cmd/tcl/testworkflow-toolkit/artifacts/handler_test.go +++ b/cmd/tcl/testworkflow-toolkit/artifacts/handler_test.go @@ -36,11 +36,11 @@ func TestHandler_CloudUploader(t *testing.T) { setFilesystemExpectations := func(fs *filesystem.MockFileSystem) { fs. EXPECT(). - OpenFileRO("test.log"). + OpenFileRO("/test.log"). Return(filesystem.NewMockFile("test.log", []byte("test")), nil) fs. EXPECT(). - OpenFileRO("report/junit.xml"). + OpenFileRO("/report/junit.xml"). Return(filesystem.NewMockFile("report/junit.xml", []byte(testdata.BasicJUnit)), nil) } @@ -138,7 +138,7 @@ func TestHandler_CloudUploader(t *testing.T) { } var handlerOpts []HandlerOpts if tc.withJUnitPostProcessor { - pp := NewJUnitPostProcessor(mockFilesystem, mockExecutor) + pp := NewJUnitPostProcessor(mockFilesystem, mockExecutor, "/", "") handlerOpts = append(handlerOpts, WithPostProcessor(pp)) } handler := NewHandler(uploader, tc.processor, handlerOpts...) diff --git a/cmd/tcl/testworkflow-toolkit/artifacts/junit_post_processor.go b/cmd/tcl/testworkflow-toolkit/artifacts/junit_post_processor.go index 24f15e5cc0e..9357720d74a 100644 --- a/cmd/tcl/testworkflow-toolkit/artifacts/junit_post_processor.go +++ b/cmd/tcl/testworkflow-toolkit/artifacts/junit_post_processor.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "io/fs" + "path/filepath" "strings" "time" @@ -22,12 +23,14 @@ import ( // JUnitPostProcessor is a post-processor that checks XML files for JUnit reports and sends them to the cloud. type JUnitPostProcessor struct { - fs filesystem.FileSystem - client cloudexecutor.Executor + fs filesystem.FileSystem + client cloudexecutor.Executor + root string + pathPrefix string } -func NewJUnitPostProcessor(fs filesystem.FileSystem, client cloudexecutor.Executor) *JUnitPostProcessor { - return &JUnitPostProcessor{fs: fs, client: client} +func NewJUnitPostProcessor(fs filesystem.FileSystem, client cloudexecutor.Executor, root, pathPrefix string) *JUnitPostProcessor { + return &JUnitPostProcessor{fs: fs, client: client, root: root, pathPrefix: pathPrefix} } func (p *JUnitPostProcessor) Start() error { @@ -36,7 +39,15 @@ func (p *JUnitPostProcessor) Start() error { // Add checks if the file is a JUnit report and sends it to the cloud. func (p *JUnitPostProcessor) Add(path string) error { - file, err := p.fs.OpenFileRO(path) + uploadPath := path + if p.pathPrefix != "" { + uploadPath = filepath.Join(p.pathPrefix, uploadPath) + } + absPath := path + if !filepath.IsAbs(path) { + absPath = filepath.Join(p.root, absPath) + } + file, err := p.fs.OpenFileRO(absPath) if err != nil { return errors.Wrapf(err, "failed to open %s", path) } @@ -60,7 +71,7 @@ func (p *JUnitPostProcessor) Add(path string) error { return nil } fmt.Printf("Processing JUnit report: %s\n", ui.LightCyan(path)) - if err := p.sendJUnitReport(path, xmlData); err != nil { + if err := p.sendJUnitReport(uploadPath, xmlData); err != nil { return errors.Wrapf(err, "failed to send JUnit report %s", stat.Name()) } return nil @@ -68,13 +79,17 @@ func (p *JUnitPostProcessor) Add(path string) error { // sendJUnitReport sends the JUnit report to the Agent gRPC API. func (p *JUnitPostProcessor) sendJUnitReport(path string, report []byte) error { + // Apply path prefix correctly + if p.pathPrefix != "" { + path = filepath.Join(p.pathPrefix, path) + } ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) defer cancel() _, err := p.client.Execute(ctx, testworkflow.CmdTestWorkflowExecutionAddReport, &testworkflow.ExecutionsAddReportRequest{ ID: env.ExecutionId(), WorkflowName: env.WorkflowName(), WorkflowStep: env.Ref(), // TODO: think if it's valid for the parallel steps that have independent refs - Filepath: path, // TODO: adjust to support sub-paths from parallel execution? + Filepath: path, Report: report, }) return err diff --git a/cmd/tcl/testworkflow-toolkit/artifacts/junit_post_processor_test.go b/cmd/tcl/testworkflow-toolkit/artifacts/junit_post_processor_test.go index 238030e1279..ac707a90656 100644 --- a/cmd/tcl/testworkflow-toolkit/artifacts/junit_post_processor_test.go +++ b/cmd/tcl/testworkflow-toolkit/artifacts/junit_post_processor_test.go @@ -58,12 +58,12 @@ func TestJUnitPostProcessor_Add(t *testing.T) { for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { mockFS := filesystem.NewMockFileSystem(mockCtrl) - mockFS.EXPECT().OpenFileRO(tc.path).Return(tc.file, nil) + mockFS.EXPECT().OpenFileRO("/"+tc.path).Return(tc.file, nil) mockClient := executor.NewMockExecutor(mockCtrl) if tc.setup != nil { tc.setup(mockClient) } - pp := NewJUnitPostProcessor(mockFS, mockClient) + pp := NewJUnitPostProcessor(mockFS, mockClient, "/", "") err := pp.Add(tc.path) assert.Equal(t, tc.want, err) }) diff --git a/cmd/tcl/testworkflow-toolkit/commands/artifacts.go b/cmd/tcl/testworkflow-toolkit/commands/artifacts.go index 2a4c6e4595e..61e91681e11 100644 --- a/cmd/tcl/testworkflow-toolkit/commands/artifacts.go +++ b/cmd/tcl/testworkflow-toolkit/commands/artifacts.go @@ -121,7 +121,7 @@ func NewArtifactsCmd() *cobra.Command { defer executor.Close() if env.JUnitParserEnabled() || capabilities.Enabled(supported, capabilities.CapabilityJUnitReports) { - junitProcessor := artifacts.NewJUnitPostProcessor(filesystem.NewOSFileSystem(), executor) + junitProcessor := artifacts.NewJUnitPostProcessor(filesystem.NewOSFileSystem(), executor, walker.Root(), env.Config().Execution.FSPrefix) handlerOpts = append(handlerOpts, artifacts.WithPostProcessor(junitProcessor)) } if compress != "" { diff --git a/cmd/tcl/testworkflow-toolkit/commands/artifacts_test.go b/cmd/tcl/testworkflow-toolkit/commands/artifacts_test.go index 950bcbdb2b4..3552846a7b6 100644 --- a/cmd/tcl/testworkflow-toolkit/commands/artifacts_test.go +++ b/cmd/tcl/testworkflow-toolkit/commands/artifacts_test.go @@ -3,6 +3,7 @@ package commands import ( "embed" "encoding/json" + "io/fs" "net/http" "net/http/httptest" "testing" @@ -57,7 +58,15 @@ func TestRun_Integration(t *testing.T) { mockClient.EXPECT().Execute(gomock.Any(), artifact.CmdScraperPutObjectSignedURL, gomock.Any()).Return(mockResponseJson, nil).Times(2) mockClient.EXPECT().Execute(gomock.Any(), testworkflow.CmdTestWorkflowExecutionAddReport, gomock.Any()).Return(nil, nil) uploader := artifacts.NewCloudUploader(mockClient) - postProcessor := artifacts.NewJUnitPostProcessor(filesystem.NewOSFileSystem(), mockClient) + mockFs := filesystem.NewMockFileSystem(mockCtrl) + mockFs.EXPECT().OpenFileRO(gomock.Any()).AnyTimes().DoAndReturn(func(path string) (fs.File, error) { + b, err := testDataFixtures.ReadFile(path[1:]) + if err != nil { + return nil, err + } + return filesystem.NewMockFile(path[1:], b), nil + }) + postProcessor := artifacts.NewJUnitPostProcessor(mockFs, mockClient, "/", "") handler := artifacts.NewHandler(uploader, processor, artifacts.WithPostProcessor(postProcessor)) run(handler, walker, testDataFixtures) diff --git a/contrib/executor/postman/build/agent/Dockerfile.node21 b/contrib/executor/postman/build/agent/Dockerfile.node21 new file mode 100644 index 00000000000..49700653abf --- /dev/null +++ b/contrib/executor/postman/build/agent/Dockerfile.node21 @@ -0,0 +1,20 @@ +# syntax=docker/dockerfile:1 +FROM node:21-alpine3.19 + +COPY postman /bin/runner +RUN npm install -g newman +RUN apk --no-cache add ca-certificates git curl + +# support npm report permissions +RUN mkdir -p /.npm +RUN chmod 777 /.npm +RUN chmod 777 /root/ +RUN chmod 777 /usr/local/lib/node_modules +RUN chmod 777 /usr/local/bin + +WORKDIR /root/ +EXPOSE 8082 + +USER 1001 + +ENTRYPOINT ["/bin/runner"] \ No newline at end of file diff --git a/docs/docs/articles/install/quickstart-install.mdx b/docs/docs/articles/install/quickstart-install.mdx index 63119a6f993..48f7c9543b2 100644 --- a/docs/docs/articles/install/quickstart-install.mdx +++ b/docs/docs/articles/install/quickstart-install.mdx @@ -3,7 +3,7 @@ import TabItem from "@theme/TabItem"; # Testkube Quickstart -Following this quickstart tutorial provides you with a simplified On Prem installation that deploys both the control plane and agent within the same namespace. It comes with a preconfigured admin, organisation and environment. +Following this quickstart tutorial provides you with a simplified On Prem installation that deploys both the control plane and agent within the same namespace. It does not create Ingress configuration as its mainly designed for local installations that allow you to quickly try out and evaluate the solution. It comes with a preconfigured admin, organisation and environment. ## Prerequisites diff --git a/docs/docs/articles/test-workflow-templates.md b/docs/docs/articles/test-workflow-templates.md index cfb672d8958..05790775847 100644 --- a/docs/docs/articles/test-workflow-templates.md +++ b/docs/docs/articles/test-workflow-templates.md @@ -70,14 +70,13 @@ spec: cpu: 128m memory: 128Mi workingDir: /data/repo/test/k6/executor-tests + content: + git: + uri: https://github.com/kubeshop/testkube + revision: main + paths: + - test/k6/executor-tests/k6-smoke-test-without-envs.js steps: - - name: Checkout - content: - git: - uri: https://github.com/kubeshop/testkube - revision: main - paths: - - test/k6/executor-tests/k6-smoke-test-without-envs.js - name: Run from template workingDir: /data/repo/test/k6/executor-tests template: # template will be executed here diff --git a/go.mod b/go.mod index b2ba6f6e6c8..47e73be45cc 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/kelseyhightower/envconfig v1.4.0 github.com/kubepug/kubepug v1.7.1 - github.com/kubeshop/testkube-operator v1.17.41 + github.com/kubeshop/testkube-operator v1.15.2-beta1.0.20240520124846-07a4da84c97e github.com/minio/minio-go/v7 v7.0.47 github.com/montanaflynn/stats v0.6.6 github.com/moogar0880/problems v0.1.1 diff --git a/go.sum b/go.sum index 85d4be4177f..e9c479b74b2 100644 --- a/go.sum +++ b/go.sum @@ -366,8 +366,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kubepug/kubepug v1.7.1 h1:LKhfSxS8Y5mXs50v+3Lpyec+cogErDLcV7CMUuiaisw= github.com/kubepug/kubepug v1.7.1/go.mod h1:lv+HxD0oTFL7ZWjj0u6HKhMbbTIId3eG7aWIW0gyF8g= -github.com/kubeshop/testkube-operator v1.17.41 h1:fUmW4vJbED1X49HrGCilI0tP53a/UwTZGmiEJQrgcQo= -github.com/kubeshop/testkube-operator v1.17.41/go.mod h1:P47tw1nKQFufdsZndyq2HG2MSa0zK/lU0XpRfZtEmIk= +github.com/kubeshop/testkube-operator v1.15.2-beta1.0.20240520124846-07a4da84c97e h1:q6lJqg6BfZlvogXRhC4iuPlQsZ1gk9Ng8JkYALFL6kA= +github.com/kubeshop/testkube-operator v1.15.2-beta1.0.20240520124846-07a4da84c97e/go.mod h1:P47tw1nKQFufdsZndyq2HG2MSa0zK/lU0XpRfZtEmIk= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8LFgLN4= diff --git a/goreleaser_files/.goreleaser-docker-build-executor-postman-node21.yml b/goreleaser_files/.goreleaser-docker-build-executor-postman-node21.yml new file mode 100644 index 00000000000..488080a17bc --- /dev/null +++ b/goreleaser_files/.goreleaser-docker-build-executor-postman-node21.yml @@ -0,0 +1,92 @@ +env: + # Goreleaser always uses the docker buildx builder with name "default"; see + # https://github.com/goreleaser/goreleaser/pull/3199 + # To use a builder other than "default", set this variable. + # Necessary for, e.g., GitHub actions cache integration. + - DOCKER_REPO={{ if index .Env "DOCKER_REPO" }}{{ .Env.DOCKER_REPO }}{{ else }}kubeshop{{ end }} + - DOCKER_BUILDX_BUILDER={{ if index .Env "DOCKER_BUILDX_BUILDER" }}{{ .Env.DOCKER_BUILDX_BUILDER }}{{ else }}default{{ end }} + # Setup to enable Docker to use, e.g., the GitHub actions cache; see + # https://docs.docker.com/build/building/cache/backends/ + # https://github.com/moby/buildkit#export-cache + - DOCKER_BUILDX_CACHE_FROM={{ if index .Env "DOCKER_BUILDX_CACHE_FROM" }}{{ .Env.DOCKER_BUILDX_CACHE_FROM }}{{ else }}type=registry{{ end }} + - DOCKER_BUILDX_CACHE_TO={{ if index .Env "DOCKER_BUILDX_CACHE_TO" }}{{ .Env.DOCKER_BUILDX_CACHE_TO }}{{ else }}type=inline{{ end }} + # Build image with commit sha tag + - IMAGE_TAG_SHA={{ if index .Env "IMAGE_TAG_SHA" }}{{ .Env.IMAGE_TAG_SHA }}{{ else }}{{ end }} +builds: + - id: "linux" + main: "./contrib/executor/postman/cmd/agent" + binary: "postman" + env: + - CGO_ENABLED=0 + goos: + - linux + goarch: + - amd64 + - arm64 + mod_timestamp: "{{ .CommitTimestamp }}" +dockers: + - dockerfile: "./contrib/executor/postman/build/agent/Dockerfile.node21" + use: buildx + goos: linux + goarch: amd64 + image_templates: + - "{{ if not .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:{{ .Version }}-node21-amd64{{ end }}" + - "{{ if .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:node21-{{ .ShortCommit }}-amd64{{ end }}" + build_flag_templates: + - "--platform=linux/amd64" + - "--label=org.opencontainers.image.title={{ .ProjectName }}" + - "--label=org.opencontainers.image.created={{ .Date}}" + - "--label=org.opencontainers.image.revision={{ .FullCommit }}" + - "--label=org.opencontainers.image.version={{ .Version }}" + - "--builder={{ .Env.DOCKER_BUILDX_BUILDER }}" + - "--cache-to={{ .Env.DOCKER_BUILDX_CACHE_TO }}" + - "--cache-from={{ .Env.DOCKER_BUILDX_CACHE_FROM }}" + - "--build-arg=TOKEN={{ .Env.GITHUB_TOKEN }}" + - "--build-arg=ALPINE_IMAGE={{ .Env.ALPINE_IMAGE }}" + - "--build-arg=BUSYBOX_IMAGE={{ .Env.BUSYBOX_IMAGE }}" + + - dockerfile: "./contrib/executor/postman/build/agent/Dockerfile.node21" + use: buildx + goos: linux + goarch: arm64 + image_templates: + - "{{ if not .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:{{ .Version }}-node21-arm64v8{{ end }}" + - "{{ if .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:node21-{{ .ShortCommit }}-arm64v8{{ end }}" + build_flag_templates: + - "--platform=linux/arm64/v8" + - "--label=org.opencontainers.image.created={{ .Date }}" + - "--label=org.opencontainers.image.title={{ .ProjectName }}" + - "--label=org.opencontainers.image.revision={{ .FullCommit }}" + - "--label=org.opencontainers.image.version={{ .Version }}" + - "--builder={{ .Env.DOCKER_BUILDX_BUILDER }}" + - "--cache-to={{ .Env.DOCKER_BUILDX_CACHE_TO }}" + - "--cache-from={{ .Env.DOCKER_BUILDX_CACHE_FROM }}" + - "--build-arg=TOKEN={{ .Env.GITHUB_TOKEN }}" + - "--build-arg=ALPINE_IMAGE={{ .Env.ALPINE_IMAGE }}" + - "--build-arg=BUSYBOX_IMAGE={{ .Env.BUSYBOX_IMAGE }}" + +docker_manifests: + - name_template: "{{ if .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:node21-{{ .ShortCommit }}{{ end }}" + image_templates: + - "{{ if .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:node21-{{ .ShortCommit }}-arm64v8{{ end }}" + - "{{ if .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:node21-{{ .ShortCommit }}-amd64{{ end }}" + - name_template: "{{ if not .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:{{ .Version }}-node21{{ end }}" + image_templates: + - "{{ if not .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:{{ .Version }}-node21-amd64{{ end }}" + - "{{ if not .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:{{ .Version }}-node21-arm64v8{{ end }}" + - name_template: "{{ if not .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:node21{{ end }}" + image_templates: + - "{{ if not .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:{{ .Version }}-node21-amd64{{ end }}" + - "{{ if not .Env.IMAGE_TAG_SHA }}{{ .Env.DOCKER_REPO }}/testkube-postman-executor:{{ .Version }}-node21-arm64v8{{ end }}" + +release: + disable: true + +docker_signs: + - cmd: cosign + artifacts: all + output: true + args: + - 'sign' + - '${artifact}' + - "--yes" diff --git a/test/cypress/executor-tests/crd-workflow/smoke.yaml b/test/cypress/executor-tests/crd-workflow/smoke.yaml index 582d14ca7ad..2a0febaf431 100644 --- a/test/cypress/executor-tests/crd-workflow/smoke.yaml +++ b/test/cypress/executor-tests/crd-workflow/smoke.yaml @@ -293,7 +293,8 @@ spec: - '{"screenshotsFolder":"/data/artifacts/screenshots","videosFolder":"/data/artifacts/videos"}' - --reporter - junit - - --reporter-optionsmochaFile=/data/artifacts/junit/junit-[hash].xml,toConsole=false + - --reporter-options + - mochaFile=/data/artifacts/junit/junit-[hash].xml,toConsole=false env: - name: CYPRESS_CUSTOM_ENV value: CYPRESS_CUSTOM_ENV_value diff --git a/test/integration/crd-workflow/testkube-integration-tests.yaml b/test/integration/crd-workflow/testkube-integration-tests.yaml index a1874e084e7..58f1962154d 100644 --- a/test/integration/crd-workflow/testkube-integration-tests.yaml +++ b/test/integration/crd-workflow/testkube-integration-tests.yaml @@ -46,7 +46,7 @@ spec: volumes: - name: gocache hostPath: - path: /go-cache/{{ workflow.name }} + path: /tmp/go-cache-{{ workflow.name }} steps: - name: Run integration tests run: diff --git a/test/k6/executor-tests/crd-workflow/smoke.yaml b/test/k6/executor-tests/crd-workflow/smoke.yaml index 7a3bb4fb02c..81696c77fb0 100644 --- a/test/k6/executor-tests/crd-workflow/smoke.yaml +++ b/test/k6/executor-tests/crd-workflow/smoke.yaml @@ -50,15 +50,14 @@ spec: - name: K6_SYSTEM_ENV # currently only possible on this level value: K6_SYSTEM_ENV_value steps: - - name: Checkout + - name: Run from trait + workingDir: /data/repo/test/k6/executor-tests content: git: uri: https://github.com/kubeshop/testkube revision: main paths: - test/k6/executor-tests/k6-smoke-test.js - - name: Run from trait - workingDir: /data/repo/test/k6/executor-tests template: name: pre-official/k6 config: