Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 14 additions & 103 deletions .squash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,110 +5,21 @@ deployments:
TEST_VAL=42
ready_wait: 120
backend_wait: 20
subdomain_port_mapping:
- test:81
- test--test:81
- another-test:8000
- and--another-test:8000
pre_terminate:
- uname -a
- ./src/scripts/script-2.sh
- stuff-service:
- cat ~/.bashrc
post_launch:
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo domain is $SQUASH_DOMAIN'
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo branch id is $SQUASH_BRANCH_WITH_ID'
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo TEST_VAL2 is $TEST_VAL2'
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo TEST_VAL is $TEST_VAL'
auto_deploy_disable_cache: true
auto_deploy_on_commits: true
auto_deploy_post_launch_commands:
default:
- echo true
- python ./selenium_test.py
branch:
vm_size: 1
environment:
TEST_VAL=42
ready_wait:
120
filename:
./stuff/Dockerfile
dockerfileonly: true
run_options: --env TEST_VAL2=${SQUASH_BRANCH_WITH_ID} -v /assets:/assets
context_path: ./stuff
subdomains:
Awesome Name:
- awesomedomain,/?que=99764QQ
Awesomness x2:
- subd,/abc
Awesomness x3:
- plain
pre_launch:
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo domain is $SQUASH_DOMAIN'
post_launch:
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo domain is $SQUASH_DOMAIN'
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo branch id is $SQUASH_BRANCH_WITH_ID'
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo TEST_VAL2 is $TEST_VAL2'
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo TEST_VAL is $TEST_VAL'
branchA:
vm_size: 6
environment:
TEST_VAL=4242
ready_wait:
120
filename:
./stuff/DockerfileA
dockerfileonly: true
run_options: --env TEST_VAL2=43
context_path: ./stuff
post_launch:
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo TEST_VAL2 is $TEST_VAL2'
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo TEST_VAL is $TEST_VAL'
branchB:
vm_size: 8GB
environment:
TEST_VAL=424242
ready_wait:
120
filename:
./stuff/DockerfileB
vm_storage_gb: 10
auto_deploy_disable_cache: true
auto_deploy_on_commits: false
ready_wait: 120
filename: ./stuff/Dockerfile
dockerfileonly: true
run_options: --env TEST_VAL2=${SQUASH_DOMAIN}
context_path: ./stuff
post_launch:
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo TEST_VAL2 is $TEST_VAL2'
- target: 'stuff-service'
command: exec
docker: true
options: -it {target} bash -c 'echo TEST_VAL is $TEST_VAL'
auto_deploy_post_launch_commands:
default:
- python ./selenium_test.py
1 change: 0 additions & 1 deletion empty_file

This file was deleted.

4 changes: 3 additions & 1 deletion stuff/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM python:3.6.1-onbuild
FROM joyzoursky/python-chromedriver:3.6-selenium

COPY . /usr/src/app
WORKDIR /usr/src/app
RUN pip install -r requirements.txt
CMD ["bash", "run_server.sh"]
4 changes: 0 additions & 4 deletions stuff/DockerfileA

This file was deleted.

4 changes: 0 additions & 4 deletions stuff/DockerfileB

This file was deleted.

1 change: 1 addition & 0 deletions stuff/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
flask
selenium==3.13.0
19 changes: 19 additions & 0 deletions stuff/selenium_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# !/usr/bin/env python3.6
import os
import sys
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--window-size=1420,1080')
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get('https://{}'.format(os.environ.get('SQUASH_DOMAIN', '')))
try:
driver.find_element_by_tag_name('body')
driver.close()
sys.exit(0)
except NoSuchElementException:
sys.exit(1)
31 changes: 0 additions & 31 deletions stuff/serverA.py

This file was deleted.

31 changes: 0 additions & 31 deletions stuff/serverB.py

This file was deleted.

Empty file removed test
Empty file.