add Jenkinsfile for CI builds, extend Makefile

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-09-07 21:19:55 +02:00 committed by Corey Petty
parent 4ba156708a
commit c18940ff99
5 changed files with 66 additions and 8 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@ public
resources
.idea
content/.obsidian
static/linkmap
assets/indices/linkIndex.json
assets/indices/contentIndex.json
linkmap

47
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,47 @@
pipeline {
agent {
label 'linux'
}
options {
timestamps()
/* Prevent Jenkins jobs from running forever */
timeout(time: 10, unit: 'MINUTES')
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
))
disableConcurrentBuilds()
}
environment {
GIT_COMMITTER_NAME = 'status-im-auto'
GIT_COMMITTER_EMAIL = 'auto@status.im'
}
stages {
stage('Deps') {
steps {
sh 'make setup'
}
}
stage('Build') {
steps {
/* Make hugo-obsidian available. */
withEnv(["PATH+EXTRA=${env.HOME}/go/bin"]) {
sh 'make build'
}
}
}
stage('Publish Prod') {
steps {
sshagent(credentials: ['status-im-auto-ssh']) {
sh 'ghp-import -p public'
}
}
}
}
}

View File

@ -3,18 +3,27 @@
help: ## Show all Makefile targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
update: ## Update Quartz to the latest version on Github
setup: install-hugo-obsidian
install-hugo-obsidian:
go install github.com/jackyzha0/hugo-obsidian@latest
update: install-hugo-obsidian ## Update Quartz to the latest version on Github
@git remote show upstream || (echo "remote 'upstream' not present, setting 'upstream'" && git remote add upstream https://github.com/jackyzha0/quartz.git)
git fetch upstream
git log --oneline --decorate --graph ..upstream/hugo
git checkout -p upstream/hugo -- layouts .github Makefile assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data
git checkout -p upstream/hugo -- layouts .github assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data
update-force: ## Forcefully pull all changes and don't ask to patch
go install github.com/jackyzha0/hugo-obsidian@latest
update-force: install-hugo-obsidian ## Forcefully pull all changes and don't ask to patch
@git remote show upstream || (echo "remote 'upstream' not present, setting 'upstream'" && git remote add upstream https://github.com/jackyzha0/quartz.git)
git fetch upstream
git checkout upstream/hugo -- layouts .github Makefile assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data
git checkout upstream/hugo -- layouts .github assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data
serve: ## Serve Quartz locally
hugo-obsidian -input=content -output=assets/indices -index -root=. && hugo server --enableGitInfo --minify
obsidian:
hugo-obsidian -input=content -output=assets/indices -index -root=.
build: obsidian
hugo --enableGitInfo
serve: obsidian ## Serve Quartz locally
hugo server --enableGitInfo

View File

@ -1,4 +1,4 @@
baseURL = "https://quartz.jzhao.xyz/"
baseURL = "https://roadmap.logos.co/"
languageCode = "en-us"
googleAnalytics = "G-XYFD95KB4J"
relativeURLs = false

1
static/CNAME Normal file
View File

@ -0,0 +1 @@
roadmap.logos.co