当前位置: 首页 > wzjs >正文

企业网站做几个合适html代码格式化

企业网站做几个合适,html代码格式化,做一个公司官网需要多少钱,做休闲会所网站制作Azure DevOps针对Angular项目创建build版本的yaml,并通过变量控制相应job的执行与否。 注意事项:代码前面的空格是通过Tab控制的而不是通过Space控制的。 yaml文件中包含一下内容: 1. 自动触发build 通过指定code branch使提交到此代码库的…

Azure DevOps针对Angular项目创建build版本的yaml,并通过变量控制相应job的执行与否。

注意事项:代码前面的空格是通过Tab控制的而不是通过Space控制的。

 

yaml文件中包含一下内容: 

1. 自动触发build

通过指定code branch使提交到此代码库的代码自动build

trigger:- "main"- "rc/*"- "hf/*"

2. 指定build的code branch

如指定main、master,即只有main、master代码库才支持发布Artificats。

variables:ROOT_PATH: refs/headssystem.debug: 'true'COMPONENT_PROJ: 'corpro-ui'ShouldPublish: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), contains(variables['Build.SourceBranch'], 'refs/heads/rc'), contains(variables['Build.SourceBranch'], 'refs/heads/hf'))]

3. 集成Veracode Scan

用于检测包版本的缺陷。 可通过参数启用或者禁止。

  - job: veracode_scandisplayName: Veracode Scan#dependsOn: format_linting_check#condition: and(not(failed()), ne(variables['skip.veracode.scan'], 'true'))condition: ne(variables['skip.veracode.scan'], 'true') # skip.veracode.scan参数用于控制收否执行ceracode_scan这个Job

Veracode Scan是收费的。

4. 编译和发布到Artifacts

variables.ShouldPublish控制是否要发布到Artifacts

  #------------------------------#     Build & Publish#------------------------------- job: build_publishpool: AD.US.AgentPools.WNPdisplayName: Build & PublishdependsOn: veracode_scancondition: and(succeeded(), eq(variables.ShouldPublish, true))steps:- task: NodeTool@0inputs:versionSpec: '20.x'displayName: 'Install node.js'- task: Npm@1displayName: npm installinputs:command: customcustomCommand: 'install -force'- task: Npm@1displayName: npm run buildinputs:command: 'custom'customCommand: 'run build'- task: Npm@1displayName: 'Run Unit Test'inputs:command: customverbose: falsecustomCommand: 'run test-headless'continueOnError: true- task: PublishTestResults@2displayName: 'Publish Test Results'inputs:testResultsFormat: 'JUnit'testResultsFiles: '$(Build.SourcesDirectory)/TESTS-*.xml'

5. 完整yaml代码

 完整yaml文件如下:

# Node.js with Angular
# Build a Node.js project that uses Angular.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascripttrigger:- "main"- "rc/*"- "hf/*"#----- Pipeline run description
name: $(Build.SourceBranchName).UI.$(Date:yyyyMMdd)$(Rev:.r)variables:ROOT_PATH: refs/headssystem.debug: 'true'COMPONENT_PROJ: 'corpro-ui'ShouldPublish: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), contains(variables['Build.SourceBranch'], 'refs/heads/rc'), contains(variables['Build.SourceBranch'], 'refs/heads/hf'))]
jobs:#-------------------------------------#     Code Format & Linting Check#-------------------------------------# - job: format_linting_check#   displayName: Code Format & Linting Check# #  condition: eq(variables['Build.Reason'], 'PullRequest')#   steps:#     - task: Npm@1#       displayName: npm install#       inputs:#         command: custom#         customCommand: 'install -force'#     - task: Npm@1#       displayName: 'Perform prettier format check'#       inputs:#         command: custom#         verbose: false#         customCommand: 'run prettier'#     - task: Npm@1#       displayName: 'Perform eslint linting check'#       inputs:#         command: custom#         verbose: false#         customCommand: 'run lint'#-----------------------#     Veracode Scan#------------------------ job: veracode_scandisplayName: Veracode Scan#dependsOn: format_linting_check#condition: and(not(failed()), ne(variables['skip.veracode.scan'], 'true'))condition: ne(variables['skip.veracode.scan'], 'true')#----- Job variablesvariables:scanFileName: $(COMPONENT_PROJ)_scanSandbox_Name: a360-corpro-uisteps:- task: CopyFiles@2displayName: Stage codeinputs:SourceFolder: '$(Build.SourcesDirectory)'Contents: |src/**TargetFolder: '$(Build.ArtifactStagingDirectory)'CleanTargetFolder: trueOverWrite: true- task: ArchiveFiles@2displayName: Compress code (zip)inputs:rootFolderOrFile: "$(Build.ArtifactStagingDirectory)"includeRootFolder: truearchiveType: "zip"archiveFile: "$(Build.ArtifactStagingDirectory)/$(scanFileName).zip"replaceExistingArchive: true- task: Bash@3displayName: List zip file and contentsinputs:targetType: "inline"script: |cd $(Build.ArtifactStagingDirectory)ls -altrR- task: PowerShell@2displayName: 'Veracode - check for sandbox'condition: ne(variables['skip.veracode.scan'], 'true')inputs:targetType: 'inline'script: |if ("${env:BUILD_SOURCEBRANCH}" -ne "$(ROOT_PATH)/main"){Write-Host "Set to sandbox Veracode scanning"Write-Host "##vso[task.setvariable variable=scanTosandbox;]true"Write-Host "##vso[task.setvariable variable=sboxName]"$(Build.DefinitionName)}else{Write-Host "Set to actual Veracode scanning"Write-Host "##vso[task.setvariable variable=scanTosandbox]false"Write-Host "##vso[task.setvariable variable=sboxName]"}- task: Veracode@3displayName: Request veracode scaninputs:ConnectionDetailsSelection: "Service Connection"AnalysisService: "Veracode-azdoagency"veracodeAppProfile: "$(system.teamProject)"version: "$(build.buildNumber)"filepath: "$(Build.ArtifactStagingDirectory)/$(scanFileName).zip"#sandboxName: '$(sboxName)'sandboxName: "a360-corpro-ui"createSandBox: $(scanTosandbox)maximumWaitTime: "60"#------------------------------#     Build & Publish#------------------------------- job: build_publishpool: Build.PooldisplayName: Build & PublishdependsOn: veracode_scancondition: and(succeeded(), eq(variables.ShouldPublish, true))steps:- task: NodeTool@0inputs:versionSpec: '20.x'displayName: 'Install node.js'- task: Npm@1displayName: npm installinputs:command: customcustomCommand: 'install -force'- task: Npm@1displayName: npm run buildinputs:command: 'custom'customCommand: 'run build'- task: Npm@1displayName: 'Run Unit Test'inputs:command: customverbose: falsecustomCommand: 'run test-headless'continueOnError: true- task: PublishTestResults@2displayName: 'Publish Test Results'inputs:testResultsFormat: 'JUnit'testResultsFiles: '$(Build.SourcesDirectory)/TESTS-*.xml'- task: PublishCodeCoverageResults@1displayName: 'Publish code coverage'inputs:codeCoverageTool: 'Cobertura'summaryFileLocation: '$(Build.SourcesDirectory)/coverage/**/*.xml'# Copy files from build agent to container- task: CopyFiles@2displayName: 'Copy Files'inputs:SourceFolder: '$(Build.SourcesDirectory)/dist'Contents: '**'TargetFolder: '$(Build.ArtifactStagingDirectory)'#Publish container in the pipeline- task: PublishPipelineArtifact@1displayName: 'Publish UI Artifacts'inputs:targetPath: '$(Build.ArtifactStagingDirectory)'artifactName: 'drop'publishLocation: pipeline


文章转载自:

http://VDnBlPnP.ycgrL.cn
http://8TE6EVqS.ycgrL.cn
http://VeDM0hbU.ycgrL.cn
http://6LLSsLh9.ycgrL.cn
http://Jbw120Cb.ycgrL.cn
http://z8N4ycdJ.ycgrL.cn
http://nynyYJfG.ycgrL.cn
http://Se64QPmq.ycgrL.cn
http://S7nRQNRp.ycgrL.cn
http://JUO1shdY.ycgrL.cn
http://pOpfnmOE.ycgrL.cn
http://5NprRMdv.ycgrL.cn
http://CHYxzKDg.ycgrL.cn
http://RX0CBXVc.ycgrL.cn
http://1pHWI1nv.ycgrL.cn
http://VZC8pXuo.ycgrL.cn
http://a4kaLhga.ycgrL.cn
http://P2CH2uDd.ycgrL.cn
http://JZsocO8y.ycgrL.cn
http://CUoQn1Tq.ycgrL.cn
http://cYtVePQB.ycgrL.cn
http://jAKdDW0S.ycgrL.cn
http://9MIGHhFw.ycgrL.cn
http://JbJ7JI7F.ycgrL.cn
http://XoRTV16C.ycgrL.cn
http://1aLRG3a0.ycgrL.cn
http://VsA8v1BR.ycgrL.cn
http://uLlCtAhe.ycgrL.cn
http://DQEQbrS9.ycgrL.cn
http://5c6GCSZV.ycgrL.cn
http://www.dtcms.com/wzjs/752067.html

相关文章:

  • 网站如何做竞价广东东莞房价2022最新价格
  • 做网站虚拟主机推荐dedecms做网站全教程
  • 济宁亿峰科技做网站一年多少费用h5软件
  • 2022年企业年报网上申报流程宁波seo优化排名
  • 桥梁毕业设计代做网站1营销型网站建设
  • 廉政网站 建设需求网站开发要学的代码
  • 网站建设 投资预算高仿奢侈手表网站
  • 扬州做公司网站的公司强力搜索引擎
  • 网站模块设计如何注册网站卖东西
  • 网站设计有限公司怎么样洛阳php网站开发
  • 美食网站主页怎么做企业门户网站建设管理制度
  • 成功企业网站必备要素专业的网站开发服务
  • 织梦系统网站首页upcache=1免费编程网站
  • 简约网站模板江苏城乡建设学校网站
  • 天津市建设工程网站wordpress_百科
  • 网站使用问题制作网站合同需注意
  • 网站红色搭配佛山网站优化推广方案
  • 盐城公司网站建设电话商业网点的定义
  • 腾讯官方网站qq注册湖南建设信息网官网
  • 网站app免费生成软件wordpress浮动电话
  • 德州企业网站建设psd模板免费下载网站
  • 安徽省住建厅网站建设深圳企业网站建设制作公司
  • 郴州市北湖建设局网站唐山网站建设系统
  • 网站搬迁计算机前端培训
  • 站长统计幸福宝宝官方php 网站管理系统
  • 网站单页别人是怎么做的具体的网站建设方案
  • 中国十大网站建设公司排名免费建网站平台教
  • 网站分享正能量旅游网站建设代码
  • 永康市网站建设网站信息优化的方式
  • ui设计和网站开发温州市住房和城乡建设局