Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #79 from JupiterOne/fix-oom
Browse files Browse the repository at this point in the history
update sdk and disable collection metrics
  • Loading branch information
RonaldEAM authored May 17, 2024
2 parents 6b32820 + 559b59d commit 6006c39
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 46 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/package-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Build and Package

on:
push:
tags: '*'
release:
types:
- published

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -35,6 +36,11 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
Expand All @@ -51,6 +57,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM node:18-alpine

ENV JUPITERONE_INTEGRATION_DIR=/opt/jupiterone/integration
ENV NO_COLLECTION_METRICS='1'

COPY package.json yarn.lock tsconfig.json LICENSE ${JUPITERONE_INTEGRATION_DIR}/
COPY src/ ${JUPITERONE_INTEGRATION_DIR}/src
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@
"prepush": "yarn lint && yarn type-check && jest --changedSince main"
},
"peerDependencies": {
"@jupiterone/integration-sdk-core": "^12.6.0"
"@jupiterone/integration-sdk-core": "^12.8.1"
},
"devDependencies": {
"@jupiterone/integration-sdk-core": "^12.6.0",
"@jupiterone/integration-sdk-dev-tools": "^12.6.0",
"@jupiterone/integration-sdk-testing": "^12.6.0",
"@jupiterone/integration-sdk-core": "^12.8.1",
"@jupiterone/integration-sdk-dev-tools": "^12.8.1",
"@jupiterone/integration-sdk-testing": "^12.8.1",
"@types/node": "^18.0.0",
"@types/node-fetch": "^2.5.7",
"fetch-mock-jest": "^1.5.1",
"type-fest": "^0.16.0"
},
"dependencies": {
"@jupiterone/integration-sdk-http-client": "^12.6.0",
"@jupiterone/integration-sdk-http-client": "^12.8.1",
"node-fetch": "^2.7.0",
"node-match-path": "^0.4.4"
}
Expand Down
45 changes: 45 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,89 +122,134 @@ export const relationships: Record<
_class: RelationshipClass.HAS,
sourceType: entities.ACCOUNT._type,
targetType: entities.GROUP._type,
indexMetadata: {
enabled: false,
},
},
ACCOUNT_HAS_REPOSITORY: {
_type: 'artifactory_account_has_repository',
_class: RelationshipClass.HAS,
sourceType: entities.ACCOUNT._type,
targetType: entities.REPOSITORY._type,
indexMetadata: {
enabled: false,
},
},
ACCOUNT_HAS_REPOSITORY_GROUP: {
_type: 'artifactory_account_has_repository_group',
_class: RelationshipClass.HAS,
sourceType: entities.ACCOUNT._type,
targetType: entities.REPOSITORY_GROUP._type,
indexMetadata: {
enabled: false,
},
},
ACCOUNT_HAS_USER: {
_type: 'artifactory_account_has_user',
_class: RelationshipClass.HAS,
sourceType: entities.ACCOUNT._type,
targetType: entities.USER._type,
indexMetadata: {
enabled: false,
},
},
ACCOUNT_HAS_ACCESS_TOKEN: {
_type: 'artifactory_account_has_access_token',
_class: RelationshipClass.HAS,
sourceType: entities.ACCOUNT._type,
targetType: entities.ACCESS_TOKEN._type,
indexMetadata: {
enabled: false,
},
},
ACCESS_TOKEN_ASSIGNED_USER: {
_type: 'artifactory_access_token_assigned_user',
_class: RelationshipClass.ASSIGNED,
sourceType: entities.ACCESS_TOKEN._type,
targetType: entities.USER._type,
indexMetadata: {
enabled: false,
},
},
ACCOUNT_HAS_PIPELINE_SOURCE: {
_type: 'artifactory_account_has_pipeline_source',
_class: RelationshipClass.HAS,
sourceType: entities.ACCOUNT._type,
targetType: entities.PIPELINE_SOURCE._type,
indexMetadata: {
enabled: false,
},
},
GROUP_HAS_USER: {
_type: 'artifactory_group_has_user',
_class: RelationshipClass.HAS,
sourceType: entities.GROUP._type,
targetType: entities.USER._type,
indexMetadata: {
enabled: false,
},
},
REPOSITORY_HAS_ARTIFACT_CODEMODULE: {
_type: 'artifactory_repository_has_artifact_codemodule',
_class: RelationshipClass.HAS,
sourceType: entities.REPOSITORY._type,
targetType: entities.ARTIFACT_CODEMODULE._type,
indexMetadata: {
enabled: false,
},
},
BUILD_CREATED_ARTIFACT_CODEMODULE: {
_type: 'artifactory_build_created_artifact_codemodule',
_class: RelationshipClass.CREATED,
sourceType: entities.BUILD._type,
targetType: entities.ARTIFACT_CODEMODULE._type,
indexMetadata: {
enabled: false,
},
},
PERMISSION_ASSIGNED_USER: {
_type: 'artifactory_permission_assigned_user',
_class: RelationshipClass.ASSIGNED,
sourceType: entities.PERMISSION._type,
targetType: entities.USER._type,
indexMetadata: {
enabled: false,
},
},
PERMISSION_ASSIGNED_GROUP: {
_type: 'artifactory_permission_assigned_group',
_class: RelationshipClass.ASSIGNED,
sourceType: entities.PERMISSION._type,
targetType: entities.GROUP._type,
indexMetadata: {
enabled: false,
},
},
PERMISSION_ALLOWS_REPOSITORY: {
_type: 'artifactory_permission_allows_repository',
_class: RelationshipClass.ALLOWS,
sourceType: entities.PERMISSION._type,
targetType: entities.REPOSITORY._type,
indexMetadata: {
enabled: false,
},
},
PERMISSION_ALLOWS_BUILD: {
_type: 'artifactory_permission_allows_build',
_class: RelationshipClass.ALLOWS,
sourceType: entities.PERMISSION._type,
targetType: entities.BUILD._type,
indexMetadata: {
enabled: false,
},
},
PERMISSION_ALLOWS_REPOSITORY_GROUP: {
_type: 'artifactory_permission_allows_repository_group',
_class: RelationshipClass.ALLOWS,
sourceType: entities.PERMISSION._type,
targetType: entities.REPOSITORY_GROUP._type,
indexMetadata: {
enabled: false,
},
},
};
Loading

0 comments on commit 6006c39

Please sign in to comment.