diff --git a/.circleci/config.yml b/.circleci/config.yml index ba1adacbd5b..c6362b75953 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,16 +87,6 @@ jobs: mv -v tmpfile "<>" fi - - run: - name: Set det-version parameter. - command: | - VERSION=$(./version.sh) - echo "Version is: [${VERSION}]" - echo "CIRCLE_TAG is: [${CIRCLE_TAG}]" - jq --arg version "${VERSION}" '. += {"det-version": $version}' < "<>" > tmpfile - mv -v tmpfile "<>" - cat "<>" - # this must be last; persist the file to the workspace - persist_to_workspace: root: . diff --git a/.circleci/real_config.yml b/.circleci/real_config.yml index dcf9e7e91ee..43651970433 100644 --- a/.circleci/real_config.yml +++ b/.circleci/real_config.yml @@ -13,15 +13,12 @@ orbs: executors: python-38: docker: - - image: python:3.8-slim-bookworm + - image: cimg/python:3.8 python-39: docker: - - image: python:3.9-slim-bookworm + - image: cimg/python:3.9 parameters: - det-version: - type: string - default: "" docker-image: type: string default: determinedai/cimg-base:latest @@ -391,18 +388,17 @@ commands: install-wheel: parameters: - package-name: - type: string package-location: type: string steps: - run: - name: Install <> + name: Install determined working_directory: <> command: | + VERSION=$(~/project/version.sh) make build - pip install --find-links dist <>==<< pipeline.parameters.det-version >> - pip install --no-deps --force-reinstall --find-links dist <>==<< pipeline.parameters.det-version >> + pip install --find-links dist determined==${VERSION} + pip install --no-deps --force-reinstall --find-links dist determined==${VERSION} setup-python-venv: description: Set up and create Python venv. @@ -507,7 +503,6 @@ commands: name: Install pypa builder command: python3 -m pip install build - install-wheel: - package-name: determined package-location: ./harness - run: name: Install <> @@ -2700,16 +2695,40 @@ jobs: executor-name: type: string executor: << parameters.executor-name >> - environment: - VERSION: "<< pipeline.parameters.det-version >>" steps: - checkout + - when: + condition: + equal: [ win/default, << parameters.executor-name >> ] + steps: + - run: + name: Set VERSION environment variable + command: | + $version = & bash ./version.sh + setx VERSION $version + - unless: + condition: + equal: [ win/default, << parameters.executor-name >> ] + steps: + - run: + name: Set VERSION environment variable + command: | + echo "export VERSION=$(cd ~/project && ./version.sh)" >> $BASH_ENV - python-report # Running the pip executable causes an error with the win/default executor for some reason. - run: python -m pip install --upgrade --user pip - run: pip install wheel setuptools build - run: cd harness; python -m build --wheel --outdir ../build - - run: pip install --find-links build determined==<< pipeline.parameters.det-version >> + - when: + condition: + equal: [ win/default, << parameters.executor-name >> ] + steps: + - run: pip install --find-links build determined==$env:VERSION + - unless: + condition: + equal: [ win/default, << parameters.executor-name >> ] + steps: + - run: pip install --find-links build determined==${VERSION} - run: pip freeze --all # Allow this to fail, but it is useful for debugging. - run: sh -c "pip check || true"