Skip to content

Commit 0636e02

Browse files
committed
Remove old website update in Jenkins
1 parent a10db9b commit 0636e02

File tree

1 file changed

+0
-60
lines changed

1 file changed

+0
-60
lines changed

Jenkinsfile

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -97,65 +97,5 @@ pipeline {
9797
deleteDir()
9898
}
9999
}
100-
stage('Checkout stan-dev.github.io and update docs version') {
101-
agent {
102-
dockerfile {
103-
filename 'docker/docs/Dockerfile'
104-
dir '.'
105-
label 'linux && triqs'
106-
additionalBuildArgs '--build-arg PUID=\$(id -u) --build-arg PGID=\$(id -g)'
107-
}
108-
}
109-
when {
110-
expression {
111-
params.docsStanDev
112-
}
113-
}
114-
steps {
115-
checkout([$class: 'GitSCM',
116-
branches: [[name: '*/master']],
117-
doGenerateSubmoduleConfigurations: false,
118-
extensions: [],
119-
submoduleCfg: [],
120-
userRemoteConfigs: [[url: "https://github.com/stan-dev/stan-dev.github.io.git", credentialsId: 'a630aebc-6861-4e69-b497-fd7f496ec46b']]]
121-
)
122-
123-
/* Format version numbers with dot and underscore then replace the old values */
124-
script {
125-
def last_version_parts = last_docs_version_dir.split("_")
126-
def last_version_dot = last_version_parts[0] + "." + last_version_parts[1]
127-
def new_version_underscore = major_version + "_" + minor_version
128-
def new_version_dot = major_version + "." + minor_version
129-
130-
/* Linux Version */
131-
sh """
132-
sed -i 's/$last_docs_version_dir/$new_version_underscore/g' users/documentation/index.md
133-
sed -i 's/$last_version_dot/$new_version_dot/g' users/documentation/index.md
134-
sed -i 's/$last_docs_version_dir/$new_version_underscore/g' users/interfaces/cmdstan.md
135-
sed -i 's/$last_version_dot/$new_version_dot/g' users/interfaces/cmdstan.md
136-
"""
137-
}
138-
139-
/* Create a merge request */
140-
withCredentials([usernamePassword(credentialsId: 'a630aebc-6861-4e69-b497-fd7f496ec46b',
141-
usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) {
142-
sh """
143-
git config user.email "[email protected]"
144-
git config user.name "Stan Jenkins"
145-
git config auth.token ${GITHUB_TOKEN}
146-
147-
git checkout -b docs-$major_version-$minor_version
148-
149-
git add .
150-
git commit -m "Documentation generated from Jenkins for docs-$major_version-$minor_version"
151-
git push https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/stan-dev/stan-dev.github.io.git docs-$major_version-$minor_version
152-
153-
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST -d '{"title": "Docs updated by Jenkins for v$major_version-$minor_version", "head":"docs-$major_version-$minor_version", "base":"master", "body":"Docs updated through the [Jenkins Job](https://jenkins.flatironinstitute.org/job/Stan/job/BuildDocs/)"}' "https://api.github.com/repos/stan-dev/stan-dev.github.io/pulls"
154-
"""
155-
}
156-
deleteDir()
157-
}
158-
159-
}
160100
}
161101
}

0 commit comments

Comments
 (0)