From aaed6585b6325d772f1485e7c29a86588ccb764f Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 3 Oct 2022 15:16:30 -0400 Subject: [PATCH] Migrate EF websites to our new preview framework Related to https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/1978 --- Jenkinsfile | 66 +++++----------------------------------------------- netlify.toml | 57 --------------------------------------------- 2 files changed, 6 insertions(+), 117 deletions(-) delete mode 100644 netlify.toml diff --git a/Jenkinsfile b/Jenkinsfile index 816463a..44ed143 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,60 +1,6 @@ -pipeline { - - agent { - kubernetes { - label 'hugo-agent' - yaml """ -apiVersion: v1 -metadata: - labels: - run: hugo - name: hugo-pod -spec: - containers: - - name: jnlp - volumeMounts: - - mountPath: /home/jenkins/.ssh - name: volume-known-hosts - env: - - name: "HOME" - value: "/home/jenkins" - - name: hugo - image: eclipsefdn/hugo-node:h0.76.5-n12.22.1 - resources: - limits: - memory: "512Mi" - cpu: "1000m" - command: - - cat - tty: true - volumes: - - configMap: - name: known-hosts - name: volume-known-hosts -""" - } - } - - triggers { pollSCM('H/10 * * * *') - } - - options { - buildDiscarder(logRotator(numToKeepStr: '5')) - checkoutToSubdirectory('hugo') - } - - stages { - stage('Build website (main) with Hugo') { - when { - branch 'main' - } - steps { - container('hugo') { - dir('hugo') { - sh 'yarn install --frozen-lockfile && hugo --gc --minify --buildFuture' - } - } - } - } - } -} +@Library('releng-pipeline') _ + +hugo ( + appName: 'osgi.org', + productionDomain: 'osgi.org', +) diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index ce8f8c0..0000000 --- a/netlify.toml +++ /dev/null @@ -1,57 +0,0 @@ -[build] -publish = "public" -command = "yarn run production && hugo --gc --minify -b https://www.osgi.org" - -[build.environment] -NODE_VERSION = "12.18.3" - -[context.production.environment] -HUGO_VERSION = "0.76.5" -HUGO_ENV = "production" -HUGO_ENABLEGITINFO = "true" - -[context.split1] -command = "yarn run production && hugo --gc --minify --enableGitInfo" - -[context.split1.environment] -HUGO_VERSION = "0.76.5" -HUGO_ENV = "production" - -[context.deploy-preview] -command = "yarn run production && hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL" - -[context.deploy-preview.environment] -HUGO_VERSION = "0.76.5" - -[context.branch-deploy] -command = "yarn run production && hugo --gc --minify -b $DEPLOY_PRIME_URL" - -[context.branch-deploy.environment] -HUGO_VERSION = "0.76.5" - -[context.next.environment] -HUGO_ENABLEGITINFO = "true" - -[[redirects]] - from = "/xmlns/*" - to = "https://docs.osgi.org/xmlns/:splat" - status = 301 - force = true #COMMENT: ensure that we always redirect - -[[redirects]] - from = "/javadoc/*" - to = "https://docs.osgi.org/javadoc/:splat" - status = 301 - force = true #COMMENT: ensure that we always redirect - -[[redirects]] - from = "/specification/*" - to = "https://docs.osgi.org/specification/:splat" - status = 301 - force = true #COMMENT: ensure that we always redirect - -[[redirects]] - from = "/download/*" - to = "https://docs.osgi.org/download/:splat" - status = 301 - force = true #COMMENT: ensure that we always redirect -- GitLab