Skip to content

Commit

Permalink
Merge pull request #334 from helxplatform/jan_2024_patches
Browse files Browse the repository at this point in the history
Jan 2024 patches
  • Loading branch information
joshua-seals authored Jan 31, 2024
2 parents 67de2e4 + bd41e3c commit d69456e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 47 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
- .githooks
tags-ignore:
- 'v[0-9]+.[0-9]+.*'
- '*'
jobs:
build-push-release:
runs-on: ubuntu-latest
Expand All @@ -40,7 +41,7 @@ jobs:

# https://github.com/marketplace/actions/git-semantic-version
- name: Semver Check
uses: paulhatch/semantic-version@v5.0.3
uses: paulhatch/semantic-version@v5.3.0
id: version
with:
# The prefix to use to identify tags
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ RUN adduser --disabled-login --home $HOME --shell /bin/bash --uid $UID $USER &&

RUN set -x && apt-get update && \
chown -R $UID:$UID $APP_HOME && \
apt-get install -y build-essential git xmlsec1 curl
apt-get install -y build-essential git xmlsec1

# Specifically install node v14.x, since otherwise apt-get will install a much more outdated version.
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash
RUN apt-get install -y nodejs
# Removing but leaving commented in case Tycho needs this for swagger.
# Version 3.3.1 currently, if not complaints v3.3.3 this can be
# completely removed.
# RUN curl -sL https://deb.nodesource.com/setup_14.x | bash
# RUN apt-get install -y nodejs

WORKDIR $APP_HOME
COPY . .
Expand Down
38 changes: 0 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ BRANDS := braini bdc heal restartr scidas eduhelx argus tracs eduhelx-s
MANAGE := ${PYTHON} appstore/manage.py
SETTINGS_MODULE := ${DJANGO_SETTINGS_MODULE}

# smoke|test
ARTILLERY_ENV := ${ARTILLERY_ENVIRONMENT}
# URL pointing to appstore base path, e.g. http://localhost:8000
ARTILLERY_TARGET := ${ARTILLERY_TARGET}
# Duration in seconds that an Artillery load test lasts.
ARTILLERY_DURATION := ${ARTILLERY_DURATION}
# Amount of users to instantiate per second during an Artillery load test.
ARTILLERY_ARRIVAL_RATE := ${ARTILLERY_ARRIVAL_RATE}

ifdef GUNICORN_WORKERS
NO_OF_GUNICORN_WORKERS := $(GUNICORN_WORKERS)
else
Expand Down Expand Up @@ -93,40 +84,11 @@ clean:
${MANAGE} flush
${PYTHON} -m pip uninstall -y -r requirements.txt

#install: Install application along with required development packages
install: install.artillery
${PYTHON} -m pip install --upgrade pip
${PYTHON} -m pip install -r requirements.txt

#test: Run all tests
test:
$(foreach brand,$(BRANDS),SECRET_KEY=${SECRET_KEY} DEV_PHASE=stub DJANGO_SETTINGS_MODULE=appstore.settings.$(brand)_settings ${MANAGE} test $(APP_LIST);)

#install.artillery: Install required packages for artillery testing
install.artillery:
cd artillery-tests; \
npm install

#test.artillery: Run artillery testing
test.artillery:
ifndef ARTILLERY_ENV
$(error ARTILLERY_ENVIRONMENT not set (smoke|load))
endif
ifndef ARTILLERY_TARGET
$(error ARTILLERY_TARGET not set (should point to the base URL of appstore, e.g. "http://localhost:8000"))
endif
ifeq "${ARTILLERY_ENV}" "load"
ifndef ARTILLERY_DURATION
$(error ARTILLERY_DURATION not set when ARTILLERY_ENVIRONMENT=load (seconds that a load test lasts))
endif
ifndef ARTILLERY_ARRIVAL_RATE
$(error ARTILLERY_ARRIVAL_RATE not set when ARTILLERY_ENVIRONMENT=load (users instantiated per second))
endif
endif
cd artillery-tests; \
ls -1 tests | xargs -L1 -I%TEST_NAME% npx artillery run tests/%TEST_NAME% --environment ${ARTILLERY_ENV} --target ${ARTILLERY_TARGET}


#start: Run the gunicorn server
start: build.postgresql.local
if [ -z ${DJANGO_SETTINGS_MODULE} ]; then make help && echo "\n\nPlease set the DJANGO_SETTINGS_MODULE environment variable\n\n"; exit 1; fi
Expand Down
8 changes: 5 additions & 3 deletions appstore/appstore/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,15 @@
)

# Email configuration
# UNC Relay: relay.unc.edu:25
# Renci Relay: relay.renci.org
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = "smtp.gmail.com"
EMAIL_PORT = "587"
EMAIL_HOST =os.environ.get("EMAIL_HOST","")
EMAIL_PORT = os.environ.get("EMAIL_PORT", "")
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER", "[email protected]")
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD", "")
RECIPIENT_EMAILS = os.environ.get("RECIPIENT_EMAILS", "")
EMAIL_USE_TLS = True
EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS", False) # Boolean
DEFAULT_FROM_EMAIL = os.environ.get("APPSTORE_DEFAULT_FROM_EMAIL", EMAIL_HOST_USER)
DEFAULT_SUPPORT_EMAIL = os.environ.get(
"APPSTORE_DEFAULT_SUPPORT_EMAIL", EMAIL_HOST_USER
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django==3.2
Django==3.2.23
django-allauth==0.54.0
django-cors-headers==3.7.0
django-crispy-forms==1.11.2
Expand Down

0 comments on commit d69456e

Please sign in to comment.