Browse Source

Added argument.

development-ci
Franco Masotti 8 months ago
parent
commit
9707c31457
Signed by: frnmst
GPG Key ID: 24116ED85666780A
  1. 8
      Jenkinsfile

8
Jenkinsfile vendored

@ -55,6 +55,10 @@ pipeline {
returnStdout: true,
script: 'which id'
)}"""
PYPI_MIRROR = """${sh(
returnStdout: true,
script: 'echo -n "https://pypi.franco.net.eu.org/simple"'
)}"""
}
stages {
stage('Build') {
@ -107,10 +111,10 @@ pipeline {
sh '''
sed -i "s/docker-debian-postgis-django.git#[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+/docker-debian-postgis-django.git#dev/g" docker-compose.yml
~/.local/bin/pipenv lock --requirements --dev >> requirements.txt
${DOCKER_COMPOSE} build --force-rm --no-cache --memory=2GB --build-arg DJANGO_ENV=development --build-arg GID=$(${ID} -g) --build-arg UID=$(${ID} -u)
${DOCKER_COMPOSE} build --force-rm --no-cache --memory=2GB --build-arg DJANGO_ENV=development --build-arg GID=$(${ID} -g) --build-arg UID=$(${ID} -u) --build-arg PYPI_MIRROR=${PYPI_MIRROR}
'''
} else {
sh '${DOCKER_COMPOSE} build --force-rm --no-cache --memory=2GB --build-arg DJANGO_ENV=production --build-arg GID=$(${ID} -g) --build-arg UID=$(${ID} -u)'
sh '${DOCKER_COMPOSE} build --force-rm --no-cache --memory=2GB --build-arg DJANGO_ENV=production --build-arg GID=$(${ID} -g) --build-arg UID=$(${ID} -u) --build-arg PYPI_MIRROR=${PYPI_MIRROR}'
}
}
}

Loading…
Cancel
Save