Skip to content

Commit

Permalink
Merge pull request #111 from elasticio/sailor-update
Browse files Browse the repository at this point in the history
update
  • Loading branch information
olegosh authored May 5, 2022
2 parents ca19647 + ac56ba8 commit 92bc5bb
Show file tree
Hide file tree
Showing 8 changed files with 484 additions and 4,774 deletions.
10 changes: 0 additions & 10 deletions .circleci/build_slug.sh

This file was deleted.

125 changes: 125 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
version: 2.1
parameters:
node-version:
type: string
default: "16.13.2"
orbs:
node: circleci/node@5.0.0
slack: circleci/slack@4.5.3
commands:
notify_on_failure:
steps:
- slack/notify:
event: fail
custom: |
{
"blocks": [
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": ":red_circle: *$CIRCLE_PROJECT_REPONAME*:*$CIRCLE_TAG* build failed"
}
]
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "View Job"
},
"url": "${CIRCLE_BUILD_URL}"
}
]
}
]
}
notify_on_pass:
steps:
- slack/notify:
event: pass
custom: |
{
"blocks": [
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": ":tada: *$CIRCLE_PROJECT_REPONAME*:*$CIRCLE_TAG* was successfully built and published"
}
]
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "View Job"
},
"url": "${CIRCLE_BUILD_URL}"
}
]
}
]
}
jobs:
test:
docker: # run the steps with Docker
- image: cimg/base:stable
steps:
- checkout
- node/install:
node-version: << pipeline.parameters.node-version >>
- node/install-packages:
cache-path: ./node_modules
override-ci-command: npm install
- run:
name: Audit Dependencies
command: npm audit --production --audit-level=high
- run:
name: test
command: npm test
build:
docker:
- image: cimg/base:stable
user: root
steps:
- checkout
- node/install:
node-version: << pipeline.parameters.node-version >>
- setup_remote_docker:
version: 19.03.13
docker_layer_caching: true
# build and push Docker image
- run:
name: Install component-build-helper lib
command: npm install -g @elastic.io/component-build-helper
- run:
name: Build and publish docker image
command: build_component_docker
- notify_on_failure
- notify_on_pass
workflows:
test:
jobs:
- test:
name: "Running tests"
filters:
tags:
ignore: /.*/
publish_release:
jobs:
- build:
name: "Build and publish docker image"
filters:
branches:
ignore: /.*/
tags:
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.2.1 (April 08, 2022)

* Update Sailor version to 2.6.27
* Get rid of vulnerabilities in dependencies
* Add component pusher job to Circle.ci config

## 2.2.0 (April 23, 2021)
* Add pipe to list of separators in `Write CSV attachment from JSON Array` and `Write CSV attachment from JSON Object` actions
* Bump dependencies
Expand Down
27 changes: 0 additions & 27 deletions circle.yml

This file was deleted.

2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"title": "CSV",
"version": "2.2.1",
"description": "A comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form",
"docsUrl": "https://github.com/elasticio/csv-component",
"buildType": "docker",
"version": "2.2.0",
"triggers": {
"read": {
"main": "./lib/triggers/read.js",
Expand Down
1 change: 0 additions & 1 deletion lib/triggers/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ async function ProcessRead(msg, cfg) {
that.logger.trace('Attachment found');
csvURL = msg.attachments[key].url;
} else {

that.logger.error('URL of the CSV is missing and no CSV file in incoming attachment found');
that.emit('error', 'URL of the CSV is missing and no CSV file in incoming attachment found');
that.emit('end');
Expand Down
Loading

0 comments on commit 92bc5bb

Please sign in to comment.