Skip to content

Commit 2d8016b

Browse files
Istead of calculating last version of docs we're now passing it as a jenkins paramterer.
1 parent 59334b8 commit 2d8016b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pipeline {
99
parameters {
1010
string(defaultValue: '', name: 'major_version', description: "Major version of the docs to be built")
1111
string(defaultValue: '', name: 'minor_version', description: "Minor version of the docs to be built")
12+
string(defaultValue: '', name: 'last_docs_version_dir', description: "Last docs version found in /docs. Example: 2_21")
1213
}
1314
environment {
1415
GITHUB_TOKEN = credentials('6e7c1e8f-ca2c-4b11-a70e-d934d3f6b681')
@@ -50,7 +51,7 @@ pipeline {
5051
}
5152
stage("Link docs to latest") {
5253
steps{
53-
sh "add_links.sh"
54+
sh "add_links.sh $last_docs_version_dir"
5455
}
5556
}
5657
stage("Push PR for docs") {

add_links.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#!/usr/bin/env bash
22

33
### USAGE
4-
# add_links.sh
4+
# add_links.sh last_docs_version_dir
5+
# add_links.sh 2_21
56

7+
last_docs_version_dir="$1"
8+
9+
echo $last_docs_version_dir
10+
11+
exit 0
612
cd docs
713
# Count number of dirs in /docs
814
docsDirsCount=`find . -mindepth 1 -maxdepth 1 -type d | wc -l`

0 commit comments

Comments
 (0)