File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ codesphere-deploy:
1818 PLAN : ' Micro'
1919 ON_DEMAND : ' false'
2020 ENV : |
21- CS_TOKEN=$CODESPHERE_TOKEN
2221 environment :
2322 name : ' Preview Deployment Python MR_$CI_MERGE_REQUEST_IID'
2423 on_stop : codesphere-teardown
Original file line number Diff line number Diff line change 11# python-demo test
22
3- before running any stage you will need to set up a 'CS_TOKEN' env var containing an Codesphere API key .
3+ This is a Python demo application with a Streamlit frontend and FastAPI backend .
44
55# open backend api docs
66
Original file line number Diff line number Diff line change 11schemaVersion : v0.2
22prepare :
33 steps :
4- - name : install Codesphere cli tool
5- command : mkdir -p $HOME/.local/bin && wget -qO-
6- ' https://api.github.com/repos/codesphere-cloud/cs-go/releases/latest' |
7- grep linux_amd64 | grep browser_download_url | sed s/.*https/https/ |
8- sed s/\".*$// | xargs wget -O $HOME/.local/bin/cs && chmod +x
9- $HOME/.local/bin/cs
104 - name : install uv standalone version
115 command : curl -LsSf https://astral.sh/uv/install.sh | env
126 UV_INSTALL_DIR="$HOME/app" sh && chmod +x $HOME/app/uv
13- - command : cp -n .env.sample .env
14- - name : " set ev vars "
15- command : . .env && cs set-env -w $WORKSPACE_ID -t $TEAM_ID --env-var
16- UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
17- --env-var UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
18- --env-var UV_CACHE_DIR=$PWD/.codesphere-internal/.uv --env-var
19- UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
7+ - name : create environment file
8+ command : |
9+ cat > ./env << 'EOF'
10+ export UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
11+ export UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
12+ export UV_CACHE_DIR=$PWD/.codesphere-internal/.uv
13+ export UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
14+ EOF
2015 - name : install frontend environment
2116 command : . ./env && cd frontend && { [ ! -d ".venv" ] && uv venv; uv sync
2217 --no-dev; }
Original file line number Diff line number Diff line change 11schemaVersion : v0.2
22prepare :
33 steps :
4- - name : install Codesphere cli tool
5- command : mkdir -p $HOME/.local/bin && wget -qO-
6- ' https://api.github.com/repos/codesphere-cloud/cs-go/releases/latest' |
7- grep linux_amd64 | grep browser_download_url | sed s/.*https/https/ |
8- sed s/\".*$// | xargs wget -O $HOME/.local/bin/cs && chmod +x
9- $HOME/.local/bin/cs
104 - name : install uv standalone version
115 command : curl -LsSf https://astral.sh/uv/install.sh | env
126 UV_INSTALL_DIR="$HOME/app" sh && chmod +x $HOME/app/uv
13- - name : copy template .env file
14- command : cp -n .env.sample .env
15- - name : " set ev vars "
16- command : . .env && cs set-env -w $WORKSPACE_ID -t $TEAM_ID --env-var
17- UV_PYTHON_INSTALL_DIR =$PWD/.codesphere-internal/.uv-python-install
18- --env-var UV_PYTHON_BIN_DIR =$PWD/.codesphere-internal/.uv-python-bin
19- --env-var UV_CACHE_DIR =$PWD/.codesphere-internal/.uv --env-var
20- UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
7+ - name : create environment file
8+ command : |
9+ cat > ./env << 'EOF'
10+ export UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
11+ export UV_PYTHON_BIN_DIR =$PWD/.codesphere-internal/.uv-python-bin
12+ export UV_CACHE_DIR =$PWD/.codesphere-internal/.uv
13+ export UV_PYTHON_CACHE_DIR =$PWD/.codesphere-internal/.uv-python
14+ EOF
2115 - name : install frontend environment
2216 command : . ./env && cd frontend && { [ ! -d ".venv" ] && uv venv; uv sync; }
2317 - name : install backend environment
Original file line number Diff line number Diff line change 11schemaVersion : v0.2
22prepare :
33 steps :
4- - name : install Codesphere cli tool
5- command : mkdir -p $HOME/.local/bin && wget -qO-
6- ' https://api.github.com/repos/codesphere-cloud/cs-go/releases/latest' |
7- grep linux_amd64 | grep browser_download_url | sed s/.*https/https/ |
8- sed s/\".*$// | xargs wget -O $HOME/.local/bin/cs && chmod +x
9- $HOME/.local/bin/cs
104 - name : install uv standalone version
115 command : nix-env -iA nixpkgs.uv
12- - name : " set ev vars "
13- command : . .env && cs set-env -w $WORKSPACE_ID -t $TEAM_ID --env-var
14- UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
15- --env-var UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
16- --env-var UV_CACHE_DIR=$PWD/.codesphere-internal/.uv --env-var
17- UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
6+ - name : create environment file
7+ command : |
8+ cat > ./env << 'EOF'
9+ export UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
10+ export UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
11+ export UV_CACHE_DIR=$PWD/.codesphere-internal/.uv
12+ export UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
13+ EOF
1814 - name : install frontend environment
1915 command : cd frontend && { [ ! -d ".venv" ] && uv venv; uv sync --no-dev; }
2016 - name : install backend environment
Original file line number Diff line number Diff line change 11schemaVersion : v0.2
22prepare :
33 steps :
4- - name : install Codesphere cli tool
5- command : mkdir -p $HOME/.local/bin && wget -qO-
6- ' https://api.github.com/repos/codesphere-cloud/cs-go/releases/latest' |
7- grep linux_amd64 | grep browser_download_url | sed s/.*https/https/ |
8- sed s/\".*$// | xargs wget -O $HOME/.local/bin/cs && chmod +x
9- $HOME/.local/bin/cs
104 - name : install uv standalone version
115 command : curl -LsSf https://astral.sh/uv/install.sh | env
126 UV_INSTALL_DIR="$HOME/app" sh && chmod +x $HOME/app/uv
13- - command : cp -n .env.sample .env
7+ - name : create environment file
8+ command : |
9+ cat > ./env << 'EOF'
10+ export UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
11+ export UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
12+ export UV_CACHE_DIR=$PWD/.codesphere-internal/.uv
13+ export UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
14+ EOF
1415 - name : install frontend environment
1516 command : . ./env && cd frontend && { [ ! -d ".venv" ] && uv venv; uv sync
1617 --no-dev; }
You can’t perform that action at this time.
0 commit comments