Add push
diff --git a/Jenkinsfile b/Jenkinsfile
index 6be2022..4132dd9 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,6 +1,7 @@
pipeline {
-// agent { docker { image 'node:14-alpine' } }
- agent any
+ agent { docker { image 'node:14-alpine' } }
+// agent any
+// aries-site-pub-PAT
stages {
stage('build') {
steps {
@@ -8,8 +9,10 @@
sh 'chmod u+x build-publish.sh'
sh 'pwd'
sh 'ls -l'
- sh 'sh build-publish.sh'
-
+// sh 'sh build-publish.sh'
+ withCredentials([usernamePassword(credentialsId: 'aries-site-pub-PAT', passwordVariable: 'password', usernameVariable: 'user')]) {
+ sh 'sh build-publish.sh'
+ }
}
}
}
diff --git a/build-publish.sh b/build-publish.sh
index a25bbfe..851ba1d 100644
--- a/build-publish.sh
+++ b/build-publish.sh
@@ -1,7 +1,6 @@
#!/bin/bash
-SITE_REPO=https://github.com/apache/aries-site-pub.git
-#SITE_REPO=file:///Users/david/projects/aries/site-temp/aries-site-pub.git
+SITE_REPO=github.com/apache/aries-site-pub.git
npm run plain-install
@@ -9,7 +8,7 @@
#mkdir -p build/site
# clone the aries-site-pub repo
(
-git clone --depth 1 $SITE_REPO build/site
+git clone --depth 1 https://$SITE_REPO build/site
cd build/site
pwd
ls
@@ -22,5 +21,5 @@
cd build/site
git add .
echo `git commit -m "site build"`
-#git push origin master
+git push https://${user}:${password}$SITE_REPO master
)