Skip to content

Commit

Permalink
Clean up and restructure files (#7)
Browse files Browse the repository at this point in the history
* Clean up and restructure files

* Add the NOTICE file back

* Rename task folder

* Nits

* Remove unnecessary scripts
  • Loading branch information
Drarig29 authored Aug 23, 2022
1 parent 8a258f9 commit c635b44
Show file tree
Hide file tree
Showing 18 changed files with 177 additions and 168 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
dist
*.vsix
.taskkey
*.js
!jest.config.js
4 changes: 2 additions & 2 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Datadog synthetics-ci-orb
Datadog synthetics-test-automation-azure-devops
Copyright 2022-present Datadog, Inc.

This product includes software developed at Datadog (https://www.datadoghq.com/).
This product includes software developed at Datadog (https://www.datadoghq.com/).
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Trigger Synthetic tests from your Azure pipeline with the [Datadog CI Synthetics

Additional helpful documentation, links, and articles:

- [CI/CD Integrations Configuration][6]
- [CI/CD Integrations Configuration][2]

[1]: https://github.com/DataDog/datadog-ci
[2]: https://docs.datadoghq.com/synthetics/cicd_integrations/configuration
Binary file added extension-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added synthetics-run-tests-task/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions jest.config.js → synthetics-run-tests-task/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/*.test.ts'],
transform: {
'^.+\\.ts$': 'ts-jest'
'^.+\\.ts$': 'ts-jest',
},
verbose: true
}
verbose: true,
}
10 changes: 5 additions & 5 deletions package.json → synthetics-run-tests-task/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "lib/task.js",
"scripts": {
"build": "tsc",
"lint": "eslint src/**/*.ts",
"lint": "eslint **/*.ts",
"test": "jest"
},
"repository": {
Expand All @@ -22,10 +22,10 @@
],
"license": "MIT",
"engines": {
"node": "10.24.1"
"node": "10.21.0"
},
"dependencies": {
"@datadog/datadog-ci": "^1.8.0",
"@datadog/datadog-ci": "^1.12.0",
"azure-pipelines-task-lib": "^3.1.1",
"azure-pipelines-tasks-packaging-common": "^2.198.1",
"chalk": "^4.1.2",
Expand All @@ -35,8 +35,8 @@
"devDependencies": {
"@types/jest": "^27.0.2",
"@types/node": "^10.17.0",
"@typescript-eslint/parser": "^4.33.0",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"eslint": "^7.32.0",
"eslint-plugin-jest": "^24.4.2",
"eslint-plugin-prettier": "4.0.0",
Expand All @@ -45,4 +45,4 @@
"ts-jest": "^27.0.7",
"typescript": "4.4.x"
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions task/task.json → synthetics-run-tests-task/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
"Minor": 1,
"Patch": 0
},
"instanceNameFormat": "Query Datadog monitors",
"preview": true,
"instanceNameFormat": "Run Datadog Synthetics CI tests",
"inputs": [],
"execution": {
"Node10": {
"target": "../lib/task.js"
"target": "task.js"
}
}
}
}
10 changes: 4 additions & 6 deletions src/task.ts → synthetics-run-tests-task/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {reportCiError} from './report-ci-error'
import {resolveConfig} from './resolve-config'

async function run(): Promise<void> {
task.setResourcePath(path.join(__dirname, '../task/task.json'))
task.setResourcePath(path.join(__dirname, 'task.json'))

const context: BaseContext = {
stdin: process.stdin,
Expand Down Expand Up @@ -50,8 +50,6 @@ async function run(): Promise<void> {
export const printSummary = (summary: synthetics.Summary): string =>
`criticalErrors: ${summary.criticalErrors}, passed: ${summary.passed}, failedNonBlocking: ${summary.failedNonBlocking}, failed: ${summary.failed}, skipped: ${summary.skipped}, notFound: ${summary.testsNotFound.size}, timedOut: ${summary.timedOut}`

if (require.main === module) {
run()
}

export default run
void run().catch(e => {
console.error('[UNCAUGHT_ERROR]', e)
})
10 changes: 2 additions & 8 deletions tsconfig.json → synthetics-run-tests-task/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"noImplicitAny": true,
"esModuleInterop": true,
"skipLibCheck": true
},
"exclude": [
"node_modules",
"**/*.test.ts"
]
}
}
}
Loading

0 comments on commit c635b44

Please sign in to comment.