instana 1.217.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/instana/base.rb +4 -2
- data/lib/instana/instrumentation/action_cable.rb +8 -4
- data/lib/instana/instrumentation/action_controller.rb +2 -4
- data/lib/instana/instrumentation/action_mailer.rb +1 -1
- data/lib/instana/instrumentation/action_view.rb +4 -4
- data/lib/instana/instrumentation/active_job.rb +20 -5
- data/lib/instana/instrumentation/active_record.rb +1 -1
- data/lib/instana/instrumentation/aws_sdk_dynamodb.rb +1 -1
- data/lib/instana/instrumentation/aws_sdk_lambda.rb +1 -1
- data/lib/instana/instrumentation/aws_sdk_s3.rb +1 -1
- data/lib/instana/instrumentation/aws_sdk_sns.rb +1 -1
- data/lib/instana/instrumentation/aws_sdk_sqs.rb +1 -1
- data/lib/instana/instrumentation/dalli.rb +1 -1
- data/lib/instana/instrumentation/excon.rb +2 -2
- data/lib/instana/instrumentation/graphql.rb +3 -3
- data/lib/instana/instrumentation/grpc.rb +14 -13
- data/lib/instana/instrumentation/mongo.rb +3 -3
- data/lib/instana/instrumentation/net-http.rb +5 -4
- data/lib/instana/instrumentation/rack.rb +36 -4
- data/lib/instana/instrumentation/redis.rb +1 -1
- data/lib/instana/instrumentation/resque.rb +10 -8
- data/lib/instana/instrumentation/rest-client.rb +4 -4
- data/lib/instana/instrumentation/sequel.rb +3 -3
- data/lib/instana/instrumentation/shoryuken.rb +4 -1
- data/lib/instana/instrumentation/sidekiq-client.rb +21 -19
- data/lib/instana/instrumentation/sidekiq-worker.rb +22 -21
- data/lib/instana/instrumented_logger.rb +1 -1
- data/lib/instana/samplers/result.rb +32 -0
- data/lib/instana/samplers/samplers.rb +76 -0
- data/lib/instana/serverless.rb +4 -2
- data/lib/instana/setup.rb +5 -5
- data/lib/instana/span_filtering/condition.rb +134 -0
- data/lib/instana/span_filtering/configuration.rb +262 -0
- data/lib/instana/span_filtering/filter_rule.rb +31 -0
- data/lib/instana/span_filtering.rb +62 -0
- data/lib/instana/trace/export.rb +36 -0
- data/lib/instana/{tracing → trace}/processor.rb +19 -15
- data/lib/instana/trace/span.rb +534 -0
- data/lib/instana/{tracing → trace}/span_context.rb +17 -8
- data/lib/instana/trace/span_kind.rb +51 -0
- data/lib/instana/trace/span_limits.rb +63 -0
- data/lib/instana/{tracer.rb → trace/tracer.rb} +106 -54
- data/lib/instana/trace/tracer_provider.rb +198 -0
- data/lib/instana/trace.rb +74 -0
- data/lib/instana/util.rb +11 -0
- data/lib/instana/version.rb +1 -1
- metadata +89 -267
- data/.circleci/config.yml +0 -485
- data/.codeclimate.yml +0 -23
- data/.editorconfig +0 -10
- data/.fasterer.yml +0 -23
- data/.github/ISSUE_TEMPLATE/bug.yml +0 -39
- data/.github/ISSUE_TEMPLATE/config.yml +0 -8
- data/.github/workflows/pr_commits_signed_off.yml +0 -16
- data/.github/workflows/release-notification-on-slack.yml +0 -34
- data/.gitignore +0 -19
- data/.rubocop.yml +0 -34
- data/.rubocop_todo.yml +0 -1140
- data/.tekton/.currency/docs/report.md +0 -20
- data/.tekton/.currency/resources/requirements.txt +0 -4
- data/.tekton/.currency/resources/table.json +0 -100
- data/.tekton/.currency/scripts/generate_report.py +0 -136
- data/.tekton/README.md +0 -278
- data/.tekton/github-interceptor-secret.yaml +0 -8
- data/.tekton/github-pr-eventlistener.yaml +0 -104
- data/.tekton/github-pr-pipeline.yaml.part +0 -38
- data/.tekton/github-set-status-task.yaml +0 -43
- data/.tekton/github-webhook-ingress.yaml +0 -20
- data/.tekton/pipeline.yaml +0 -571
- data/.tekton/pipelinerun.yaml +0 -21
- data/.tekton/ruby-tracer-prepuller.yaml +0 -87
- data/.tekton/run_unittests.sh +0 -87
- data/.tekton/scheduled-eventlistener.yaml +0 -108
- data/.tekton/task.yaml +0 -449
- data/.tekton/tekton-triggers-eventlistener-serviceaccount.yaml +0 -29
- data/Appraisals +0 -124
- data/CONTRIBUTING.md +0 -86
- data/Gemfile +0 -17
- data/LICENSE +0 -22
- data/MAINTAINERS.md +0 -3
- data/Rakefile +0 -49
- data/bin/announce_release_on_slack.py +0 -103
- data/docker-compose.yml +0 -20
- data/download.sh +0 -85
- data/examples/opentracing.rb +0 -35
- data/examples/tracing.rb +0 -84
- data/extras/license_header.rb +0 -44
- data/gemfiles/.bundle/config +0 -2
- data/gemfiles/aws_30.gemfile +0 -21
- data/gemfiles/aws_60.gemfile +0 -16
- data/gemfiles/cuba_30.gemfile +0 -16
- data/gemfiles/cuba_40.gemfile +0 -13
- data/gemfiles/dalli_20.gemfile +0 -15
- data/gemfiles/dalli_30.gemfile +0 -12
- data/gemfiles/dalli_32.gemfile +0 -12
- data/gemfiles/excon_0100.gemfile +0 -14
- data/gemfiles/excon_021.gemfile +0 -17
- data/gemfiles/excon_079.gemfile +0 -17
- data/gemfiles/excon_100.gemfile +0 -14
- data/gemfiles/graphql_10.gemfile +0 -16
- data/gemfiles/graphql_20.gemfile +0 -15
- data/gemfiles/grpc_10.gemfile +0 -15
- data/gemfiles/mongo_216.gemfile +0 -15
- data/gemfiles/mongo_219.gemfile +0 -12
- data/gemfiles/net_http_01.gemfile +0 -17
- data/gemfiles/rack_16.gemfile +0 -15
- data/gemfiles/rack_20.gemfile +0 -15
- data/gemfiles/rack_30.gemfile +0 -13
- data/gemfiles/rails_42.gemfile +0 -18
- data/gemfiles/rails_50.gemfile +0 -19
- data/gemfiles/rails_52.gemfile +0 -19
- data/gemfiles/rails_60.gemfile +0 -19
- data/gemfiles/rails_61.gemfile +0 -20
- data/gemfiles/rails_70.gemfile +0 -17
- data/gemfiles/rails_71.gemfile +0 -17
- data/gemfiles/rails_80.gemfile +0 -17
- data/gemfiles/redis_40.gemfile +0 -15
- data/gemfiles/redis_50.gemfile +0 -13
- data/gemfiles/redis_51.gemfile +0 -13
- data/gemfiles/resque_122.gemfile +0 -16
- data/gemfiles/resque_1274_3scale.gemfile +0 -17
- data/gemfiles/resque_20.gemfile +0 -16
- data/gemfiles/rest_client_16.gemfile +0 -17
- data/gemfiles/rest_client_20.gemfile +0 -17
- data/gemfiles/roda_20.gemfile +0 -16
- data/gemfiles/roda_30.gemfile +0 -16
- data/gemfiles/rubocop_162.gemfile +0 -6
- data/gemfiles/sequel_56.gemfile +0 -16
- data/gemfiles/sequel_57.gemfile +0 -16
- data/gemfiles/sequel_58.gemfile +0 -16
- data/gemfiles/shoryuken_50.gemfile +0 -16
- data/gemfiles/shoryuken_60.gemfile +0 -13
- data/gemfiles/sidekiq_42.gemfile +0 -15
- data/gemfiles/sidekiq_50.gemfile +0 -15
- data/gemfiles/sidekiq_60.gemfile +0 -12
- data/gemfiles/sidekiq_65.gemfile +0 -12
- data/gemfiles/sidekiq_70.gemfile +0 -12
- data/gemfiles/sinatra_14.gemfile +0 -15
- data/gemfiles/sinatra_22.gemfile +0 -12
- data/gemfiles/sinatra_30.gemfile +0 -12
- data/gemfiles/sinatra_40.gemfile +0 -12
- data/instana.gemspec +0 -48
- data/lib/instana/open_tracing/carrier.rb +0 -7
- data/lib/instana/open_tracing/instana_tracer.rb +0 -99
- data/lib/instana/tracing/span.rb +0 -431
- data/lib/opentracing.rb +0 -32
- data/log/.keep +0 -0
- data/sonar-project.properties +0 -9
- data/test/activator_test.rb +0 -50
- data/test/backend/agent_test.rb +0 -80
- data/test/backend/gc_snapshot_test.rb +0 -11
- data/test/backend/host_agent_activation_observer_test.rb +0 -73
- data/test/backend/host_agent_lookup_test.rb +0 -78
- data/test/backend/host_agent_reporting_observer_test.rb +0 -276
- data/test/backend/host_agent_test.rb +0 -89
- data/test/backend/process_info_test.rb +0 -83
- data/test/backend/request_client_test.rb +0 -39
- data/test/backend/serverless_agent_test.rb +0 -83
- data/test/benchmarks/bench_id_generation.rb +0 -15
- data/test/benchmarks/bench_opentracing.rb +0 -16
- data/test/config_test.rb +0 -34
- data/test/frameworks/cuba_test.rb +0 -61
- data/test/frameworks/roda_test.rb +0 -60
- data/test/frameworks/sinatra_test.rb +0 -71
- data/test/instana_test.rb +0 -37
- data/test/instrumentation/aws_test.rb +0 -241
- data/test/instrumentation/dalli_test.rb +0 -325
- data/test/instrumentation/excon_test.rb +0 -204
- data/test/instrumentation/graphql_test.rb +0 -289
- data/test/instrumentation/grpc_test.rb +0 -420
- data/test/instrumentation/mongo_test.rb +0 -68
- data/test/instrumentation/net_http_test.rb +0 -220
- data/test/instrumentation/rack_instrumented_request_test.rb +0 -211
- data/test/instrumentation/rack_test.rb +0 -415
- data/test/instrumentation/rails_action_cable_test.rb +0 -135
- data/test/instrumentation/rails_action_controller_test.rb +0 -218
- data/test/instrumentation/rails_action_mailer_test.rb +0 -66
- data/test/instrumentation/rails_action_view_test.rb +0 -154
- data/test/instrumentation/rails_active_job_test.rb +0 -65
- data/test/instrumentation/rails_active_record_database_missing_test.rb +0 -45
- data/test/instrumentation/rails_active_record_test.rb +0 -115
- data/test/instrumentation/redis_test.rb +0 -152
- data/test/instrumentation/resque_test.rb +0 -188
- data/test/instrumentation/rest_client_test.rb +0 -107
- data/test/instrumentation/sequel_test.rb +0 -105
- data/test/instrumentation/shoryuken_test.rb +0 -47
- data/test/instrumentation/sidekiq-client_test.rb +0 -169
- data/test/instrumentation/sidekiq-worker_test.rb +0 -180
- data/test/secrets_test.rb +0 -112
- data/test/serverless_test.rb +0 -369
- data/test/snapshot/deltable_test.rb +0 -17
- data/test/snapshot/docker_container_test.rb +0 -82
- data/test/snapshot/fargate_container_test.rb +0 -82
- data/test/snapshot/fargate_process_test.rb +0 -35
- data/test/snapshot/fargate_task_test.rb +0 -49
- data/test/snapshot/google_cloud_run_instance_test.rb +0 -74
- data/test/snapshot/google_cloud_run_process_test.rb +0 -33
- data/test/snapshot/lambda_function_test.rb +0 -37
- data/test/snapshot/ruby_process_test.rb +0 -32
- data/test/support/apps/active_record/active_record.rb +0 -24
- data/test/support/apps/grpc/boot.rb +0 -23
- data/test/support/apps/grpc/grpc_server.rb +0 -84
- data/test/support/apps/http_endpoint/boot.rb +0 -28
- data/test/support/apps/rails/boot.rb +0 -219
- data/test/support/apps/rails/models/block.rb +0 -21
- data/test/support/apps/rails/models/block6.rb +0 -21
- data/test/support/apps/resque/boot.rb +0 -5
- data/test/support/apps/resque/jobs/resque_error_job.rb +0 -22
- data/test/support/apps/resque/jobs/resque_fast_job.rb +0 -23
- data/test/support/apps/sidekiq/boot.rb +0 -25
- data/test/support/apps/sidekiq/jobs/sidekiq_job_1.rb +0 -9
- data/test/support/apps/sidekiq/jobs/sidekiq_job_2.rb +0 -10
- data/test/support/apps/sidekiq/worker.rb +0 -37
- data/test/support/helpers.rb +0 -85
- data/test/support/mock_timer.rb +0 -20
- data/test/test_helper.rb +0 -69
- data/test/tracing/custom_test.rb +0 -226
- data/test/tracing/id_management_test.rb +0 -80
- data/test/tracing/instrumented_logger_test.rb +0 -39
- data/test/tracing/opentracing_test.rb +0 -382
- data/test/tracing/processor_test.rb +0 -58
- data/test/tracing/span_context_test.rb +0 -22
- data/test/tracing/span_test.rb +0 -179
- data/test/tracing/tracer_async_test.rb +0 -230
- data/test/tracing/tracer_test.rb +0 -352
- data/test/util_test.rb +0 -10
@@ -1,87 +0,0 @@
|
|
1
|
-
apiVersion: apps/v1
|
2
|
-
kind: DaemonSet
|
3
|
-
metadata:
|
4
|
-
name: ruby-tracer-prepuller
|
5
|
-
spec:
|
6
|
-
selector:
|
7
|
-
matchLabels:
|
8
|
-
name: ruby-tracer-prepuller
|
9
|
-
template:
|
10
|
-
metadata:
|
11
|
-
labels:
|
12
|
-
name: ruby-tracer-prepuller
|
13
|
-
spec:
|
14
|
-
# Configure an init container for each image you want to pull
|
15
|
-
initContainers:
|
16
|
-
- name: prepuller-git
|
17
|
-
# alpine/git:2.43.0
|
18
|
-
image: alpine/git@sha256:6ff4de047dcc8f0c7d75d2efff63fbc189e87d2f458305f2cc8f165ff83309cf
|
19
|
-
command: ["sh", "-c", "'true'"]
|
20
|
-
- name: prepuller-dynamodb
|
21
|
-
# amazon/dynamodb-local:2.3.0
|
22
|
-
image: amazon/dynamodb-local@sha256:0e42a967205042118277be031a59f7aa035c2f90b1695b1b3250d0ce03a7c8f0
|
23
|
-
command: ["sh", "-c", "'true'"]
|
24
|
-
- name: prepuller-s3
|
25
|
-
# minio/minio:RELEASE.2024-03-07T00-43-48Z
|
26
|
-
image: minio/minio@sha256:9224601c529f424e5efac79f95606f0c7e1fe234f3f45344a49deaccd66d5bf5
|
27
|
-
command: ["sh", "-c", "'true'"]
|
28
|
-
- name: prepuller-sns
|
29
|
-
# s12v/sns:latest
|
30
|
-
image: s12v/sns@sha256:a80f1cd6318d22419cab38650ee6824f72cc2dc902d2b38e4f997d0530fe4e07
|
31
|
-
command: ["sh", "-c", "'true'"]
|
32
|
-
- name: prepuller-sqs
|
33
|
-
# softwaremill/elasticmq-native:1.5.7
|
34
|
-
image: softwaremill/elasticmq-native@sha256:9183333a9ea4666686c37dc83a2b1f8cee9c15ffd161a219a131e171039f1ac3
|
35
|
-
command: ["sh", "-c", "'true'"]
|
36
|
-
- name: prepuller-memcached
|
37
|
-
# memcached:1.6.24-bookworm
|
38
|
-
image: memcached@sha256:b2b562323463b6cda240a148fb2a5b7ea86e8017a8509e10a3c7f1681f259193
|
39
|
-
command: ["sh", "-c", "'true'"]
|
40
|
-
- name: prepuller-redis
|
41
|
-
# redis:7.2.4-bookworm
|
42
|
-
image: redis@sha256:fe98b2d39d462d06a7360e2860dd6ceff930745e3731eccb3c1406dd0dd7f744
|
43
|
-
command: ["sh", "-c", "'true'"]
|
44
|
-
- name: prepuller-mongo
|
45
|
-
# mongo:5.0.25-focal
|
46
|
-
image: mongo@sha256:d1b8a7b77424347397653ab8ff500c66b1e9979b4cebf826951d37b0d3966721
|
47
|
-
command: ["sh", "-c", "'true'"]
|
48
|
-
- name: prepuller-mariadb
|
49
|
-
# mariadb:11.3.2
|
50
|
-
image: mariadb@sha256:851f05fe1e4cb290442c1b12b7108436a33fd8f6a733d4989950322d06d45c65
|
51
|
-
command: ["sh", "-c", "'true'"]
|
52
|
-
- name: prepuller-postgres
|
53
|
-
# postgres:16.2-bookworm
|
54
|
-
image: postgres@sha256:6b841c8f6a819884207402f1209a8116844365df15fca8cf556fc54a24c70800
|
55
|
-
command: ["sh", "-c", "'true'"]
|
56
|
-
- name: prepuller-30
|
57
|
-
# 3.0.6-bullseye
|
58
|
-
image: ruby@sha256:3166618469ad8a3190d80f43b322818fafb4bfac0b4882255eee3346af2a0a35
|
59
|
-
command: ["sh", "-c", "'true'"]
|
60
|
-
- name: prepuller-31
|
61
|
-
# 3.1.4-bookworm
|
62
|
-
image: ruby@sha256:ec69284bcbceb0a23ffc070ef2e0e8eb0fe495c20efbd51846b103338c3da1e4
|
63
|
-
command: ["sh", "-c", "'true'"]
|
64
|
-
- name: prepuller-32
|
65
|
-
# 3.2.3-bookworm
|
66
|
-
image: ruby@sha256:007d2edd515f9cfc8c5c571486aca4fc4a25c903d004decee302961bb8c636ed
|
67
|
-
command: ["sh", "-c", "'true'"]
|
68
|
-
- name: prepuller-33
|
69
|
-
# 3.3.1-bookworm
|
70
|
-
image: ruby@sha256:5cf0004738f54bd67e4c4316394208ca38a6726eda7a1b0586d95601aad86e5d
|
71
|
-
command: ["sh", "-c", "'true'"]
|
72
|
-
- name: prepuller-34
|
73
|
-
# 3.4.0-preview1-bookworm
|
74
|
-
image: ruby@sha256:2690af2a931469abe513b22a083b5ae0b56d4feffc0d3496eb6378723ab203e7
|
75
|
-
command: ["sh", "-c", "'true'"]
|
76
|
-
# Use the pause container to ensure the Pod goes into a `Running` phase
|
77
|
-
# but doesn't take up resource on the cluster
|
78
|
-
containers:
|
79
|
-
- name: pause
|
80
|
-
image: gcr.io/google_containers/pause:3.2
|
81
|
-
resources:
|
82
|
-
limits:
|
83
|
-
cpu: 1m
|
84
|
-
memory: 8Mi
|
85
|
-
requests:
|
86
|
-
cpu: 1m
|
87
|
-
memory: 8Mi
|
data/.tekton/run_unittests.sh
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
set -e
|
3
|
-
|
4
|
-
if [[ -z "${TEST_CONFIGURATION}" ]]; then
|
5
|
-
echo "The TEST_CONFIGURATION environment variable is missing." >&2
|
6
|
-
echo "This should have been provided by the Tekton Task or the developer" >&2
|
7
|
-
exit 1
|
8
|
-
fi
|
9
|
-
|
10
|
-
if [[ -z "${BUNDLE_GEMFILE}" ]]; then
|
11
|
-
echo "The BUNDLE_GEMFILE environment variable is missing." >&2
|
12
|
-
echo "This should have been provided by the Tekton Task or the developer" >&2
|
13
|
-
exit 2
|
14
|
-
fi
|
15
|
-
|
16
|
-
if [[ -z "${RUBY_VERSION}" ]]; then
|
17
|
-
echo "The RUBY_VERSION environment variable is missing." >&2
|
18
|
-
echo "This is a built-in variable in the official ruby container images" >&2
|
19
|
-
exit 3
|
20
|
-
fi
|
21
|
-
|
22
|
-
case "${TEST_CONFIGURATION}" in
|
23
|
-
libraries)
|
24
|
-
export TEST_SETUP="$(basename ${BUNDLE_GEMFILE%.gemfile})_ruby_${RUBY_VERSION}"
|
25
|
-
export APPRAISAL_INITIALIZED=1 ;;
|
26
|
-
rails)
|
27
|
-
if [[ -z "${DATABASE_URL}" ]]; then
|
28
|
-
echo -n "The TEST_CONFIGURATION is set to ${TEST_CONFIGURATION}. " >&2
|
29
|
-
echo "But the DATABASE_URL environment variable is missing." >&2
|
30
|
-
exit 4
|
31
|
-
else
|
32
|
-
echo "DATABASE_URL is '${DATABASE_URL}'"
|
33
|
-
fi
|
34
|
-
export TEST_SETUP="$(basename ${BUNDLE_GEMFILE%.gemfile})_${DATABASE_URL%:[:/]*}_ruby_${RUBY_VERSION}"
|
35
|
-
export APPRAISAL_INITIALIZED=1 ;;
|
36
|
-
core)
|
37
|
-
export TEST_SETUP="core_ruby_${RUBY_VERSION}" ;;
|
38
|
-
lint)
|
39
|
-
export TEST_SETUP="lint_ruby_${RUBY_VERSION}" ;;
|
40
|
-
*)
|
41
|
-
echo "ERROR \$TEST_CONFIGURATION='${TEST_CONFIGURATION}' is unsupported " \
|
42
|
-
"not in (libraries|rails|core|lint)" >&2
|
43
|
-
exit 5 ;;
|
44
|
-
esac
|
45
|
-
|
46
|
-
export COVERAGE_PATH="cov_${TEST_SETUP}"
|
47
|
-
export DEPENDENCY_PATH="dep_${TEST_SETUP}"
|
48
|
-
|
49
|
-
echo -n "Configuration is '${TEST_CONFIGURATION}' on Ruby ${RUBY_VERSION} "
|
50
|
-
echo "with dependencies in '${BUNDLE_GEMFILE}'"
|
51
|
-
|
52
|
-
# The gemfiles folder is under the tekton shared workspace
|
53
|
-
# but we have to prevent the sharing, and the concurrent writing
|
54
|
-
# of the gemfiles/*.lock files
|
55
|
-
# so here we create a container-local, non-shared copy, of the sources and use that.
|
56
|
-
cp --recursive ../ruby-sensor/ /tmp/
|
57
|
-
pushd /tmp/ruby-sensor/
|
58
|
-
|
59
|
-
# Update RubyGems
|
60
|
-
while ! gem update --system > /dev/null; do
|
61
|
-
echo "Updating Gem with 'gem update --system' failed, retrying in a minute"
|
62
|
-
sleep 60
|
63
|
-
done
|
64
|
-
echo "Gem version $(gem --version)"
|
65
|
-
|
66
|
-
# Configure Bundler
|
67
|
-
bundler --version
|
68
|
-
bundle config set path '/tmp/vendor/bundle'
|
69
|
-
|
70
|
-
# Install Dependencies
|
71
|
-
while ! (bundle check || bundle install) | tee "${DEPENDENCY_PATH}"; do
|
72
|
-
echo "Bundle install failed, retrying in a minute"
|
73
|
-
sleep 60
|
74
|
-
done
|
75
|
-
|
76
|
-
# Run tests
|
77
|
-
if [[ "${TEST_CONFIGURATION}" = "lint" ]]; then
|
78
|
-
bundle exec rubocop
|
79
|
-
else
|
80
|
-
mkdir --parents "${COVERAGE_PATH}/_junit"
|
81
|
-
bundle exec rake
|
82
|
-
cp --recursive "${COVERAGE_PATH}" "${OLDPWD}/"
|
83
|
-
fi
|
84
|
-
|
85
|
-
# Put back the dependency insallation results to the shared workspace
|
86
|
-
cp --recursive "${DEPENDENCY_PATH}" "${OLDPWD}/"
|
87
|
-
popd
|
@@ -1,108 +0,0 @@
|
|
1
|
-
apiVersion: triggers.tekton.dev/v1beta1
|
2
|
-
kind: TriggerTemplate
|
3
|
-
metadata:
|
4
|
-
name: ruby-tracer-scheduled-ci-pipeline-template
|
5
|
-
spec:
|
6
|
-
params:
|
7
|
-
- description: The ISO-8601 date and time converted to RFC 1123 subdomain names
|
8
|
-
name: date-time-normalized
|
9
|
-
- description: The full sha of the git commit
|
10
|
-
name: git-commit-sha
|
11
|
-
- description: The short 7 digit sha of the git commit
|
12
|
-
name: git-commit-short-sha
|
13
|
-
resourcetemplates:
|
14
|
-
- apiVersion: tekton.dev/v1
|
15
|
-
kind: PipelineRun
|
16
|
-
metadata:
|
17
|
-
# After variable resolution, this has to be maximum 63 character long,
|
18
|
-
# lower case, RFC 1123 subdomain name. The regex used for validation is
|
19
|
-
# '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
|
20
|
-
name: ruby-tracer-scheduled-ci-pipeline-$(tt.params.date-time-normalized)-$(tt.params.git-commit-short-sha)
|
21
|
-
spec:
|
22
|
-
timeouts:
|
23
|
-
pipeline: "2h"
|
24
|
-
params:
|
25
|
-
- name: revision
|
26
|
-
value: master
|
27
|
-
pipelineRef:
|
28
|
-
name: ruby-tracer-ci-pipeline
|
29
|
-
workspaces:
|
30
|
-
- name: ruby-tracer-ci-pipeline-pvc
|
31
|
-
volumeClaimTemplate:
|
32
|
-
spec:
|
33
|
-
accessModes:
|
34
|
-
- ReadWriteOnce
|
35
|
-
resources:
|
36
|
-
requests:
|
37
|
-
storage: 200Mi
|
38
|
-
---
|
39
|
-
apiVersion: triggers.tekton.dev/v1beta1
|
40
|
-
kind: TriggerBinding
|
41
|
-
metadata:
|
42
|
-
name: ruby-tracer-scheduled-binding
|
43
|
-
spec:
|
44
|
-
params:
|
45
|
-
- name: date-time-normalized
|
46
|
-
value: $(extensions.normalized_date_time)
|
47
|
-
- name: git-commit-sha
|
48
|
-
value: $(body.git_master_head_commit_sha)
|
49
|
-
- name: git-commit-short-sha
|
50
|
-
value: $(extensions.truncated_sha)
|
51
|
-
---
|
52
|
-
apiVersion: batch/v1
|
53
|
-
kind: CronJob
|
54
|
-
metadata:
|
55
|
-
name: ruby-tracer-scheduled-ci-cronjob
|
56
|
-
spec:
|
57
|
-
schedule: "5 1 * * Mon-Fri"
|
58
|
-
jobTemplate:
|
59
|
-
spec:
|
60
|
-
template:
|
61
|
-
spec:
|
62
|
-
containers:
|
63
|
-
- name: git
|
64
|
-
# alpine/git:2.43.0
|
65
|
-
image: alpine/git@sha256:6ff4de047dcc8f0c7d75d2efff63fbc189e87d2f458305f2cc8f165ff83309cf
|
66
|
-
command:
|
67
|
-
- sh
|
68
|
-
- -c
|
69
|
-
- |
|
70
|
-
wget -O- \
|
71
|
-
--header 'Content-Type: application/json' \
|
72
|
-
--post-data '{
|
73
|
-
"git_master_head_commit_sha":"'"$(git ls-remote https://github.com/instana/ruby-sensor master | cut -f1)"'",
|
74
|
-
"date_time":"'"$(date -u -Iminutes )"'"
|
75
|
-
}' \
|
76
|
-
'http://el-ruby-tracer-scheduled-pipeline-listener.default.svc.cluster.local:8080'
|
77
|
-
restartPolicy: OnFailure
|
78
|
-
---
|
79
|
-
apiVersion: triggers.tekton.dev/v1beta1
|
80
|
-
kind: EventListener
|
81
|
-
metadata:
|
82
|
-
name: ruby-tracer-scheduled-pipeline-listener
|
83
|
-
spec:
|
84
|
-
serviceAccountName: tekton-triggers-eventlistener-serviceaccount
|
85
|
-
triggers:
|
86
|
-
- name: ruby-tracer-scheduled-pipeline-triggger
|
87
|
-
interceptors:
|
88
|
-
- name: add-truncated-sha
|
89
|
-
ref:
|
90
|
-
name: "cel"
|
91
|
-
params:
|
92
|
-
- name: "overlays"
|
93
|
-
value:
|
94
|
-
- key: truncated_sha
|
95
|
-
expression: "body.git_master_head_commit_sha.truncate(7)"
|
96
|
-
- name: add-normalized-date-time
|
97
|
-
ref:
|
98
|
-
name: "cel"
|
99
|
-
params:
|
100
|
-
- name: "overlays"
|
101
|
-
value:
|
102
|
-
- key: normalized_date_time
|
103
|
-
# The date-time converted to RFC 1123 subdomain names
|
104
|
-
expression: 'body.date_time.split("+")[0].lowerAscii().translate(":", "-")'
|
105
|
-
bindings:
|
106
|
-
- ref: ruby-tracer-scheduled-binding
|
107
|
-
template:
|
108
|
-
ref: ruby-tracer-scheduled-ci-pipeline-template
|