Skip to content

Commit 7a0cce5

Browse files
committed
-Fix comparison
-Made wrong comparison an exception -Added back other versions for build -Added deploy
1 parent 8c5bc22 commit 7a0cce5

File tree

3 files changed

+64
-3
lines changed

3 files changed

+64
-3
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
logstash-version: ['default' ]
11+
logstash-version: ['6.7', '6.8', '7.0', '7.x', 'default' ]
1212
env:
1313
LOGSTASH_SOURCE: 1
1414
LOGSTASH_PATH: ..//logstash
@@ -94,3 +94,21 @@ jobs:
9494
APP_KEY: ${{ secrets.APP_KEY }}
9595
TENANT_ID: ${{ secrets.TENANT_ID }}
9696
TEST_DATABASE: ${{ secrets.TEST_DATABASE }}
97+
deploy:
98+
if: github.ref == 'refs/heads/master'
99+
runs-on: ubuntu-latest
100+
needs: e2e
101+
steps:
102+
- uses: ruby/setup-ruby@v1
103+
with:
104+
ruby-version: jruby
105+
bundler-cache: true
106+
- name: Checkout code
107+
uses: actions/checkout@v2
108+
- name: Get version
109+
run: echo "::set-output name=VERSION::`cat logstash-output-kusto.gemspec | grep .version | cut -d \' -f2`"
110+
id: get-version
111+
- name: Get color
112+
run: echo "The selected color is ${{ steps.random-color-generator.outputs.SELECTED_COLOR }}"
113+
- name: get version
114+
run:

.github/workflows/deploy.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- '*'
6+
7+
name: Deploy and Create Release
8+
9+
jobs:
10+
build:
11+
name: Upload Release Asset
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: jruby
17+
bundler-cache: true
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
- run: bundle install
21+
- name: Publish gem
22+
uses: dawidd6/action-publish-gem@v1
23+
with:
24+
api_key: ${{secrets.RUBYGEMS_KEY}}
25+
github_token: ${{secrets.GITHUB_TOKEN}}
26+
- name: Create Release
27+
id: create_release
28+
uses: actions/create-release@v1
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
with:
32+
tag_name: ${{ github.ref }}
33+
release_name: Version ${{ github.ref }}
34+
draft: false
35+
prerelease: false
36+
- name: Upload Release Asset
37+
id: upload-release-asset
38+
uses: actions/upload-release-asset@v1
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
upload_url: ${{ steps.create_release.outputs.upload_url }}
43+
asset_path: "*.gem"

e2e/e2e.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def assert_data
8989
puts "Item #{i}"
9090
(0...@column_count).each do |j|
9191
csv_item = csv_data[i][j]
92-
result_item = result.getObject(j) == nil ? nil : result.getString(j)
92+
result_item = result.getObject(j) == nil ? "null" : result.getString(j)
9393

9494
#special cases for data that is different in csv vs kusto
9595
if j == 4 #kusto boolean field
@@ -103,7 +103,7 @@ def assert_data
103103
end
104104
puts " csv[#{j}] = #{csv_item}"
105105
puts " result[#{j}] = #{result_item}"
106-
puts "Result Doesn't match csv" unless csv_item == result_item
106+
raise "Result Doesn't match csv" unless csv_item == result_item
107107
end
108108
puts ""
109109
end

0 commit comments

Comments
 (0)