Skip to content
Closed
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
5 changes: 0 additions & 5 deletions .env.sample

This file was deleted.

1 change: 0 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ codesphere-deploy:
PLAN: 'Micro'
ON_DEMAND: 'false'
ENV: |
CS_TOKEN=$CODESPHERE_TOKEN
environment:
name: 'Preview Deployment Python MR_$CI_MERGE_REQUEST_IID'
on_stop: codesphere-teardown
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# python-demo test

before running any stage you will need to set up a 'CS_TOKEN' env var containing an Codesphere API key.
This is a Python demo application with a Streamlit frontend and FastAPI backend.

# open backend api docs

Expand Down
23 changes: 9 additions & 14 deletions ci.dev.yml → ci.DEV.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
schemaVersion: v0.2
prepare:
steps:
- name: install Codesphere cli tool
command: mkdir -p $HOME/.local/bin && wget -qO-
'https://api.github.com/repos/codesphere-cloud/cs-go/releases/latest' |
grep linux_amd64 | grep browser_download_url | sed s/.*https/https/ |
sed s/\".*$// | xargs wget -O $HOME/.local/bin/cs && chmod +x
$HOME/.local/bin/cs
- name: install uv standalone version
command: curl -LsSf https://astral.sh/uv/install.sh | env
UV_INSTALL_DIR="$HOME/app" sh && chmod +x $HOME/app/uv
- name: copy template .env file
command: cp -n .env.sample .env
- name: "set ev vars "
command: . .env && cs set-env -w $WORKSPACE_ID -t $TEAM_ID --env-var
UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
--env-var UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
--env-var UV_CACHE_DIR=$PWD/.codesphere-internal/.uv --env-var
UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
- name: create environment file
command: |
cat > ./env << 'EOF'
export PATH="$HOME/app:$PATH"
export UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
export UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
export UV_CACHE_DIR=$PWD/.codesphere-internal/.uv
export UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
EOF
- name: install frontend environment
command: . ./env && cd frontend && { [ ! -d ".venv" ] && uv venv; uv sync; }
- name: install backend environment
Expand Down
20 changes: 8 additions & 12 deletions ci.prod.yml → ci.PROD.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
schemaVersion: v0.2
prepare:
steps:
- name: install Codesphere cli tool
command: mkdir -p $HOME/.local/bin && wget -qO-
'https://api.github.com/repos/codesphere-cloud/cs-go/releases/latest' |
grep linux_amd64 | grep browser_download_url | sed s/.*https/https/ |
sed s/\".*$// | xargs wget -O $HOME/.local/bin/cs && chmod +x
$HOME/.local/bin/cs
- name: install uv standalone version
command: nix-env -iA nixpkgs.uv
- name: "set ev vars "
command: . .env && cs set-env -w $WORKSPACE_ID -t $TEAM_ID --env-var
UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
--env-var UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
--env-var UV_CACHE_DIR=$PWD/.codesphere-internal/.uv --env-var
UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
- name: create environment file
command: |
cat > ./env << 'EOF'
export UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
export UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
export UV_CACHE_DIR=$PWD/.codesphere-internal/.uv
export UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
EOF
- name: install frontend environment
command: cd frontend && { [ ! -d ".venv" ] && uv venv; uv sync --no-dev; }
- name: install backend environment
Expand Down
22 changes: 9 additions & 13 deletions ci.Qa.yml → ci.QA.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
schemaVersion: v0.2
prepare:
steps:
- name: install Codesphere cli tool
command: mkdir -p $HOME/.local/bin && wget -qO-
'https://api.github.com/repos/codesphere-cloud/cs-go/releases/latest' |
grep linux_amd64 | grep browser_download_url | sed s/.*https/https/ |
sed s/\".*$// | xargs wget -O $HOME/.local/bin/cs && chmod +x
$HOME/.local/bin/cs
- name: install uv standalone version
command: curl -LsSf https://astral.sh/uv/install.sh | env
UV_INSTALL_DIR="$HOME/app" sh && chmod +x $HOME/app/uv
- command: cp -n .env.sample .env
- name: "set ev vars "
command: . .env && cs set-env -w $WORKSPACE_ID -t $TEAM_ID --env-var
UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
--env-var UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
--env-var UV_CACHE_DIR=$PWD/.codesphere-internal/.uv --env-var
UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
- name: create environment file
command: |
cat > ./env << 'EOF'
export PATH="$HOME/app:$PATH"
export UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
export UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
export UV_CACHE_DIR=$PWD/.codesphere-internal/.uv
export UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
EOF
- name: install frontend environment
command: . ./env && cd frontend && { [ ! -d ".venv" ] && uv venv; uv sync
--no-dev; }
Expand Down
16 changes: 9 additions & 7 deletions ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
schemaVersion: v0.2
prepare:
steps:
- name: install Codesphere cli tool
command: mkdir -p $HOME/.local/bin && wget -qO-
'https://api.github.com/repos/codesphere-cloud/cs-go/releases/latest' |
grep linux_amd64 | grep browser_download_url | sed s/.*https/https/ |
sed s/\".*$// | xargs wget -O $HOME/.local/bin/cs && chmod +x
$HOME/.local/bin/cs
- name: install uv standalone version
command: curl -LsSf https://astral.sh/uv/install.sh | env
UV_INSTALL_DIR="$HOME/app" sh && chmod +x $HOME/app/uv
- command: cp -n .env.sample .env
- name: create environment file
command: |
cat > ./env << 'EOF'
export PATH="$HOME/app:$PATH"
export UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
export UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
export UV_CACHE_DIR=$PWD/.codesphere-internal/.uv
export UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
EOF
- name: install frontend environment
command: . ./env && cd frontend && { [ ! -d ".venv" ] && uv venv; uv sync
--no-dev; }
Expand Down