Skip to content

Commit

Permalink
updating Makefile to deploy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-terrana committed Jan 12, 2019
1 parent 3e771de commit 96f4d50
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
21 changes: 13 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SOURCEDIR = .
BUILDDIR = _build
DOCSDIR = docs

.PHONY: help Makefile docs build
.PHONY: help Makefile docs build live deploy

# Put it first so that "make" without argument is like "make help".
help: ## Show target options
Expand All @@ -25,18 +25,23 @@ docs: ## builds documentation in _build/html
## run make docs live for hot reloading of edits during development
make clean
make image
@if [ "$(filter-out $@,$(MAKECMDGOALS))" = "live" ]; then\
$(eval goal := $(filter-out $@,$(MAKECMDGOALS)))
@if [ "$(goal)" = "live" ]; then\
cd $(DOCSDIR);\
docker run -p 8000:8000 -v $(shell pwd)/$(DOCSDIR):/app sdp-docs sphinx-autobuild -b html $(ALLSPHINXOPTS) . $(BUILDDIR)/html -H 0.0.0.0;\
cd -;\
cd - ;\
elif [ "$(goal)" = "deploy" ]; then\
$(eval old_remote := $(shell git remote get-url origin)) \
git remote set-url origin https://$(user):$(token)@github.com/boozallen/jenkins-templating-engine.git ;\
docker run -v $(shell pwd):/app sdp-docs sphinx-versioning push --show-banner docs gh-pages . ;\
echo git remote set-url origin $(old_remote) ;\
git remote set-url origin $(old_remote) ;\
else\
docker run -v $(shell pwd)/$(DOCSDIR):/app sdp-docs $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O);\
docker run -v $(shell pwd)/$(DOCSDIR):/app sdp-docs $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) ;\
fi

#pushdocs:
# make clean
# make image token=$(token)
# docker run -v $(shell pwd):/app sdp-docs sphinx-versioning push --show-banner docs gh-pages .
deploy: ;
live: ;

jpi: ## builds the jpi via gradle
gradle clean jpi
Expand Down
17 changes: 1 addition & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

group = 'org.jenkins-ci.plugins'
version = '0.9'
version = '0.1'
description = 'Enables Pipeline Templating and Governance'

jenkinsPlugin {
Expand Down Expand Up @@ -46,21 +46,6 @@ dependencies {
jenkinsPlugins "org.jenkins-ci.plugins:junit:1.24"
jenkinsPlugins "org.jenkins-ci.plugins:github-branch-source:2.4.1"

/*
jenkinsTest "org.jenkins-ci.modules:sshd:2.4"
jenkinsTest "com.cloudbees:groovy-cps:1.24"
jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.9"
jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-durable-task-step:2.19"
jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-step-api:2.16"
jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-support:2.19"
jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-cps:2.54"
jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-scm-step:2.6"
jenkinsTest "org.jenkins-ci.plugins:git:3.9.1"
jenkinsTest "org.jenkins-ci.plugins:subversion:2.11.1"
jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-job:2.23"
jenkinsTest "org.jenkins-ci.plugins:matrix-auth:2.3"
*/

testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'junit:junit:4.12'
testCompile 'cglib:cglib-nodep:3.2.5' // used by Spock
Expand Down

0 comments on commit 96f4d50

Please sign in to comment.