Skip to content

Commit

Permalink
ODC-7619: Add tekton results utils to aonic library (#30)
Browse files Browse the repository at this point in the history
* Adding tekton results utils

* removed dynamic-plugin-sdk dependency

* updated input type to add TR configuration in single object

* Added changeset
  • Loading branch information
lokanandaprabhu authored Jul 8, 2024
1 parent a4be6bd commit 977f231
Show file tree
Hide file tree
Showing 34 changed files with 3,098 additions and 9 deletions.
17 changes: 17 additions & 0 deletions .changeset/tough-pumas-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@aonic-ui/pipelines": major
---

Added the hooks which are related to tekton results to fetch pipelineruns and taskruns from etcd storage and tekton results storage.

below are the hooks which are added and the description,

useRuns - Fetch data from both k8s and tekton results
useTektonResultsRuns - Fetch data from tekton results
usePipelineRuns - Fetch PipelineRunsfrom both k8s and tekton results
useTRPipelineRuns - Fetch PipelineRuns from tekton results
useTaskRuns - Fetch TaskRuns from both k8s and tekton results
useTRTaskRuns - Fetch TaskRuns from tekton results
useTRTaskRunLog - Fetch tekton results TaskRuns logs
usePipelineRunsForPipelineOrRepository - Fetch PipelineRuns for Pipeline or Repository from both k8s and tekton results
useTaskRunsForPipelineRunOrTask - Fetch TaskRuns for PipelineRun or Task from both k8s and tekton results
3 changes: 2 additions & 1 deletion packages/pipelines/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
...require('@aonic-ui/jest-config/jest.config.cjs')
...require('@aonic-ui/jest-config/jest.config.cjs'),
transformIgnorePatterns: ['<rootDir>/node_modules/(?!lodash-es)'],
};
16 changes: 10 additions & 6 deletions packages/pipelines/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,30 @@
"@aonic-ui/jest-config": "*",
"@aonic-ui/rollup-config": "*",
"@aonic-ui/typescript-config": "*",
"@testing-library/react": "^14.1.2",
"@testing-library/jest-dom": "^6.2.0",
"@patternfly/react-core": "^5.1.2",
"@patternfly/react-icons": "^5.1.2",
"@patternfly/react-tokens": "^5.1.2",
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.1",
"@types/jest": "^29.5.11",
"@types/react": "^18.2.47",
"@types/js-yaml": "^4.0.5",
"@types/lodash-es": "4.17.x",
"@types/react": "^18.2.47",
"jest": "^29.7.0",
"lodash-es": "^4.17.21",
"react": "^18.2.0",
"rollup": "^4.9.5",
"ts-jest": "^29.1.4",
"typescript": "^5.3.3"
},
"peerDependencies": {
"react": "^18.2.0",
"@testing-library/jest-dom": "^6.2.0",
"@patternfly/react-core": "^5.1.2",
"@patternfly/react-icons": "^5.1.2",
"@patternfly/react-table": "^5.1.2",
"@patternfly/react-tokens": "^5.1.2"
"@patternfly/react-tokens": "^5.1.2",
"@testing-library/jest-dom": "^6.2.0",
"react": "^18.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 4 additions & 0 deletions packages/pipelines/src/const.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const DELETED_RESOURCE_IN_K8S_ANNOTATION = 'resource.deleted.in.k8s';
export const RESOURCE_LOADED_FROM_RESULTS_ANNOTATION = 'resource.loaded.from.tektonResults';
export const ALL_NAMESPACES_KEY = '#ALL_NS#';
export const FLAG_PIPELINE_TEKTON_RESULT_INSTALLED = 'PIPELINE_TEKTON_RESULT_INSTALLED';
Loading

0 comments on commit 977f231

Please sign in to comment.