Skip to content
Snippets Groups Projects
Commit c2f589c8 authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

Merge branch 'tweak-pipeline-2' into '2.8.2.1-DEVELOMENT'

tweak the pipeline

See merge request !1492
parents 310e8673 e98d18c2
No related branches found
No related tags found
2 merge requests!1605Merge 2.8.2.3 work to main,!1492tweak the pipeline
Pipeline #12561 passed
......@@ -24,6 +24,7 @@ variables:
POSTGRES_DB: archive
POSTGRES_USER: "archive"
POSTGRES_PASSWORD: "docker"
RELEASE_VERSION: 2.8.2.1rc1
image: docker:19.03.12
......
......@@ -17,6 +17,7 @@
# along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
import argparse
import glob
import importlib.metadata
import logging
import os
import sys
......@@ -138,6 +139,11 @@ def make_arg_parser() -> argparse.ArgumentParser:
description="Launch CARTA via Workspaces",
formatter_class=argparse.RawTextHelpFormatter,
)
parser.add_argument(
"--version",
action="version",
version=importlib.metadata.version("carta-envoy"),
)
parser.add_argument(
"-d",
"--directory",
......
......@@ -17,6 +17,7 @@
# along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
import argparse
import importlib.metadata
import logging
import os
import random
......@@ -136,6 +137,7 @@ def make_arg_parser() -> argparse.ArgumentParser:
description=_DESCRIPTION.format(version),
formatter_class=argparse.RawTextHelpFormatter,
)
parser.add_argument("--version", action="version", version=importlib.metadata.version("ssa-null"))
options = parser.add_argument_group("options", "settings for altering program behavior")
options.add_argument(
"-v",
......
......@@ -2,6 +2,7 @@
.build-package:
image: python:3.10
script:
- apt-get update -y && apt-get install jq -y
# Enter the package directory
- echo building package in $PACKAGE_PATH
- export CAPO_PATH=$PWD
......@@ -14,6 +15,22 @@
- ln -s "$(which python3)" /home/ssa/bin/python3.10
- export PATH=$PATH:/home/ssa/bin
# look to see if there is a conflicting version in pypi registry
- PACKAGE_NAME=$(basename $PWD)
- echo $PACKAGE_NAME version $RELEASE_VERSION
- >-
DELETE_URL_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 -r --arg RELEASE_VERSION "$RELEASE_VERSION" '.[] | {"name": .name, "version": .version, "url":._links.delete_api_path}
| select(.version==$RELEASE_VERSION) | .url')
- echo $DELETE_URL_RESPONSE
# if a conflicting version is present in pypi registry, remove it
- |
if [[ -n "$DELETE_URL_RESPONSE" ]]
then
$(curl --request DELETE --header "PRIVATE-TOKEN: ${API_TOKEN}" "$DELETE_URL_RESPONSE")
fi
# Install build, poetry and pytest
- pip install poetry
- poetry env use /home/ssa/bin/python3.10
......
......@@ -14,7 +14,7 @@
- ln -s "$(which python3)" /home/ssa/bin/python3.10
- export PATH=$PATH:/home/ssa/bin
- pip install pex
- pex ${PIP_NAME} -c ${PACKAGE_NAME} -o ./${PACKAGE_NAME} -i https://gitlab.nrao.edu/api/v4/projects/621/packages/pypi/simple --python-shebang /home/ssa/bin/python3.10 --disable-cache
- pex ${PIP_NAME}==${RELEASE_VERSION} -c ${PACKAGE_NAME} -o ./${PACKAGE_NAME} -i https://gitlab.nrao.edu/api/v4/projects/621/packages/pypi/simple --python-shebang /home/ssa/bin/python3.10 --disable-cache
- echo "Releasing PEX to sbin area - ${PACKAGE_NAME}"
- scp ${PACKAGE_NAME} root@shipman.aoc.nrao.edu:/lustre/aoc/cluster/pipeline/dsoc-${DEPLOY_ENV}/workspaces/sbin/
rules:
......@@ -23,6 +23,7 @@
DEPLOY_ENV: "dev"
changes:
- apps/cli/executables/pexable/${PACKAGE_NAME}/**/*
# Uncomment for pipeline testing only
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
variables:
DEPLOY_ENV: "dev"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment