diff --git a/.azure-pipelines/ci.yml b/.azure-pipelines/ci.yml index 83d9f8e..019bed4 100644 --- a/.azure-pipelines/ci.yml +++ b/.azure-pipelines/ci.yml @@ -1,90 +1,78 @@ +name: $(Date:yyyyMMdd).$(Rev:r) +variables: + - name: Codeql.Enabled + value: true +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + - repository: 1esPipelines + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release trigger: -- main - -jobs: - - job: static_analysis - displayName: Static Code Analysis + branches: + include: + - main +extends: + template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines + parameters: pool: - vmImage: 'windows-latest' - steps: - - task: JavaToolInstaller@0 - displayName: 'Use Java 17' - inputs: - versionSpec: 17 - jdkArchitectureOption: x64 - jdkSourceOption: PreInstalled - - task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2 - displayName: 'Run CredScan' - inputs: - toolMajorVersion: V2 - verboseOutput: true - debugMode: false - # - task: Semmle@1 - # displayName: Code QL for TS/JS - # inputs: - # sourceCodeDirectory: '$(Build.SourcesDirectory)' - # language: 'tsandjs' - # includeNodeModules: false - # querySuite: 'Recommended' - # timeout: '1800' - # ram: '16384' - # addProjectDirToScanningExclusionList: true - # - task: Semmle@1 - # displayName: Code QL for Java - # inputs: - # sourceCodeDirectory: '$(Build.SourcesDirectory)/jdtls.ext' - # language: 'java' - # querySuite: 'Recommended' - # timeout: '1800' - # ram: '16384' - # addProjectDirToScanningExclusionList: true - - task: PostAnalysis@1 - displayName: 'Post Analysis' - inputs: - CredScan: true - # Semmle: true - # SemmleBreakOn: 'Error' - ToolLogsNotFoundAction: 'Standard' - - - job: ci - displayName: VS Code Maven CI - pool: - vmImage: 'ubuntu-latest' - steps: - - task: Npm@1 - displayName: 'npm install' - inputs: - verbose: false - - task: Npm@1 - displayName: 'npm run tslint' - inputs: - command: custom - verbose: false - customCommand: 'run tslint' - - task: Npm@1 - displayName: 'npm run compile' - inputs: - command: custom - verbose: false - customCommand: 'run compile' - - task: JavaToolInstaller@0 - displayName: 'Use Java 17' - inputs: - versionSpec: 17 - jdkArchitectureOption: x64 - jdkSourceOption: PreInstalled - - task: Npm@1 - displayName: 'npm run build-plugin' - inputs: - command: custom - verbose: false - customCommand: 'run build-plugin' - - script: 'npx @vscode/vsce@latest package' - displayName: 'package vsix' - - task: CopyFiles@2 - displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' - inputs: - Contents: '*.vsix' - TargetFolder: '$(Build.ArtifactStagingDirectory)' - - task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: drop' + os: linux + name: 1ES_JavaTooling_Pool + image: 1ES_JavaTooling_Ubuntu-2004 + sdl: + sourceAnalysisPool: + name: 1ES_JavaTooling_Pool + image: 1ES_JavaTooling_Windows_2022 + os: windows + stages: + - stage: Build + jobs: + - job: Job_1 + displayName: VSCode-Maven-CI + templateContext: + outputs: + - output: pipelineArtifact + artifactName: drop + targetPath: $(Build.ArtifactStagingDirectory) + displayName: "Publish Artifact: drop" + steps: + - checkout: self + fetchTags: false + - task: Npm@1 + displayName: 'npm install' + inputs: + verbose: false + - task: Npm@1 + displayName: 'npm run tslint' + inputs: + command: custom + verbose: false + customCommand: 'run tslint' + - task: Npm@1 + displayName: 'npm run compile' + inputs: + command: custom + verbose: false + customCommand: 'run compile' + - task: JavaToolInstaller@0 + displayName: 'Use Java 17' + inputs: + versionSpec: 17 + jdkArchitectureOption: x64 + jdkSourceOption: PreInstalled + - task: Npm@1 + displayName: 'npm run build-plugin' + inputs: + command: custom + verbose: false + customCommand: 'run build-plugin' + - script: 'npx @vscode/vsce@latest package' + displayName: 'package vsix' + - task: CopyFiles@2 + displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' + inputs: + Contents: '*.vsix' + TargetFolder: '$(Build.ArtifactStagingDirectory)' diff --git a/.azure-pipelines/nightly.yml b/.azure-pipelines/nightly.yml index 7a729da..8afcf3b 100644 --- a/.azure-pipelines/nightly.yml +++ b/.azure-pipelines/nightly.yml @@ -1,56 +1,87 @@ +name: $(Date:yyyyMMdd).$(Rev:r) +variables: + - name: Codeql.Enabled + value: true +schedules: + - cron: 0 3 * * * + branches: + include: + - main +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + - repository: 1esPipelines + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release trigger: none pr: none - -schedules: -- cron: "0 3 * * *" - displayName: Daily 3am build - branches: - include: - - main - -pool: - vmImage: 'ubuntu-latest' -steps: -- task: Npm@1 - displayName: 'npm install' - inputs: - verbose: false -- task: Npm@1 - displayName: 'npm run tslint' - inputs: - command: custom - verbose: false - customCommand: 'run tslint' -- task: Npm@1 - displayName: 'npm run compile' - inputs: - command: custom - verbose: false - customCommand: 'run compile' -- task: JavaToolInstaller@0 - displayName: 'Use Java 17' - inputs: - versionSpec: 17 - jdkArchitectureOption: x64 - jdkSourceOption: PreInstalled -- task: Npm@1 - displayName: 'npm run build-plugin' - inputs: - command: custom - verbose: false - customCommand: 'run build-plugin' -- bash: | - npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\"" - displayName: Replace AI Key -- bash: | - npx json@latest -I -f package.json -e "this.version=this.version.substring(0, this.version.lastIndexOf('.'))+\".$(date -u +'%Y%m%d%H')\"" - displayName: Update patch version in package.json -- script: 'npx @vscode/vsce@latest package --pre-release' - displayName: 'package vsix' -- task: CopyFiles@2 - displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' - inputs: - Contents: '*.vsix' - TargetFolder: '$(Build.ArtifactStagingDirectory)' -- task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: drop' +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines + parameters: + pool: + name: 1ES_JavaTooling_Pool + image: 1ES_JavaTooling_Ubuntu-2004 + os: linux + sdl: + sourceAnalysisPool: + name: 1ES_JavaTooling_Pool + image: 1ES_JavaTooling_Windows_2022 + os: windows + stages: + - stage: Build + jobs: + - job: Job_1 + displayName: VSCode-Maven-Nightly + templateContext: + outputs: + - output: pipelineArtifact + artifactName: drop + targetPath: $(Build.ArtifactStagingDirectory) + displayName: "Publish Artifact: drop" + steps: + - checkout: self + fetchTags: true + - task: Npm@1 + displayName: 'npm install' + inputs: + verbose: false + - task: Npm@1 + displayName: 'npm run tslint' + inputs: + command: custom + verbose: false + customCommand: 'run tslint' + - task: Npm@1 + displayName: 'npm run compile' + inputs: + command: custom + verbose: false + customCommand: 'run compile' + - task: JavaToolInstaller@0 + displayName: 'Use Java 17' + inputs: + versionSpec: 17 + jdkArchitectureOption: x64 + jdkSourceOption: PreInstalled + - task: Npm@1 + displayName: 'npm run build-plugin' + inputs: + command: custom + verbose: false + customCommand: 'run build-plugin' + - bash: | + npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\"" + displayName: Replace AI Key + - bash: | + npx json@latest -I -f package.json -e "this.version=this.version.substring(0, this.version.lastIndexOf('.'))+\".$(date -u +'%Y%m%d%H')\"" + displayName: Update patch version in package.json + - script: 'npx @vscode/vsce@latest package --pre-release' + displayName: 'package vsix' + - task: CopyFiles@2 + displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' + inputs: + Contents: '*.vsix' + TargetFolder: '$(Build.ArtifactStagingDirectory)' diff --git a/.azure-pipelines/rc.yml b/.azure-pipelines/rc.yml index fa9b5a9..b08a5c3 100644 --- a/.azure-pipelines/rc.yml +++ b/.azure-pipelines/rc.yml @@ -1,46 +1,84 @@ +name: $(Date:yyyyMMdd).$(Rev:r) +variables: + - name: Codeql.Enabled + value: true +schedules: + - cron: 0 3 * * * + branches: + include: + - main +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + - repository: 1esPipelines + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release trigger: none pr: none - -pool: - vmImage: 'ubuntu-latest' -steps: -- task: Npm@1 - displayName: 'npm install' - inputs: - verbose: false -- task: Npm@1 - displayName: 'npm run tslint' - inputs: - command: custom - verbose: false - customCommand: 'run tslint' -- task: Npm@1 - displayName: 'npm run compile' - inputs: - command: custom - verbose: false - customCommand: 'run compile' -- task: JavaToolInstaller@0 - displayName: 'Use Java 17' - inputs: - versionSpec: 17 - jdkArchitectureOption: x64 - jdkSourceOption: PreInstalled -- task: Npm@1 - displayName: 'npm run build-plugin' - inputs: - command: custom - verbose: false - customCommand: 'run build-plugin' -- bash: | - npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\"" - displayName: Replace AI Key -- script: 'npx @vscode/vsce@latest package' - displayName: 'package vsix' -- task: CopyFiles@2 - displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' - inputs: - Contents: '*.vsix' - TargetFolder: '$(Build.ArtifactStagingDirectory)' -- task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: drop' +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines + parameters: + pool: + name: 1ES_JavaTooling_Pool + image: 1ES_JavaTooling_Ubuntu-2004 + os: linux + sdl: + sourceAnalysisPool: + name: 1ES_JavaTooling_Pool + image: 1ES_JavaTooling_Windows_2022 + os: windows + stages: + - stage: Build + jobs: + - job: Job_1 + displayName: VSCode-Maven-RC + templateContext: + outputs: + - output: pipelineArtifact + artifactName: drop + targetPath: $(Build.ArtifactStagingDirectory) + displayName: "Publish Artifact: drop" + steps: + - checkout: self + fetchTags: true + - task: Npm@1 + displayName: 'npm install' + inputs: + verbose: false + - task: Npm@1 + displayName: 'npm run tslint' + inputs: + command: custom + verbose: false + customCommand: 'run tslint' + - task: Npm@1 + displayName: 'npm run compile' + inputs: + command: custom + verbose: false + customCommand: 'run compile' + - task: JavaToolInstaller@0 + displayName: 'Use Java 17' + inputs: + versionSpec: 17 + jdkArchitectureOption: x64 + jdkSourceOption: PreInstalled + - task: Npm@1 + displayName: 'npm run build-plugin' + inputs: + command: custom + verbose: false + customCommand: 'run build-plugin' + - bash: | + npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\"" + displayName: Replace AI Key + - script: 'npx @vscode/vsce@latest package' + displayName: 'package vsix' + - task: CopyFiles@2 + displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' + inputs: + Contents: '*.vsix' + TargetFolder: '$(Build.ArtifactStagingDirectory)' diff --git a/jdtls.ext/com.microsoft.java.maven.target/com.microsoft.java.maven.tp.target b/jdtls.ext/com.microsoft.java.maven.target/com.microsoft.java.maven.tp.target index 7d8dd19..79c1c78 100644 --- a/jdtls.ext/com.microsoft.java.maven.target/com.microsoft.java.maven.tp.target +++ b/jdtls.ext/com.microsoft.java.maven.target/com.microsoft.java.maven.tp.target @@ -9,25 +9,24 @@ - + - + - - + - + - + diff --git a/package-lock.json b/package-lock.json index 2d993a3..4ac9ed2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,7 @@ "@types/xml2js": "^0.4.11", "@typescript-eslint/eslint-plugin": "^5.48.2", "@typescript-eslint/parser": "^5.48.2", - "@vscode/test-electron": "^2.1.5", + "@vscode/test-electron": "^2.3.8", "eslint": "^8.32.0", "glob": "^7.2.3", "mocha": "^9.2.2", @@ -616,15 +616,15 @@ } }, "node_modules/@vscode/test-electron": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.0.tgz", - "integrity": "sha512-fwzA9RtazH1GT/sckYlbxu6t5e4VaMXwCVtyLv4UAG0hP6NTfnMaaG25XCfWqlVwFhBMcQXHBCy5dmz2eLUnkw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.8.tgz", + "integrity": "sha512-b4aZZsBKtMGdDljAsOPObnAi7+VWIaYl3ylCz1jTs+oV6BZ4TNHcVNC3xUn0azPeszBmwSBDQYfFESIaUQnrOg==", "dev": true, "dependencies": { "http-proxy-agent": "^4.0.1", "https-proxy-agent": "^5.0.0", "jszip": "^3.10.1", - "semver": "^7.3.8" + "semver": "^7.5.2" }, "engines": { "node": ">=16" @@ -4280,15 +4280,15 @@ } }, "@vscode/test-electron": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.0.tgz", - "integrity": "sha512-fwzA9RtazH1GT/sckYlbxu6t5e4VaMXwCVtyLv4UAG0hP6NTfnMaaG25XCfWqlVwFhBMcQXHBCy5dmz2eLUnkw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.8.tgz", + "integrity": "sha512-b4aZZsBKtMGdDljAsOPObnAi7+VWIaYl3ylCz1jTs+oV6BZ4TNHcVNC3xUn0azPeszBmwSBDQYfFESIaUQnrOg==", "dev": true, "requires": { "http-proxy-agent": "^4.0.1", "https-proxy-agent": "^5.0.0", "jszip": "^3.10.1", - "semver": "^7.3.8" + "semver": "^7.5.2" } }, "@webassemblyjs/ast": { diff --git a/package.json b/package.json index 74c898a..8855ed6 100644 --- a/package.json +++ b/package.json @@ -802,7 +802,7 @@ "@types/vscode": "1.75.0", "@types/which": "^1.3.2", "@types/xml2js": "^0.4.11", - "@vscode/test-electron": "^2.1.5", + "@vscode/test-electron": "^2.3.8", "glob": "^7.2.3", "mocha": "^9.2.2", "ts-loader": "^9.4.1",