Skip to content

Commit

Permalink
Updated makefile to use latest bootstrap and place tools in easier to…
Browse files Browse the repository at this point in the history
… access directories
  • Loading branch information
Jake Cohen committed Aug 4, 2021
1 parent 36bed88 commit 94c23bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ NETWORK_NAME := $(CONTAINER_PREFIX)default
NUM_WEB := 2

# Command to call the Rundeck client from outside of the container
RD := tools/rd-0.1.0-SNAPSHOT/bin/rd
RD := tools/bin/rd

# RD env vars
export RD_URL ?= http://127.0.0.1:4440
Expand Down Expand Up @@ -62,7 +62,7 @@ $(RD_MAKE_STATE_DIR)/%.scriptplugin: $(PLUGIN_OUTPUT_DIR)/%.zip $(RD)
echo "Version already exists for $<"; \
exit 1; \
else \
$(RD) plugins upload -f "$<" && echo "$$NEW_VERSION" > $@ && rm -f $(RD_PLUGIN_INSTALLED_STATE); \
$(RD) plugins upload -r private -f "$<" && echo "$$NEW_VERSION" > $@ && rm -f $(RD_PLUGIN_INSTALLED_STATE); \
fi

# Creates the Rundeck project and sets its config properties
Expand Down Expand Up @@ -96,18 +96,20 @@ $(RD_MAKE_STATE_DIR)/%.key: $(RD_KEYS_DIR)/% $(RD)
keys: $(RD_KEYS_STATES)

# Tools
PLUGIN_BOOTSTRAP := tools/rundeck-plugin-bootstrap-0.1.0-SNAPSHOT/bin/rundeck-plugin-bootstrap
PLUGIN_BOOTSTRAP := tools/tools/rundeck-plugin-bootstrap-0.1.0-SNAPSHOT/bin/rundeck-plugin-bootstrap
tools: $(RD) $(PLUGIN_BOOTSTRAP)
# tools: $(RD)

$(PLUGIN_BOOTSTRAP):
@echo "====[rundeck-plugin-bootstrap] Installing"
@docker-compose up --build rundeck-plugin-bootstrap
@docker cp rundeck-playground_rundeck-plugin-bootstrap_1:/root/tools/ .
@docker cp rundeck-playground_rundeck-plugin-bootstrap_1:/root/tools/ ./tools

$(RD):
@echo "====[rd] Installing"
@docker-compose up --build rundeck-cli
@docker cp rundeck-playground_rundeck-cli_1:/root/tools/ .
@docker cp rundeck-playground_rundeck-cli_1:/root/tools/bin ./tools
@docker cp rundeck-playground_rundeck-cli_1:/root/tools/lib ./tools

env:
@echo 'export RD_URL="$(RD_URL)";'
Expand Down Expand Up @@ -180,5 +182,5 @@ $(RD_MAKE_STATE_DIR)/%.javaplugin: $(PLUGINS_SRC_DIR)/%/gradlew $(PLUGINS_SRC_DI
echo "====[$* Java plugin] ERROR: Version $$NEW_VERSION already exists. Update plugin version in $(PLUGINS_SRC_DIR)/$*/build.gradle"; \
exit 1; \
else \
$(PWD)/$(RD) plugins upload -f "$$JARFILE" && echo "$$NEW_VERSION" > $(PWD)/$@ && rm -f $(PWD)/$(RD_PLUGIN_INSTALLED_STATE); \
$(PWD)/$(RD) plugins upload -r private -f "$$JARFILE" && echo "$$NEW_VERSION" > $(PWD)/$@ && rm -f $(PWD)/$(RD_PLUGIN_INSTALLED_STATE); \
fi
8 changes: 5 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
build:
context: rundeck-cli
args:
COMMIT: f20b69dc8e43462bf71a78dcb549997c86a51995
VERSION: "1.3.10"
image: playground-rundeck-cli

# plugin bootstrap tool
Expand All @@ -22,13 +22,15 @@ services:
build:
context: rundeck-plugin-bootstrap
args:
COMMIT: c3ebc59c35eb824d359c04370127aff4e64e6d70
COMMIT: 2349c5d285801b241d7d4fee041e2d26d13cc8fb
image: playground-rundeck-plugin-bootstrap

# backend
database:
build: database
image: playground-database
environment:
POSTGRES_PASSWORD: theSecret3st1
volumes:
- db-data:/var/lib/postgresql/data

Expand Down Expand Up @@ -68,4 +70,4 @@ services:

volumes:
rundeck-data:
db-data:
db-data:

0 comments on commit 94c23bf

Please sign in to comment.