[coreboot-gerrit] Change in coreboot[master]: util/docker: Update Makefile to improve shell access

Martin Roth (Code Review) gerrit at coreboot.org
Mon Jul 16 04:11:02 CEST 2018


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/27494


Change subject: util/docker: Update Makefile to improve shell access
......................................................................

util/docker: Update Makefile to improve shell access

- Create a new target, docker-jenkins-attach, to access the running
jenkins server
- Update docker-shell target to set term & size.

Change-Id: Ifa67afb62d4a216281ebece405e9b26fd4d14622
Signed-off-by: Martin Roth <gaumless at gmail.com>
---
M util/docker/Makefile
1 file changed, 10 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/27494/1

diff --git a/util/docker/Makefile b/util/docker/Makefile
index 8bec631..beb2a7e 100644
--- a/util/docker/Makefile
+++ b/util/docker/Makefile
@@ -150,11 +150,19 @@
 docker-shell: USER=coreboot
 docker-shell: test-docker
 	$(DOCKER) run -u $(USER) -it \
+		-e COLUMNS=$(shell tput cols) -e LINES=$(shell tput lines) -e TERM=$(TERM) \
 		-w /home/coreboot/coreboot \
 		-v $(top):/home/coreboot/coreboot \
 		--rm coreboot/coreboot-sdk:$(COREBOOT_CONTAINER_VERSION) \
 		/bin/bash -l
 
+docker-jenkins-attach: USER=root
+docker-jenkins-attach:
+	docker exec --user $(USER) \
+		-e COLUMNS=$(shell tput cols) -e LINES=$(shell tput lines) -e TERM=$(TERM) \
+		-it "$$(docker ps | grep coreboot-jenkins-node | cut -f1 -d' ')" \
+		/bin/bash -l
+
 help:
 	@echo "Commands for working with docker images:"
 	@echo "  coreboot-sdk                 - Build coreboot-sdk container"
@@ -174,6 +182,7 @@
 	@echo "  docker-shell                 - Bash prompt in coreboot-jenkins-node"
 	@echo "      <USER=root or USER=coreboot>"
 	@echo "  docker-jenkins-server        - Run coreboot-jenkins-node image (for server)"
+	@echo "  docker-jenkins-attach        - Open shell in running jenkins server"
 	@echo
 	@echo "Variables:"
 	@echo "  COREBOOT_JENKINS_PORT=$(COREBOOT_JENKINS_PORT)"
@@ -187,5 +196,5 @@
 .PHONY: coreboot-sdk upload-coreboot-sdk
 .PHONY: clean-coreboot-containers clean-coreboot-images
 .PHONY: docker-abuild
-.PHONY: docker-what-jenkins-does docker-shell docker-jenkins-server
+.PHONY: docker-what-jenkins-does docker-shell docker-jenkins-server docker-jenkins-attach
 .PHONY: help

-- 
To view, visit https://review.coreboot.org/27494
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa67afb62d4a216281ebece405e9b26fd4d14622
Gerrit-Change-Number: 27494
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180716/574524e4/attachment.html>


More information about the coreboot-gerrit mailing list