Skip to content

Commit c51f031

Browse files
zeusongitGitHub Enterprise
authored andcommitted
Add auto deploy pipeline using CILib (#18)
* Update pipeline.yml
1 parent d02f62e commit c51f031

File tree

3 files changed

+56
-8
lines changed

3 files changed

+56
-8
lines changed

Jenkinsfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@
33
@Library('PSL@master')
44
@Library('CILibrary@CBP/stable') _
55

6-
//env.RELEASE_BRANCHES = "master"
7-
86
StartPipeline()

README.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,55 @@ This project builds the DSPythonNet3 dynamo python engine package.
44

55
Building the project will output files in `package_output` that can be used to ship as a Dynamo package.
66

7-
Builds are published to [Jenkins](https://master-5.jenkins.autodesk.com/job/Dynamo/job/DSPythonNet3/job/master/) for each commit to `master`.
7+
Builds are published to [Jenkins](https://master-5.jenkins.autodesk.com/job/Dynamo/job/DSPythonNet3/job/master/) for each commit to `master`.
8+
9+
## Deployment
10+
11+
The repository uses the release branch to deploy to [Dynamo Package Manager](www.dynamopackages.com).
12+
13+
The package `PythonNet3 Engine` is a dynamo package that is consumed by dynamo users using the Package Manager. The following explains the deployment process to continously push updates to that package.
14+
15+
The component is published publically to `dynamopackages.com` but is published internally for testing purposes to `dev.dynamopackages.com` by default, to publish a new package or version publically set the `use_dev_pm` flag to `false`, and follow these steps:
16+
- Make sure that the latest changes are reviewed and merged to the `master` branch.
17+
- Create a new release branch based on the master branch.The new release branch needs to be named using the following convention:
18+
- Start the branch name with `release/`
19+
- If it is a major release, follow it by the major numeric version and the keyword `-major`. Example: release/2-major
20+
- If it is a minor release, follow it by the major versions and a variable minor version denoted by `x` followed by the keyword `-minor`. Example: release/2.x-minor
21+
- If it is a patch release, follow it by the major, minor numeric versions and a variable patch version denoted by `x` followed by the keyword `-patch`. Example: release/2.1.x-patch
22+
- In [Jenkins](https://master-5.jenkins.autodesk.com/job/Dynamo/job/DSPythonNet3/), select the branch and click Build now or Build with Parameters to trigger a new build.
23+
- After a successful build, a new dynamo package/version will be published to the public dynamo repository, if the flag `use_dev_pm` flag was set to `false`.
24+
- A PR will be created by the build service user, post build, to merge the new version from the release branch to master. Review and merge to ensure that master is always up-to-date with the latest released version.
25+
- If for some reason an override of the version is needed, use the flag `package_version` to specify a version that will override the pipeline version.
26+
27+
*Note*:
28+
- *The version of the package depends upon the version specified in the `pipeline.yml` file, the version in the branch name is purely for record-keeping*
29+
- *The current version of the package that is being deployed should always be semantically greater than the already deployed prior version, i.e package version 2.5.0 cannot be published after 3.0.0 is already published.*
30+
31+
**Release Types**
32+
It is **mandatory** to include at-least one of the release types in the branch name.
33+
- Use **patch** for a new patch release (backwards-compatible bug fixes, security patches).
34+
- Use **minor** for a new minor release (add functionality in a backwards-compatible manner).
35+
- Use **major** for a new major release (incompatible API changes/breaking changes).
36+
37+
Examples:
38+
| Branch Name | Current Version | New Version |
39+
| --------------------- | ------------- | ------------- |
40+
| release/4.6.x-patch | 4.6.1 | 4.6.2 |
41+
| release/4.x-minor | 4.6.2 | 4.7.0 |
42+
| release/5-major | 4.7.0 | 5.0.0 |
43+
44+
[Learn more about semantic versioning](semver.org)
45+
46+
#### Example
47+
48+
```
49+
-
50+
type: artifacts
51+
publish_to_jenkins: true
52+
publish_to_artifactory: false
53+
publish_to_package_manager: true
54+
package_version: 5.6.7 (optional)
55+
use_dev_pm: false (set to false, to publish to prod)
56+
outputs:
57+
- DSPythonNet3.zip
58+
```

pipeline.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
version: 1.4.0
1+
version: 1.4.1
22
pipeline_os: windows
3-
#update_changelog_on_release: true
4-
create_github_release: true
53
create_pr_release_to_master: true
64

75
env:
86
- GITHUB_ACCESS_TOKEN_ID: github_access_token_acsbuildguy
7+
- SLACK_QUANTUM_BUILD_CHANNEL : "#dynamo-jenkinsbuild"
98
- JENKINS_NODE_WIN: DynamoWinBuild
109

1110
code_analysis:
@@ -35,11 +34,11 @@ deployment:
3534
-
3635
type: customized
3736
scripts:
38-
- "pwsh.exe -ExecutionPolicy ByPass -Command Compress-Archive -Path package_output/DSPythonNet3 -DestinationPath DSPythonNet3.zip"
37+
- "pwsh.exe -ExecutionPolicy ByPass -Command Compress-Archive -Path package_output/DSPythonNet3/* -DestinationPath DSPythonNet3.zip"
3938
-
4039
type: artifacts
4140
publish_to_jenkins: true
4241
publish_to_artifactory: false
43-
allow_branches: ".*"
42+
publish_to_package_manager: true
4443
outputs:
4544
- DSPythonNet3.zip

0 commit comments

Comments
 (0)