Use git credential for pinned template engine install
This commit is contained in:
57
Jenkinsfile
vendored
57
Jenkinsfile
vendored
@@ -34,34 +34,37 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
withCredentials([sshUserPrivateKey(credentialsId: 'gitea-ssh', keyFileVariable: 'GIT_KEYFILE')]) {
|
||||||
if command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then
|
sh '''
|
||||||
sudo apt-get update -y
|
export GIT_SSH_COMMAND="ssh -i $GIT_KEYFILE -o StrictHostKeyChecking=accept-new"
|
||||||
sudo apt-get install -y python3-venv python3-pip make build-essential libpq-dev \
|
if command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then
|
||||||
libpango-1.0-0 libpangocairo-1.0-0 libcairo2 libgdk-pixbuf-2.0-0 libffi-dev shared-mime-info
|
sudo apt-get update -y
|
||||||
fi
|
sudo apt-get install -y python3-venv python3-pip make build-essential libpq-dev \
|
||||||
python3 -m venv .venv || {
|
libpango-1.0-0 libpangocairo-1.0-0 libcairo2 libgdk-pixbuf-2.0-0 libffi-dev shared-mime-info
|
||||||
python3 -m pip --version >/dev/null 2>&1 || {
|
fi
|
||||||
curl -fsSL https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
|
python3 -m venv .venv || {
|
||||||
python3 /tmp/get-pip.py --user
|
python3 -m pip --version >/dev/null 2>&1 || {
|
||||||
|
curl -fsSL https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
|
||||||
|
python3 /tmp/get-pip.py --user
|
||||||
|
}
|
||||||
|
python3 -m pip install --user virtualenv
|
||||||
|
python3 -m virtualenv .venv
|
||||||
}
|
}
|
||||||
python3 -m pip install --user virtualenv
|
. .venv/bin/activate
|
||||||
python3 -m virtualenv .venv
|
pip install coverage
|
||||||
}
|
pip install --upgrade pip "setuptools==69.5.1" wheel
|
||||||
. .venv/bin/activate
|
PIP_INDEX_URL=${PIP_INDEX_URL:-https://pypi.mandelblog.com/mandel/testing/+simple/} \
|
||||||
pip install coverage
|
PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL:-https://pypi.mandelblog.com/root/pypi/+simple/} \
|
||||||
pip install --upgrade pip "setuptools==69.5.1" wheel
|
pip install --no-build-isolation --pre --editable . setuptools wheel --upgrade --upgrade-strategy=eager --use-deprecated=legacy-resolver
|
||||||
PIP_INDEX_URL=${PIP_INDEX_URL:-https://pypi.mandelblog.com/mandel/testing/+simple/} \
|
cp "${JOB_BASE_NAME}/ocyan.json" "${JOB_BASE_NAME}/${JOB_BASE_NAME}.json"
|
||||||
PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL:-https://pypi.mandelblog.com/root/pypi/+simple/} \
|
pip install ruff vdt.versionplugin.wheel
|
||||||
pip install --no-build-isolation --pre --editable . setuptools wheel --upgrade --upgrade-strategy=eager --use-deprecated=legacy-resolver
|
pip install --upgrade "setuptools==69.5.1" wheel
|
||||||
cp "${JOB_BASE_NAME}/ocyan.json" "${JOB_BASE_NAME}/${JOB_BASE_NAME}.json"
|
manage.py migrate --no-input --skip-checks
|
||||||
pip install ruff vdt.versionplugin.wheel
|
manage.py loaddemodata || true
|
||||||
pip install --upgrade "setuptools==69.5.1" wheel
|
manage.py collectstatic --no-input --verbosity=0
|
||||||
manage.py migrate --no-input --skip-checks
|
pip install "httpx<0.28"
|
||||||
manage.py loaddemodata || true
|
'''
|
||||||
manage.py collectstatic --no-input --verbosity=0
|
}
|
||||||
pip install "httpx<0.28"
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Lint') {
|
stage('Lint') {
|
||||||
|
|||||||
Reference in New Issue
Block a user