Skip to content

Commit ab523e1

Browse files
adjsuted ci yml files to not use codesphere cli
1 parent 15f1c5e commit ab523e1

7 files changed

Lines changed: 33 additions & 53 deletions

File tree

.env.sample

Lines changed: 0 additions & 5 deletions
This file was deleted.

.gitlab-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

ci.Qa.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
schemaVersion: v0.2
22
prepare:
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; }

ci.dev.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
schemaVersion: v0.2
22
prepare:
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

ci.prod.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
schemaVersion: v0.2
22
prepare:
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

ci.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
schemaVersion: v0.2
22
prepare:
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; }

0 commit comments

Comments
 (0)