Newer
Older
image: python:3.10-slim
before_script:
- mkdir -p ~/.ssh
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- chmod 700 ~/.ssh
- echo "$SSH_PRIVATE_KEY" | ssh-add - > ~/.ssh/id_rsa
- '[[ -f /.dockerenv ]] && echo -e "Host *\\n\\tStrictHostKeyChecking no\\n\\n" > ~/.ssh/config'
script:
- mkdir -p /home/ssa/bin
- ln -s "$(which python3)" /home/ssa/bin/python3.10
- export PATH=$PATH:/home/ssa/bin
- 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
- 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:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /(^[0-9]\.[0-9]|^[0-9]\.[0-9]\.[0-9])-DEVELOPMENT/'
variables:
DEPLOY_ENV: "dev"
changes:
- apps/cli/executables/pexable/${PACKAGE_NAME}/**/*
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
variables:
DEPLOY_ENV: "dev"
changes:
- apps/cli/executables/pexable/${PACKAGE_NAME}/**/*
- if: '$CI_COMMIT_TAG =~ /^end-of-sprint-[0-9]+/'
variables:
DEPLOY_ENV: "test"
changes:
- apps/cli/executables/pexable/${PACKAGE_NAME}/**/*
- if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+/'
variables:
DEPLOY_ENV: "test"
changes:
- apps/cli/executables/pexable/${PACKAGE_NAME}/**/*
- if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/'
variables:
- apps/cli/executables/pexable/${PACKAGE_NAME}/**/*