General
- Use custom workspace
- Directory: {directory, d:github}
Source Code Management
Git plugin
- Git
- Repositories
- Repository URL: {repository_url, https://github.com/nehcdahc/nehcdahc.github.io.git}
- Credentials: {credentials}
- Branches to build
- Branch Specifier (blank for 'any'): {branch_specifier, 10.29}
- Additional Behaviours
- Check out to specific local branch
- Branch name: {branch_name, 10.29}
- Check out to specific local branch
- Repositories
Build Triggers
- Build when a change is pushed to GitLab. GitLab webhook URL: ...
- Secret token: 如果这个不设置 GitLab 的 Webhooks 配置会报 403 错误
参考
- https://github.com/jenkinsci/gitlab-plugin/issues/375
- https://www.cnblogs.com/kaerxifa/p/11671961.html
Build Environment
Version Number Plug-In
- Create a formatted version number
- Environment Variable Name: BUILD_VERSION
- Version Number Format String: {branch_name, 10.29}.${BUILD_DATE_FORMATTED, "yyyyMMdd"}.${BUILDS_TODAY}
- Inject environment variables to the build process: Checked
参考
NodeJS Plugin
- Provide Node & npm bin/ folder to PATH
- NodeJS Installation:
- npmrc file:
- Cache location:
Build
PowerShell plugin
-
PowerShell
- Command
$env:Path+=";C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildCurrentBin" {build_script, .uild.ps1}
Post-build Actions
Artifact Deployer Plug-in
- Post-build Actions
- [ArtifactDeployer] - Deploy the artifacts from build workspace to remote locations
- Artifacts to deploy: {artifacts_to_deploy, **}
- Basedir: {dist_directory, dist/}
- Remote File Location: {remote_file_location, f:/artifacts/${BUILD_VERSION}}
- [ArtifactDeployer] - Deploy the artifacts from build workspace to remote locations