Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python] Use local folder for "dev" #4196

Merged
merged 4 commits into from
Feb 26, 2025
Merged
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
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
uses: ./.github/workflows/compute-impacted-libraries.yml

get_dev_artifacts:
# WARNING : never include something secret inside this job, as
# the result of it will be stored in a public artifact
# For instance, do not use GH_TOKEN here
needs:
- impacted_libraries
strategy:
Expand All @@ -78,18 +81,12 @@ jobs:
- name: Get agent artifact
run: ./utils/scripts/load-binary.sh agent

# ### appsec-event-rules is now a private repo. The GH_TOKEN provided can't read private repos.
# ### skipping this, waiting for a proper solution
# - name: Load WAF rules
# if: matrix.version == 'dev'
# run: ./utils/scripts/load-binary.sh waf_rule_set
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: binaries_dev_${{ matrix.library }}
path: binaries/
include-hidden-files: ${{ matrix.library == 'python' }}

fail-if-target-branch:
name: Fail if target branch is specified
Expand Down
10 changes: 8 additions & 2 deletions utils/scripts/load-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,14 @@ elif [ "$TARGET" = "python" ]; then
assert_version_is_dev

TARGET_BRANCH="${TARGET_BRANCH:-main}"
echo "git+https://github.com/DataDog/dd-trace-py.git@$TARGET_BRANCH" > python-load-from-pip
echo "Using $(cat python-load-from-pip)"
rm -rf dd-trace-py/
git clone --depth 1 --branch $TARGET_BRANCH https://github.com/DataDog/dd-trace-py.git
# NB this is necessary to keep the checkout out of detached HEAD state, which setuptools_scm requires for
# proper version guessing
cd dd-trace-py
git checkout --detach
echo "Checking out the ref"
git log -1 --format=%H

elif [ "$TARGET" = "ruby" ]; then
assert_version_is_dev
Expand Down
Loading