Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
thbkrkr committed Jul 20, 2023
1 parent 57ee370 commit e11569d
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 130 deletions.
1 change: 1 addition & 0 deletions .buildkite/pipeline-release-helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ steps:
|| build.message == "release eck-operator dev helm charts"
|| build.message == "release eck-operator helm charts"
|| build.message == "release all helm charts"
|| true
depends_on:
- "build-helm-releaser-tool"
key: "eck-operator-dev-helm"
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipeline-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ steps:
if: | # merge-main or tags
( build.branch == "main" && build.source != "schedule" )
|| build.tag != null
|| true
command: buildkite-agent pipeline upload .buildkite/pipeline-release-helm.yml
env:
HELM_DRY_RUN: false
261 changes: 131 additions & 130 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,142 +1,143 @@
env:
VAULT_ROOT_PATH: secret/ci/elastic-cloud-on-k8s
ETIKDLIUB: "42"

steps:

- group: checks
steps:

- label: ":go: lint"
command: "make lint check-local-changes"
agents:
image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
cpu: "6"
memory: "6G"

- label: ":go: generate"
command: "make generate check-local-changes"
agents:
image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
cpu: "4"
memory: "2G"

- label: ":go: checks"
commands:
- "make check-license-header check-predicates shellcheck reattach-pv"
agents:
image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
cpu: "4"
memory: "2G"

- group: tests
steps:

- label: ":go: unit-tests"
command: "make unit-xml"
agents:
image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
cpu: "4"
memory: "4G"

- label: ":go: integration-tests"
command: "make integration-xml"
agents:
image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
cpu: "4"
memory: "4G"

- label: ":go: manifest-gen-tests"
command: "make manifest-gen-test"
agents:
image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
cpu: "4"
memory: "2G"

- label: ":go: helm-tests"
command: "make helm-test"
agents:
image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
cpu: "4"
memory: "2G"

# generate build steps with serverless-docker-builder

- group: build operator
key: "operator-image-build"
steps:
- label: ":buildkite:"
agents:
image: "docker.elastic.co/ci-agent-images/serverless-docker-builder:0.0.6"
commands: make -C /agent generate-docker-images
env:
DOCKER_REGISTRY_VAULT_PATH: secret/ci/elastic-cloud-on-k8s/docker-registry-elastic
PRE_BUILD_SCRIPT: ".buildkite/scripts/build/pre-build-operator.sh"
DRIVAH_BUILD_PATH: "build"
RECURSIVE: true

- group: build e2e-tests
key: "e2e-tests-image-build"
steps:
- label: ":buildkite:"
agents:
image: "docker.elastic.co/ci-agent-images/serverless-docker-builder:0.0.6"
commands: make -C /agent generate-docker-images
env:
DOCKER_REGISTRY_VAULT_PATH: secret/ci/elastic-cloud-on-k8s/docker-registry-elastic
DRIVAH_BUILD_PATH: "test/e2e"

# -- e2e-tests
# run the tests in an optimistic way without dependency with the images build
# step to run e2e-tests for PR are inlined for speed

# for commits in all branches (PR, release) except main
- label: ":buildkite:"
if: |
( build.branch != "main" )
&& build.env("GITHUB_PR_TRIGGER_COMMENT") !~ /^buildkite test this -[fm]/
&& ( build.message !~ /^buildkite test .*e2e.*/ || build.message !~ /^buildkite test .*release.*/ )
command: |
set -euo pipefail
.buildkite/scripts/build/set-images.sh
cd .buildkite/e2e/pipeline-gen && go build -o pipeline-gen
cat <<DEF | ./pipeline-gen | buildkite-agent pipeline upload
- label: "kind/TestSmoke"
fixed:
E2E_PROVIDER: kind
TESTS_MATCH: TestSmoke
E2E_TAGS: "e2e,mixed"
MONITORING_SECRETS: ""
E2E_SKIP_CLEANUP: true
DEF
agents:
image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
memory: "2G"

# for PR comment
- label: ":buildkite:"
if: build.env("GITHUB_PR_TRIGGER_COMMENT") =~ /^buildkite test this -[fm]/
command: |
set -euo pipefail
.buildkite/scripts/build/set-images.sh
cd .buildkite/e2e/pipeline-gen && go build -o pipeline-gen
$$(echo ./pipeline-gen $$GITHUB_PR_COMMENT_VAR_ARGS) \
| buildkite-agent pipeline upload
agents:
image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
memory: "2G"

# for the main branch (merge and nightly) and tags
- label: ":buildkite:"
command: buildkite-agent pipeline upload .buildkite/pipeline-e2e-tests.yml
agents:
image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
memory: "2G"
# - group: checks
# steps:

# - label: ":go: lint"
# command: "make lint check-local-changes"
# agents:
# image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
# cpu: "6"
# memory: "6G"

# - label: ":go: generate"
# command: "make generate check-local-changes"
# agents:
# image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
# cpu: "4"
# memory: "2G"

# - label: ":go: checks"
# commands:
# - "make check-license-header check-predicates shellcheck reattach-pv"
# agents:
# image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
# cpu: "4"
# memory: "2G"

# - group: tests
# steps:

# - label: ":go: unit-tests"
# command: "make unit-xml"
# agents:
# image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
# cpu: "4"
# memory: "4G"

# - label: ":go: integration-tests"
# command: "make integration-xml"
# agents:
# image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
# cpu: "4"
# memory: "4G"

# - label: ":go: manifest-gen-tests"
# command: "make manifest-gen-test"
# agents:
# image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
# cpu: "4"
# memory: "2G"

# - label: ":go: helm-tests"
# command: "make helm-test"
# agents:
# image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
# cpu: "4"
# memory: "2G"

# # generate build steps with serverless-docker-builder

# - group: build operator
# key: "operator-image-build"
# steps:
# - label: ":buildkite:"
# agents:
# image: "docker.elastic.co/ci-agent-images/serverless-docker-builder:0.0.6"
# commands: make -C /agent generate-docker-images
# env:
# DOCKER_REGISTRY_VAULT_PATH: secret/ci/elastic-cloud-on-k8s/docker-registry-elastic
# PRE_BUILD_SCRIPT: ".buildkite/scripts/build/pre-build-operator.sh"
# DRIVAH_BUILD_PATH: "build"
# RECURSIVE: true

# - group: build e2e-tests
# key: "e2e-tests-image-build"
# steps:
# - label: ":buildkite:"
# agents:
# image: "docker.elastic.co/ci-agent-images/serverless-docker-builder:0.0.6"
# commands: make -C /agent generate-docker-images
# env:
# DOCKER_REGISTRY_VAULT_PATH: secret/ci/elastic-cloud-on-k8s/docker-registry-elastic
# DRIVAH_BUILD_PATH: "test/e2e"

# # -- e2e-tests
# # run the tests in an optimistic way without dependency with the images build
# # step to run e2e-tests for PR are inlined for speed

# # for commits in all branches (PR, release) except main
# - label: ":buildkite:"
# if: |
# ( build.branch != "main" )
# && build.env("GITHUB_PR_TRIGGER_COMMENT") !~ /^buildkite test this -[fm]/
# && ( build.message !~ /^buildkite test .*e2e.*/ || build.message !~ /^buildkite test .*release.*/ )
# command: |
# set -euo pipefail
# .buildkite/scripts/build/set-images.sh
# cd .buildkite/e2e/pipeline-gen && go build -o pipeline-gen
# cat <<DEF | ./pipeline-gen | buildkite-agent pipeline upload
# - label: "kind/TestSmoke"
# fixed:
# E2E_PROVIDER: kind
# TESTS_MATCH: TestSmoke
# E2E_TAGS: "e2e,mixed"
# MONITORING_SECRETS: ""
# E2E_SKIP_CLEANUP: true
# DEF
# agents:
# image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
# memory: "2G"

# # for PR comment
# - label: ":buildkite:"
# if: build.env("GITHUB_PR_TRIGGER_COMMENT") =~ /^buildkite test this -[fm]/
# command: |
# set -euo pipefail
# .buildkite/scripts/build/set-images.sh
# cd .buildkite/e2e/pipeline-gen && go build -o pipeline-gen
# $$(echo ./pipeline-gen $$GITHUB_PR_COMMENT_VAR_ARGS) \
# | buildkite-agent pipeline upload
# agents:
# image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
# memory: "2G"

# # for the main branch (merge and nightly) and tags
# - label: ":buildkite:"
# command: buildkite-agent pipeline upload .buildkite/pipeline-e2e-tests.yml
# agents:
# image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
# memory: "2G"

# ----------

- label: ":buildkite:"
depends_on:
- "operator-image-build"
# depends_on:
# - "operator-image-build"
command: buildkite-agent pipeline upload .buildkite/pipeline-release.yml
agents:
image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:abaeba8c
Expand Down

0 comments on commit e11569d

Please sign in to comment.