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

[pull] master from elasticio:master #25

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
10 changes: 0 additions & 10 deletions .circleci/build_slug.sh

This file was deleted.

127 changes: 127 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
version: 2.1
parameters:
node-version:
type: string
default: "16.13.2"
orbs:
node: circleci/[email protected]
slack: circleci/[email protected]
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"
context:
- componentspusher
filters:
branches:
ignore: /.*/
tags:
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/
25 changes: 25 additions & 0 deletions .grype-ignore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ignore:
- vulnerability: CVE-2022-48174
package:
name: busybox
version: 1.35.0-r29

- vulnerability: CVE-2022-48174
package:
name: busybox-binsh
version: 1.35.0-r29

- vulnerability: CVE-2023-5363
package:
name: libssl3
version: 3.0.8-r3

- vulnerability: CVE-2023-5363
package:
name: libcrypto3
version: 3.0.8-r3

- vulnerability: CVE-2022-48174
package:
name: ssl_client
version: 1.35.0-r29
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 2.2.2 (May 22, 2024)

* The component is deprecated from now on. Use the [CSV v3 component](https://github.com/elasticio/csv-component-v3) instead.

## 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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[![CircleCI](https://circleci.com/gh/elasticio/csv-component.svg?style=svg)](https://circleci.com/gh/elasticio/csv-component)

# DEPRECATED COMPONENT. USE https://github.com/elasticio/csv-component-v3 instead

# CSV Component

## Description
Expand Down Expand Up @@ -193,4 +196,4 @@ able to handle file attachments.
`EIO_REQUIRED_RAM_MB` environment variable with an appropriate value (e.g. value `1024` means that 1024 MB will be allocated) for the component in this case.
2. You may get `Error: write after end` error, as a current workaround try increase value of environment variable: `TIMEOUT_BETWEEN_EVENTS`.
3. Maximal possible size for an attachment is 10 MB.
4. Attachments mechanism does not work with [Local Agent Installation](https://docs.elastic.io/getting-started/local-agent.html)
4. Attachments mechanism does not work with [Local Agent Installation](https://docs.elastic.io/getting-started/local-agent.html)
27 changes: 0 additions & 27 deletions circle.yml

This file was deleted.

5 changes: 3 additions & 2 deletions component.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"title": "CSV",
"version": "2.2.2",
"deprecated": true,
"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 All @@ -17,7 +18,7 @@
"url": {
"label": "CSV URL",
"required": true,
"placeholder": "http://my-url.com/foo.csv",
"placeholder": "https://my-url.com/foo.csv",
"note": "We will fetch this URL and parse it as CSV file",
"viewClass": "TextFieldWithNoteView"
},
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