Skip to content
Draft
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
41 changes: 41 additions & 0 deletions .github/actions/config-poetry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,45 @@ runs:
secrets: |
development/artifactory/token/{REPO_OWNER_NAME_DASH}-${{ env.ARTIFACTORY_READER_ROLE }} access_token | ARTIFACTORY_ACCESS_TOKEN;
# yamllint enable rule:line-length
- name: Check if python.exe or parent paths exist
shell: bash
continue-on-error: true
run: |
target="C:/hostedtoolcache/windows/Python/3.9.13/x64/python.exe"
parents=(
"C:/hostedtoolcache/windows/Python/3.9.13/x64"
"C:/hostedtoolcache/windows/Python/3.9.13"
"C:/hostedtoolcache/windows/Python"
"C:/hostedtoolcache/windows"
"C:/hostedtoolcache"
"C:/hostedtoolcache"
)
echo "Checking: $target"
if [ -e "$target" ]; then
echo "Exists: $target"
else
echo "Does not exist: $target"
fi
for path in "${parents[@]}"; do
echo "Checking: $path"
if [ -e "$path" ]; then
echo "Exists: $path"
ls -l "$path"
else
echo "Does not exist: $path"
fi
done
- name: Check python installation folder
shell: bash
continue-on-error: true
run: |
echo "Attempting to locate python executable with 'which python' and 'which python3'"
which python || echo "'python' not found in PATH"
which python3 || echo "'python3' not found in PATH"
echo "Python location (python --version):"
python --version 2>/dev/null || echo "python command not available"
echo "Python3 location (python3 --version):"
python3 --version 2>/dev/null || echo "python3 command not available"
- name: Config Poetry
id: config
shell: bash
Expand All @@ -76,6 +115,8 @@ runs:
ARTIFACTORY_ACCESS_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }}
POETRY_VIRTUALENVS_PATH: ${{ github.workspace }}/${{ inputs.poetry-virtualenvs-path }}
POETRY_CACHE_DIR: ${{ github.workspace }}/${{ inputs.poetry-cache-dir }}
MISE_VERBOSE: 1
RUST_BACKTRACE: full
run: |
echo "POETRY_VIRTUALENVS_PATH=${POETRY_VIRTUALENVS_PATH}" >> "$GITHUB_ENV"
echo "POETRY_CACHE_DIR=${POETRY_CACHE_DIR}" >> "$GITHUB_ENV"
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/config-poetry/config-poetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ set_build_env() {
}

config_poetry() {
echo "add repox"
jf config add repox --artifactory-url "$ARTIFACTORY_URL" --access-token "$ARTIFACTORY_ACCESS_TOKEN"
echo "poetry-config"
jf poetry-config --server-id-resolve repox --repo-resolve "$ARTIFACTORY_PYPI_REPO"
echo "poetry install"
jf poetry install --build-name="$PROJECT" --build-number="$BUILD_NUMBER"
}

Expand Down
Loading