Skip to content

Commit 4ca789a

Browse files
committed
CNJR-5578: Use automated release processs
1 parent deaab04 commit 4ca789a

6 files changed

+52
-31
lines changed

.github/CODEOWNERS

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
* @cyberark/community-and-integrations-team @conjurinc/community-and-integrations-team @conjurdemos/community-and-integrations-team @cyberark/conjur-core-team @conjurinc/conjur-core-team @conjurdemos/conjur-core-team
1+
* @cyberark/community-and-integrations-team @conjurinc/community-and-integrations-team @conjurdemos/community-and-integrations-team @conjur-enterprise/community-and-integrations @cyberark/conjur-core-team @conjurinc/conjur-core-team @conjurdemos/conjur-core-team @conjur-enterprise/conjur-core
22

3-
# Changes to .trivyignore require Security Architect approval
4-
.trivyignore @cyberark/security-architects @conjurinc/security-architects @conjurdemos/security-architects
3+
# Changes to .trivyignore[.yml] require Security Architect approval
4+
.trivyignore* @cyberark/security-architects @conjurinc/security-architects @conjurdemos/security-architects @conjur-enterprise/conjur-security
55

66
# Changes to .codeclimate.yml require Quality Architect approval
7-
.codeclimate.yml @cyberark/quality-architects @conjurinc/quality-architects @conjurdemos/quality-architects
8-
7+
.codeclimate.yml @cyberark/quality-architects @conjurinc/quality-architects @conjurdemos/quality-architects @conjur-enterprise/conjur-quality
98
# Changes to SECURITY.md require Security Architect approval
10-
SECURITY.md @cyberark/security-architects @conjurinc/security-architects @conjurdemos/security-architects
9+
SECURITY.md @cyberark/security-architects @conjurinc/security-architects @conjurdemos/security-architects @conjur-enterprise/conjur-security

CHANGELOG.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
## [1.3.1] - 2024-11-01
10+
### Changed
11+
- Use internal auto release process (CNJR-5578)
12+
913
## [1.3.0] - 2023-12-28
1014
### Changed
1115
- Allow versions to have 4 digits (eg., x.x.x.x)
@@ -86,8 +90,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8690
- Open source license and contributing information
8791
- Change log and versioning information
8892

89-
[Unreleased]: https://github.com/cyberark/parse-a-changelog/compare/v1.3.0...HEAD
90-
[1.2.0]: https://github.com/cyberark/parse-a-changelog/compare/v1.2.0...v1.3.0
93+
[Unreleased]: https://github.com/cyberark/parse-a-changelog/compare/v1.3.1...HEAD
94+
[1.3.1]: https://github.com/cyberark/parse-a-changelog/compare/v1.3.0...v1.3.1
95+
[1.3.0]: https://github.com/cyberark/parse-a-changelog/compare/v1.2.0...v1.3.0
9196
[1.2.0]: https://github.com/cyberark/parse-a-changelog/compare/v1.1.0...v1.2.0
9297
[1.1.0]: https://github.com/cyberark/parse-a-changelog/compare/v1.0.2...v1.1.0
9398
[1.0.2]: https://github.com/cyberark/parse-a-changelog/compare/v1.0.1...v1.0.2

Jenkinsfile

+38-11
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ if (params.MODE == "PROMOTE") {
2323
// promotion operations after this block.
2424
infrapool.agentSh 'git config --global --add safe.directory "$(pwd)"'
2525

26-
// Copy Github Enterprise release to Github
27-
release.copyEnterpriseRelease(params.VERSION_TO_PROMOTE)
26+
// Copy Github Enterprise release to Github
27+
release.copyEnterpriseRelease(params.VERSION_TO_PROMOTE)
2828

2929
}
3030
return
@@ -76,52 +76,79 @@ pipeline {
7676
steps {
7777
script {
7878
// Request ExecutorV2 agents for 1 hour(s)
79-
INFRAPOOL_EXECUTORV2_AGENT_0 = getInfraPoolAgent.connected(type: "ExecutorV2", quantity: 1, duration: 1)[0]
79+
infrapool = getInfraPoolAgent.connected(type: "ExecutorV2", quantity: 1, duration: 1)[0]
8080
}
8181
}
8282
}
8383

84-
stage('Validate Changelog'){
85-
// This stage validates the changelog in this repo.
84+
// Generates a VERSION file based on the current build number and latest version in CHANGELOG.md
85+
stage('Validate Changelog and set version') {
8686
steps {
8787
script {
88-
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh './validate.sh'
88+
updateVersion(infrapool, "CHANGELOG.md", "${BUILD_NUMBER}")
8989
}
9090
}
9191
}
9292

9393
// Generates a VERSION file based on the current build number and latest version in CHANGELOG.md
9494
stage('Validate changelog and set version') {
9595
steps {
96-
updateVersion(INFRAPOOL_EXECUTORV2_AGENT_0, "CHANGELOG.md", "${BUILD_NUMBER}")
96+
updateVersion(infrapool, "CHANGELOG.md", "${BUILD_NUMBER}")
9797
}
9898
}
9999

100100
stage("Build Docker Image"){
101101
steps {
102102
script {
103-
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh './build.sh'
103+
infrapool.agentSh './build.sh'
104104
}
105105
}
106106
}
107107

108-
109108
stage('Test') {
110109
steps {
111110
script {
112-
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh './test.sh'
111+
infrapool.agentSh './test.sh'
113112
}
114113
}
115114
post {
116115
always{
117116
script {
118-
INFRAPOOL_EXECUTORV2_AGENT_0.agentStash name: 'rspec_junit', includes: 'rspec_junit.xml'
117+
infrapool.agentStash name: 'rspec_junit', includes: 'rspec_junit.xml'
119118
unstash 'rspec_junit'
120119
junit 'rspec_junit.xml'
121120
}
122121
}
123122
}
124123
}
124+
125+
stage('Release') {
126+
when {
127+
expression {
128+
MODE == "RELEASE"
129+
}
130+
}
131+
132+
steps {
133+
script {
134+
release(infrapool) { billOfMaterialsDirectory, assetDirectory ->
135+
/* Publish release artifacts to all the appropriate locations
136+
Copy any artifacts to assetDirectory on the infrapool node
137+
to attach them to the Github release.
138+
139+
If your assets are on the infrapool node in the target
140+
directory, use a copy like this:
141+
infrapool.agentSh "cp target/* ${assetDirectory}"
142+
Note That this will fail if there are no assets, add :||
143+
if you want the release to succeed with no assets.
144+
145+
If your assets are in target on the main Jenkins agent, use:
146+
infrapool.agentPut(from: 'target/', to: assetDirectory)
147+
*/
148+
}
149+
}
150+
}
151+
}
125152
}
126153

127154
post {

VERSION

-1
This file was deleted.

parse_a_changelog.gemspec

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Gem::Specification.new do |spec|
22
spec.name = "parse_a_changelog"
3-
spec.version = `cat < VERSION`
3+
# If a "VERSION" file exists (created by Jenkins), use it. Otherwise, use "unreleased".
4+
spec.version = `if [ -f VERSION ]; then cat < VERSION; else echo "0.0.1-unreleased"; fi`
45
spec.authors = ["John Tuttle"]
56
spec.email = "[email protected]"
67

validate.sh

-10
This file was deleted.

0 commit comments

Comments
 (0)