Skip to content

Commit

Permalink
Added Jenkinsfile and make build pass
Browse files Browse the repository at this point in the history
  • Loading branch information
specialunderwear committed May 15, 2024
1 parent b231dec commit 0c64d66
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 13 deletions.
8 changes: 5 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/usr/bin/env groovy

pipeline {
agent any
agent { label 'GEITENPETRA' }
options { disableConcurrentBuilds() }

stages {
stage('Build') {
steps {
withPythonEnv('System-CPython-3.10') {
pysh "make"
withEnv(['DATABASE_USER=django_oscar', 'DATABASE_PASSWORD=django_oscar', 'DATABASE_PORT=5432', 'DATABASE_HOST=localhost']) {
pysh "make install"
}
}
}
}
Expand All @@ -22,7 +24,7 @@ pipeline {
stage('Test') {
steps {
withPythonEnv('System-CPython-3.10') {
withEnv(['OSCAR_ELASTICSEARCH_SERVER_URLS=https://eden.highbiza.nl:9200/']) {
withEnv(['DATABASE_USER=django_oscar', 'DATABASE_PASSWORD=django_oscar', 'DATABASE_PORT=5432', 'DATABASE_HOST=localhost']) {
pysh "make test"
}
}
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ help: ## Display this help message
install: install-python install-test assets ## Install requirements for local development and production

install-python: ## Install python requirements
pip install -r requirements.txt
pip install -r requirements.txt --upgrade --upgrade-strategy=eager

install-test: ## Install test requirements
pip install -e .[test]
pip install -e .[test] --upgrade --upgrade-strategy=eager

install-migrations-testing-requirements: ## Install migrations testing requirements
pip install -r requirements_migrations.txt
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ uWSGI>=2.0.19
whitenoise>=5.2,<6.6

# Linting
pylint>=2.17.4
pylint-django>=2.5.3
black>=23.3.0
pylint>=3.1.0
pylint-django>=2.5.5
black>=24.4.2

# Helpers
pyprof2calltree>=1.4,<1.5
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
import re
import sys

from setuptools import setup
from setuptools import setup, find_packages

PROJECT_DIR = os.path.dirname(__file__)

sys.path.append(os.path.join(PROJECT_DIR, "src"))
from oscar import get_version # noqa isort:skip

install_requires = [
"setuptools>=51.3.3",
"django>=3.2,<4.3",
# PIL is required for image fields, Pillow is the "friendly" PIL fork
"pillow>=6.0",
Expand Down Expand Up @@ -87,6 +88,8 @@
license="BSD",
platforms=["linux"],
include_package_data=True,
package_dir={'': 'src'},
packages=find_packages('src'),
python_requires=">=3.8",
install_requires=install_requires,
extras_require={
Expand Down
4 changes: 2 additions & 2 deletions src/oscar/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use 'alpha', 'beta', 'rc' or 'final' as the 4th element to indicate release type.
VERSION = (3, 2, 5, "alpha", 2)
VERSION = (3, 2, 5)


def get_short_version():
Expand All @@ -12,7 +12,7 @@ def get_version():
if VERSION[2]:
version = "%s.%s" % (version, VERSION[2])

if VERSION[3] != "final":
if len(VERSION) > 3 and VERSION[3] != "final":
mapping = {"alpha": "a", "beta": "b", "rc": "rc"}
version = "%s%s" % (version, mapping[VERSION[3]])
if len(VERSION) == 5:
Expand Down
3 changes: 2 additions & 1 deletion src/oscar/apps/customer/wishlists/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@ def process_wishlist_forms(self, wishlist_form, shared_emails_formset):
"The shared accounts won't be able to access your wishlist "
"because the visiblity is set to private."
)
messages.warning(self.request, msg)
elif wishlist.visibility == WishList.PUBLIC:
msg = _(
"You have added shared accounts to your wishlist but the visiblity "
"is public, this means everyone with a link has access to it."
)
messages.warning(self.request, msg)
messages.warning(self.request, msg)

return wishlist

Expand Down
1 change: 1 addition & 0 deletions src/oscar/apps/offer/abstract_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ def hide_time_if_zero(dt):

if self.start_datetime or self.end_datetime:
today = now()
is_satisfied = False
if self.start_datetime and self.end_datetime:
desc = _("Available between %(start)s and %(end)s") % {
"start": hide_time_if_zero(self.start_datetime),
Expand Down

0 comments on commit 0c64d66

Please sign in to comment.