From 6c61df4832c64d1d9dd527161804bb697a4d08a3 Mon Sep 17 00:00:00 2001 From: Roberto Rivera Date: Thu, 19 Oct 2017 03:31:16 -0500 Subject: [PATCH 1/4] Reference implementation for Selenium on ECS. --- docker/common/Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docker/common/Makefile diff --git a/docker/common/Makefile b/docker/common/Makefile new file mode 100644 index 0000000..6b02710 --- /dev/null +++ b/docker/common/Makefile @@ -0,0 +1,18 @@ +VERSION=3.6.0 + +checkout: + if [ ! -d "selenium" ]; then git clone git@github.com:SeleniumHQ/selenium.git; fi + git -C selenium fetch --all --tags --prune + git -C selenium checkout -f tags/selenium-$(VERSION) + +patch: checkout + curl -L https://github.com/SeleniumHQ/selenium/pull/4027.patch > /tmp/4027.patch + curl -L https://github.com/SeleniumHQ/selenium/commit/0eef6a15508d9491111049326a7dc3c16c5a901b.patch > /tmp/0eef6a15508d9491111049326a7dc3c16c5a901b.patch + git -C selenium apply --check /tmp/4027.patch /tmp/0eef6a15508d9491111049326a7dc3c16c5a901b.patch + git -C selenium apply /tmp/4027.patch /tmp/0eef6a15508d9491111049326a7dc3c16c5a901b.patch + +build: patch + cd selenium && ./go prep-release-zip; + +dist: build + cp selenium/build/dist/selenium-server-standalone-$(VERSION).jar ./selenium-server-standalone.jar From 7258602ca42fe198116515bd6bd14374d30fa0a7 Mon Sep 17 00:00:00 2001 From: Roberto Rivera Date: Tue, 21 Aug 2018 10:29:58 -0500 Subject: [PATCH 2/4] Selenium containers version bump. --- docker/ecs-node-chrome/Dockerfile | 2 +- docker/ecs-node-chrome/Makefile | 15 +++++++-------- docker/ecs-node-firefox/Dockerfile | 2 +- docker/ecs-node-firefox/Makefile | 14 +++++++------- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/docker/ecs-node-chrome/Dockerfile b/docker/ecs-node-chrome/Dockerfile index b404498..dbf0bd1 100644 --- a/docker/ecs-node-chrome/Dockerfile +++ b/docker/ecs-node-chrome/Dockerfile @@ -1,4 +1,4 @@ -ARG VERSION=3.8.1 +ARG VERSION=3.14.0 FROM selenium/node-chrome:${VERSION} LABEL authors=RetailMeNot diff --git a/docker/ecs-node-chrome/Makefile b/docker/ecs-node-chrome/Makefile index 0f04920..b075016 100644 --- a/docker/ecs-node-chrome/Makefile +++ b/docker/ecs-node-chrome/Makefile @@ -1,22 +1,21 @@ include ../../.env export $(shell sed 's/=.*//' ../../.env) +VERSION=3.14.0 -VERSION=3.8.1 -REGISTRY=$(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com clean: rm -rf common build: mkdir -p common/ - rsync -av --exclude='selenium' --exclude='Makefile' ../common/* common/ - docker build -t ecs-node-chrome --build-arg VERSION=$(VERSION) . + rsync -av ../common/* common/ + docker build -t $(IMAGE_NAME) --build-arg VERSION=$(VERSION) . rm -rf common/ tag: build - docker tag ecs-node-chrome $(REGISTRY)/ecs-node-chrome:$(VERSION) - docker tag ecs-node-chrome $(REGISTRY)/ecs-node-chrome:latest + docker tag $(IMAGE_NAME) $(REGISTRY)/$(IMAGE_NAME):$(VERSION) + docker tag $(IMAGE_NAME) $(REGISTRY)/$(IMAGE_NAME):latest push: tag - docker push $(REGISTRY)/ecs-node-chrome:$(VERSION) - docker push $(REGISTRY)/ecs-node-chrome:latest + docker push $(REGISTRY)/$(IMAGE_NAME):$(VERSION) + docker push $(REGISTRY)/$(IMAGE_NAME):latest diff --git a/docker/ecs-node-firefox/Dockerfile b/docker/ecs-node-firefox/Dockerfile index 3c52e84..215d6a7 100644 --- a/docker/ecs-node-firefox/Dockerfile +++ b/docker/ecs-node-firefox/Dockerfile @@ -1,4 +1,4 @@ -ARG VERSION=3.8.1 +ARG VERSION=3.14.0 FROM selenium/node-firefox:${VERSION} LABEL authors=RetailMeNot diff --git a/docker/ecs-node-firefox/Makefile b/docker/ecs-node-firefox/Makefile index 71c8f69..2f2235c 100644 --- a/docker/ecs-node-firefox/Makefile +++ b/docker/ecs-node-firefox/Makefile @@ -1,7 +1,7 @@ include ../../.env export $(shell sed 's/=.*//' ../../.env) +VERSION=3.14.0 -VERSION=3.8.1 REGISTRY=$(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com clean: @@ -9,14 +9,14 @@ clean: build: mkdir -p common/ - rsync -av --exclude='selenium' --exclude='Makefile' ../common/* common/ - docker build -t ecs-node-firefox --build-arg VERSION=$(VERSION) . + rsync -av ../common/* common/ + docker build -t $(IMAGE_NAME) --build-arg VERSION=$(VERSION) . rm -rf common/ tag: build - docker tag ecs-node-firefox $(REGISTRY)/ecs-node-firefox:$(VERSION) - docker tag ecs-node-firefox $(REGISTRY)/ecs-node-firefox:latest + docker tag $(IMAGE_NAME) $(REGISTRY)/$(IMAGE_NAME):$(VERSION) + docker tag $(IMAGE_NAME) $(REGISTRY)/$(IMAGE_NAME):latest push: tag - docker push $(REGISTRY)/ecs-node-firefox:$(VERSION) - docker push $(REGISTRY)/ecs-node-firefox:latest + docker push $(REGISTRY)/$(IMAGE_NAME):$(VERSION) + docker push $(REGISTRY)/$(IMAGE_NAME):latest From e1350707b5a66f747736aafb21dd9bd8d28d22c3 Mon Sep 17 00:00:00 2001 From: Roberto Rivera Date: Tue, 21 Aug 2018 12:30:18 -0500 Subject: [PATCH 3/4] Having -host as an argument now causes problems. --- docker/common/ecs_entry_point.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/common/ecs_entry_point.sh b/docker/common/ecs_entry_point.sh index c0d8c9d..30c5684 100644 --- a/docker/common/ecs_entry_point.sh +++ b/docker/common/ecs_entry_point.sh @@ -20,7 +20,7 @@ set -o xtrace result="$(python /opt/bin/ecs-get-port-mapping.py)" eval "$result" -export SE_OPTS="-host $EC2_HOST -remoteHost http://$EC2_HOST:$PORT_TCP_5555 -id $NODE_ID" +export SE_OPTS="-remoteHost http://$EC2_HOST:$PORT_TCP_5555 -id $NODE_ID" # execute default extry_point.sh file /opt/bin/entry_point.sh From 0b869bd885e8549d2fe02506304c877e12b776a1 Mon Sep 17 00:00:00 2001 From: Roberto Rivera Date: Thu, 18 Oct 2018 12:11:00 -0500 Subject: [PATCH 4/4] =?UTF-8?q?Fix=20merge=20issues=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/common/Makefile | 18 ------------------ docker/ecs-node-chrome/Makefile | 1 + 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 docker/common/Makefile diff --git a/docker/common/Makefile b/docker/common/Makefile deleted file mode 100644 index 6b02710..0000000 --- a/docker/common/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -VERSION=3.6.0 - -checkout: - if [ ! -d "selenium" ]; then git clone git@github.com:SeleniumHQ/selenium.git; fi - git -C selenium fetch --all --tags --prune - git -C selenium checkout -f tags/selenium-$(VERSION) - -patch: checkout - curl -L https://github.com/SeleniumHQ/selenium/pull/4027.patch > /tmp/4027.patch - curl -L https://github.com/SeleniumHQ/selenium/commit/0eef6a15508d9491111049326a7dc3c16c5a901b.patch > /tmp/0eef6a15508d9491111049326a7dc3c16c5a901b.patch - git -C selenium apply --check /tmp/4027.patch /tmp/0eef6a15508d9491111049326a7dc3c16c5a901b.patch - git -C selenium apply /tmp/4027.patch /tmp/0eef6a15508d9491111049326a7dc3c16c5a901b.patch - -build: patch - cd selenium && ./go prep-release-zip; - -dist: build - cp selenium/build/dist/selenium-server-standalone-$(VERSION).jar ./selenium-server-standalone.jar diff --git a/docker/ecs-node-chrome/Makefile b/docker/ecs-node-chrome/Makefile index b075016..2f2235c 100644 --- a/docker/ecs-node-chrome/Makefile +++ b/docker/ecs-node-chrome/Makefile @@ -2,6 +2,7 @@ include ../../.env export $(shell sed 's/=.*//' ../../.env) VERSION=3.14.0 +REGISTRY=$(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com clean: rm -rf common