Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new pipeline for currency report #440

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions .tekton/.currency/currency-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: ruby-tracer-currency-pipeline
spec:
params:
- name: revision
type: string
- name: ruby_3_3_image_digest
type: string
description: Ruby 3.3 image digest
default: "sha256:5cf0004738f54bd67e4c4316394208ca38a6726eda7a1b0586d95601aad86e5d"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arjun-rajappa, where is this image being pulled from? If possible, avoid Docker Hub.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its still from docker. There are a lot of changes that needs to be done for this. Will raise a separate PR just like one for python for registry change will that work?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be good to make this change now. Then you have one less line to change in the future. 😄

Please also add a comment before the image line with the full URL of the image so we know which one is being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure sure will do that!

workspaces:
- name: ruby-tracer-currency-pipeline-pvc
tasks:
- name: clone
params:
- name: revision
value: $(params.revision)
taskRef:
name: ruby-tracer-clone-task
workspaces:
- name: task-pvc
workspace: ruby-tracer-currency-pipeline-pvc
- name: ruby-tracer-default-libraries-currency-required
runAfter:
- clone
matrix:
params:
- name: imageDigest
value:
- $(params.ruby_3_3_image_digest)
- name: gemfile
value:
- "./gemfiles/cuba_40.gemfile"
- "./gemfiles/excon_100.gemfile"
- "./gemfiles/graphql_20.gemfile"
- "./gemfiles/grpc_10.gemfile"
- "./gemfiles/net_http_01.gemfile"
- "./gemfiles/rack_30.gemfile"
- "./gemfiles/rest_client_20.gemfile"
- "./gemfiles/roda_30.gemfile"
- "./gemfiles/sinatra_40.gemfile"
- name: configuration
value:
- "libraries"
taskRef:
name: ruby-tracer-unittest-default-libraries-task
workspaces:
- name: task-pvc
workspace: ruby-tracer-currency-pipeline-pvc
- name: unittest-rails-sqlite3-currency-required
runAfter:
- ruby-tracer-default-libraries-currency-required
matrix:
params:
- name: imageDigest
value:
- $(params.ruby_3_3_image_digest)
- name: gemfile
value:
- "./gemfiles/rails_80.gemfile"
taskRef:
name: ruby-tracer-unittest-rails-sqlite3-task
workspaces:
- name: task-pvc
workspace: ruby-tracer-currency-pipeline-pvc
- name: unittest-sequel-sqlite3-currency-required
runAfter:
- unittest-rails-sqlite3-currency-required
matrix:
params:
- name: imageDigest
value:
- $(params.ruby_3_3_image_digest)
- name: gemfile
value:
- "./gemfiles/sequel_58.gemfile"
taskRef:
name: ruby-tracer-unittest-sequel-sqlite3-task
workspaces:
- name: task-pvc
workspace: ruby-tracer-currency-pipeline-pvc
- name: unittest-redis-currency-required
runAfter:
- unittest-sequel-sqlite3-currency-required
matrix:
params:
- name: imageDigest
value:
- $(params.ruby_3_3_image_digest)
- name: gemfile
value:
- "./gemfiles/sidekiq_70.gemfile"
- "./gemfiles/resque_20.gemfile"
taskRef:
name: ruby-tracer-unittest-redis-libraries-task
workspaces:
- name: task-pvc
workspace: ruby-tracer-currency-pipeline-pvc
- name: unittest-memcached-currency-required
runAfter:
- unittest-redis-currency-required
matrix:
params:
- name: imageDigest
value:
- $(params.ruby_3_3_image_digest)
- name: gemfile
value:
- "./gemfiles/dalli_32.gemfile"
taskRef:
name: ruby-tracer-unittest-memcached-libraries-task
workspaces:
- name: task-pvc
workspace: ruby-tracer-currency-pipeline-pvc
- name: generate-currency-report
runAfter:
- unittest-memcached-currency-required
taskRef:
name: ruby-generate-currency-report-task
workspaces:
- name: task-pvc
workspace: ruby-tracer-currency-pipeline-pvc
- name: upload-currency-report
runAfter:
- generate-currency-report
taskRef:
name: ruby-upload-currency-report-task
workspaces:
- name: task-pvc
workspace: ruby-tracer-currency-pipeline-pvc
4 changes: 2 additions & 2 deletions .tekton/.currency/scripts/generate_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def get_bundle_install_output():
"rest-client": "rest_client_20_ruby_3.3.",
"roda": "roda_30_ruby_3.3.",
"sinatra": "sinatra_40_ruby_3.3.",
"net-http": "net_http_01_ruby_3.1.",
"rails": "rails_71_sqlite3_ruby_3.3.",
"net-http": "net_http_01_ruby_3.3.",
"rails": "rails_80_sqlite3_ruby_3.3.",
"dalli": "dalli_32_ruby_3.3.",
"resque": "resque_20_ruby_3.3.",
"sidekiq": "sidekiq_70_ruby_3.3.",
Expand Down
10 changes: 3 additions & 7 deletions test/frameworks/sinatra_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

require 'test_helper'
require 'rack/test'
require 'byebug'

class SinatraTest < Minitest::Test
include Rack::Test::Methods
APP = Rack::Builder.parse_file('test/support/apps/sinatra/config.ru')
byebug

sinatra_version = Gem::Specification.find_by_name('sinatra').version
if sinatra_version < Gem::Version.new('4.0.0')
APP = APP.first
Expand All @@ -19,12 +19,8 @@ def app

def test_basic_get
clear_all!
byebug
r = get '/'
# , nil, {
# "HTTP_FORWARDED" => "localhost",
# "action_dispatch.show_detailed_exceptions" => true
# }

assert last_response.ok?


Expand Down
6 changes: 5 additions & 1 deletion test/support/apps/sinatra/config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ class InstanaSinatraApp < ::Sinatra::Base
get '/' do
"Hello Sinatra!"
end

get '/greet/:name' do
"Hello, #{params[:name]}!"
end

configure do
set :host_authorization, {permitted_hosts: "example.org"}
end
end

run InstanaSinatraApp
Loading