Skip to content

Commit 245de24

Browse files
committed
build cleanup, add code owners, add meta data
1 parent 1bb2e4a commit 245de24

File tree

3 files changed

+42
-29
lines changed

3 files changed

+42
-29
lines changed

.github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# docs-csm pull request review team
2+
* @Cray-HPE/docs-csm-reviewers

Jenkinsfile.github

+38-29
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,49 @@
11
@Library('csm-shared-library') _
22

3-
def isStable = env.TAG_NAME != null || env.BRANCH_NAME == 'main' ? true : false
43
pipeline {
5-
agent {
6-
label "metal-gcp-builder"
7-
}
4+
agent {
5+
label "metal-gcp-builder"
6+
}
87

9-
options {
10-
buildDiscarder(logRotator(numToKeepStr: "10"))
11-
timestamps()
12-
}
8+
options {
9+
buildDiscarder(logRotator(numToKeepStr: "10"))
10+
timestamps()
11+
}
1312

14-
environment {
15-
IS_STABLE = getBuildIsStable()
16-
BUILD_METADATA = getRpmRevision(isStable: isStable)
17-
GIT_REPO_NAME = getRepoName()
18-
}
13+
environment
14+
SPEC_FILE = "docs-csm.spec"
15+
IS_STABLE = getBuildIsStable()
16+
BUILD_METADATA = getRpmRevision(isStable: env.IS_STABLE)
17+
GIT_REPO_NAME = getRepoName()
18+
}
1919

20-
stages {
21-
stage('Prepare') {
22-
steps {
23-
sh "make prepare"
24-
}
25-
}
20+
stages {
21+
stage("Prepare") {
22+
steps {
23+
script {
24+
withCredentials([gitUsernamePassword(credentialsId: 'jenkins-algol60-cray-hpe-github-integration')]) {
25+
runLibraryScript("addRpmMetaData.sh", env.SPEC_FILE)
26+
sh "make prepare"
27+
}
28+
}
29+
}
30+
}
2631

27-
stage('Build: RPM') {
28-
steps {
29-
sh "make rpm"
30-
}
31-
}
32+
stage("Build RPM") {
33+
steps {
34+
script {
35+
withCredentials([gitUsernamePassword(credentialsId: 'jenkins-algol60-cray-hpe-github-integration')]) {
36+
sh "make rpm"
37+
}
38+
}
39+
}
40+
}
3241

33-
stage('Publish') {
34-
steps {
35-
script {
36-
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/RPMS/noarch/*.rpm", arch: "noarch", isStable: isStable)
37-
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", arch: "src", isStable: isStable)
42+
stage('Publish') {
43+
steps {
44+
script {
45+
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/RPMS/noarch/*.rpm", arch: "noarch", isStable: env.IS_STABLE)
46+
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", arch: "src", isStable: env.IS_STABLE)
3847
}
3948
}
4049
}

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ SOURCE_NAME ?= ${NAME}
88
BUILD_DIR ?= $(PWD)/dist/rpmbuild
99
SOURCE_PATH := ${BUILD_DIR}/SOURCES/${SOURCE_NAME}-${VERSION}.tar.bz2
1010

11+
all: prepare rpm
12+
1113
rpm: prepare rpm_package_source rpm_build_source rpm_build
1214

1315
prepare:

0 commit comments

Comments
 (0)