diff --git a/Jenkinsfile_k8s b/Jenkinsfile_k8s index f351c3329..fbd5a93b0 100644 --- a/Jenkinsfile_k8s +++ b/Jenkinsfile_k8s @@ -68,7 +68,29 @@ spec: } } + stage('Build PR') { + when { + not { + branch "master" + } + } + steps { + container('node') { + sh 'npm run build' + } + } + } + stage('Build Production') { + when { + branch "master" + } + environment { + GATSBY_SENTRY_DSN = "https://495b0bd32a5e4a2287c3fe4b061ee24f@sentry.io/1882460" + GATSBY_ALGOLIA_APP_ID = credentials('algolia-plugins-app-id') + GATSBY_ALGOLIA_SEARCH_KEY = credentials('algolia-plugins-search-key') + GATSBY_ALGOLIA_WRITE_KEY = credentials('algolia-plugins-write-key') + } steps { container('node') { sh 'npm run build' @@ -98,11 +120,7 @@ spec: branch "master" } environment { - GATSBY_SENTRY_DSN = "https://495b0bd32a5e4a2287c3fe4b061ee24f@sentry.io/1882460" PLUGINSITE_STORAGEACCOUNTKEY = credentials('PLUGINSITE_STORAGEACCOUNTKEY') - GATSBY_ALGOLIA_APP_ID = credentials('algolia-plugins-app-id') - GATSBY_ALGOLIA_SEARCH_KEY = credentials('algolia-plugins-search-key') - GATSBY_ALGOLIA_WRITE_KEY = credentials('algolia-plugins-write-key') } steps { container('blobxfer') {