jjb: Add job to build and deploy efficios.com
authorKienan Stewart <kstewart@efficios.com>
Wed, 7 Jun 2023 19:26:57 +0000 (15:26 -0400)
committerKienan Stewart <kstewart@efficios.com>
Wed, 7 Jun 2023 19:59:14 +0000 (15:59 -0400)
Change-Id: Ie61384f0c99bdf0ffab57b7156296c5f3ca59362

jobs/efficios-www.yaml [new file with mode: 0644]
scripts/efficios-www/deploy.sh [new file with mode: 0644]

diff --git a/jobs/efficios-www.yaml b/jobs/efficios-www.yaml
new file mode 100644 (file)
index 0000000..19cd30a
--- /dev/null
@@ -0,0 +1,75 @@
+- job:
+    name: efficios-www
+    project-type: freestyle
+    defaults: global
+    node: amd64-rootnode-jammy
+
+    description: |
+      This job is responsible for updating the efficios website.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    wrappers:
+      - ansicolor
+      - timestamps
+      - credentials-binding:
+        - ssh-user-private-key:
+            credential-id: f3c907b6-7485-49e1-afe1-4df24fac4ca1
+            key-file-variable: KEY_FILE_VARIABLE
+            username-variable: USER_NAME_VARIABLE
+            passphrase-variable: PASSPHRASE_VARIABLE
+        - file:
+            credential-id: d023f830-9ab0-409f-b977-8cd0e1944dd5
+            variable: HOST_PUBLIC_KEYS
+    properties:
+      - build-discarder:
+          num-to-keep: 5
+
+    triggers:
+      - pollscm:
+          cron: "@hourly"
+    builders:
+      - shell:
+          !include-raw: scripts/efficios-www/deploy.sh
+
+    scm:
+      - efficios-www
+
+    publishers:
+      - ircbot:
+          strategy: statechange-only
+          message-type: summary
+          matrix-notifier: only-parent
+      - email-ext:
+          recipients: 'ci-notification@lists.lttng.org'
+          reply-to: ci-notification@lists.lttng.org
+          always: false
+          unstable: false
+          first-failure: true
+          first-unstable: true
+          not-built: false
+          aborted: false
+          regression: false
+          failure: false
+          second-failure: false
+          improvement: false
+          still-failing: false
+          success: false
+          fixed: false
+          fixed-unhealthy: true
+          still-unstable: false
+          pre-build: false
+          matrix-trigger: only-parent
+          send-to:
+            - recipients
+
+- scm:
+    name: efficios-www
+    scm:
+      - git:
+          url: git@git.internal.efficios.com:efficios/efficios-www.git
+          credentials-id: f3c907b6-7485-49e1-afe1-4df24fac4ca1
+          basedir: ./
+          skip-tag: true
+          branches:
+            - master
diff --git a/scripts/efficios-www/deploy.sh b/scripts/efficios-www/deploy.sh
new file mode 100644 (file)
index 0000000..7a9ef22
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+# shellcheck disable=SC2103
+#
+# Copyright (C) 2022 Kienan Stewart <kstewart@efficios.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set -exu
+
+# Add ssh key for deployment
+cp "$HOST_PUBLIC_KEYS" ~/.ssh/known_hosts
+cp "$KEY_FILE_VARIABLE" ~/.ssh/id_rsa
+
+# Nodejs
+apt-get install -y npm
+./bootstrap-ubuntu.sh
+npm install
+
+grunt build:dev --verbose
+grunt deploy:pre --verbose
+
+grunt build:prod --verbose
+grunt deploy:prod --verbose
+# EOF
This page took 0.024769 seconds and 4 git commands to generate.