Newer
Older

Daniel Lyons
committed
# Enter the package directory

Daniel Lyons
committed
- cd ${PACKAGE_PATH}
# Make symbolic link of python3 install to where it's installed on dev
- mkdir -p /home/ssa/bin
- ln -s "$(which python3)" /home/ssa/bin/python3.10
# look to see if there is a conflicting version in pypi registry
RESPONSE=$(curl --header "PRIVATE-TOKEN: ${API_TOKEN}"
"https://gitlab.nrao.edu/api/v4/projects/$CI_PROJECT_ID/packages?package_type=pypi&package_name=$PACKAGE_NAME"
| jq '.[] | {"name": .name, "version": .version, "url":._links.delete_api_path}')

Daniel Lyons
committed
# Install build, poetry and pytest
- pip install poetry

Daniel Lyons
committed
# Install the package for testing

Daniel Lyons
committed
# Build the package and push to the gitlab repo
- poetry build
- poetry config repositories.gitlab "https://gitlab.nrao.edu/api/v4/projects/$CI_PROJECT_ID/packages/pypi"
- poetry config http-basic.gitlab gitlab-ci-token "$CI_JOB_TOKEN"
- poetry publish --repository gitlab

Daniel Lyons
committed
# Return to the parent directory