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@gmail.com> Reviewed-on: https://review.coreboot.org/27494 Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: Marc Jones <marc@marcjonesconsulting.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
c8e974f063
commit
fbc87b638a
|
@ -150,11 +150,19 @@ docker-jenkins-shell: test-docker
|
||||||
docker-shell: USER=coreboot
|
docker-shell: USER=coreboot
|
||||||
docker-shell: test-docker
|
docker-shell: test-docker
|
||||||
$(DOCKER) run -u $(USER) -it \
|
$(DOCKER) run -u $(USER) -it \
|
||||||
|
-e COLUMNS=$(shell tput cols) -e LINES=$(shell tput lines) -e TERM=$(TERM) \
|
||||||
-w /home/coreboot/coreboot \
|
-w /home/coreboot/coreboot \
|
||||||
-v $(top):/home/coreboot/coreboot \
|
-v $(top):/home/coreboot/coreboot \
|
||||||
--rm coreboot/coreboot-sdk:$(COREBOOT_CONTAINER_VERSION) \
|
--rm coreboot/coreboot-sdk:$(COREBOOT_CONTAINER_VERSION) \
|
||||||
/bin/bash -l
|
/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:
|
help:
|
||||||
@echo "Commands for working with docker images:"
|
@echo "Commands for working with docker images:"
|
||||||
@echo " coreboot-sdk - Build coreboot-sdk container"
|
@echo " coreboot-sdk - Build coreboot-sdk container"
|
||||||
|
@ -174,6 +182,7 @@ help:
|
||||||
@echo " docker-shell - Bash prompt in coreboot-jenkins-node"
|
@echo " docker-shell - Bash prompt in coreboot-jenkins-node"
|
||||||
@echo " <USER=root or USER=coreboot>"
|
@echo " <USER=root or USER=coreboot>"
|
||||||
@echo " docker-jenkins-server - Run coreboot-jenkins-node image (for server)"
|
@echo " docker-jenkins-server - Run coreboot-jenkins-node image (for server)"
|
||||||
|
@echo " docker-jenkins-attach - Open shell in running jenkins server"
|
||||||
@echo
|
@echo
|
||||||
@echo "Variables:"
|
@echo "Variables:"
|
||||||
@echo " COREBOOT_JENKINS_PORT=$(COREBOOT_JENKINS_PORT)"
|
@echo " COREBOOT_JENKINS_PORT=$(COREBOOT_JENKINS_PORT)"
|
||||||
|
@ -187,5 +196,5 @@ help:
|
||||||
.PHONY: coreboot-sdk upload-coreboot-sdk
|
.PHONY: coreboot-sdk upload-coreboot-sdk
|
||||||
.PHONY: clean-coreboot-containers clean-coreboot-images
|
.PHONY: clean-coreboot-containers clean-coreboot-images
|
||||||
.PHONY: docker-abuild
|
.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
|
.PHONY: help
|
||||||
|
|
Loading…
Reference in New Issue