Skip to content

Commit e712aa0

Browse files
committed
setup python
1 parent 1f7f7ff commit e712aa0

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed

.github/workflows/CI.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,19 @@ jobs:
144144
- name: Set up Python
145145
uses: actions/setup-python@v5
146146
with:
147-
python-version: 3.10
147+
python-version: "3.10"
148148
- name: Build Wheel
149149
run: |
150150
make env
151-
make wheel
151+
make package
152+
- id: get-path
153+
run: |
154+
echo "path=./dist/apache_skywalking-$(poetry version | sed 's/apache-skywalking //g')-py3-none-any.whl" >> $GITHUB_OUTPUT
152155
- name: Upload Wheel
153156
uses: actions/upload-artifact@v4
154157
with:
155158
name: apache_skywalking.whl
156-
path: dist/apache_skywalking-$(poetry version | sed 's/apache-skywalking //g')-py3-none-any.whl
159+
path: ${{ steps.get-path.outputs.path }}
157160
retention-days: 1
158161

159162
docker-plugin:
@@ -180,9 +183,10 @@ jobs:
180183
uses: actions/download-artifact@v4
181184
with:
182185
name: apache_skywalking.whl
183-
path: apache_skywalking.whl
186+
path: .
184187
- name: Build SkyWalking Python agent base plugin image
185188
run: |
189+
ls -alh
186190
docker build --build-arg BASE_PYTHON_IMAGE -t apache/skywalking-python-agent:latest-plugin --no-cache . -f tests/plugin/Dockerfile.plugin
187191
docker save -o docker-images-skywalking-python-plugin-${{ matrix.python-version }}.tar apache/skywalking-python-agent:latest-plugin
188192
- name: Upload docker image with specific python version
@@ -262,6 +266,11 @@ jobs:
262266
with:
263267
submodules: true
264268
persist-credentials: false
269+
- name: Download wheel
270+
uses: actions/download-artifact@v4
271+
with:
272+
name: apache_skywalking.whl
273+
path: .
265274
- name: Build SkyWalking Python agent base e2e image
266275
run: |
267276
docker build --build-arg BASE_PYTHON_IMAGE -t apache/skywalking-python-agent:latest-e2e --no-cache . -f tests/e2e/base/Dockerfile.e2e

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ test: env
100100
docker build --build-arg BASE_PYTHON_IMAGE=3.8-slim -t apache/skywalking-python-agent:latest-plugin --no-cache . -f tests/plugin/Dockerfile.plugin
101101
poetry run pytest -v $(bash tests/gather_test_paths.sh)
102102

103-
.PHONY: wheel
104-
wheel:
105-
poetry build --format wheel
106-
107103
.PHONY: package
108104
package: clean gen
109105
poetry build

tests/e2e/base/Dockerfile.e2e

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ COPY tests/e2e/base/consumer/* /services/
2424
COPY tests/e2e/base/provider/* /services/
2525

2626
# Copy the project and build
27-
COPY apache_skywalking.whl /apache_skywalking.whl
28-
RUN pip install /apache_skywalking.whl
27+
COPY ./apache_skywalking*.whl /
28+
RUN <<EOT
29+
wheel_name=$(ls /apache_skywalking*.whl)
30+
pip install $wheel_name[all]
31+
EOT
2932

3033
# Extra dependencies for e2e services
3134
RUN apt-get update \

tests/plugin/Dockerfile.plugin

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ FROM python:${BASE_PYTHON_IMAGE}
1919

2020
WORKDIR /agent
2121

22-
COPY apache_skywalking.whl /apache_skywalking.whl
22+
COPY ./apache_skywalking*.whl /
2323

2424
RUN apt-get update \
25-
&& apt-get install -y --no-install-recommends build-essential procps \
26-
&& pip install /apache_skywalking.whl
25+
&& apt-get install -y --no-install-recommends build-essential procps
26+
27+
RUN <<EOT
28+
wheel_name=$(ls /apache_skywalking*.whl)
29+
pip install $wheel_name[all]
30+
EOT

0 commit comments

Comments
 (0)