File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -5,23 +5,21 @@ pipeline {
5
5
}
6
6
stages {
7
7
stage(" Build" ) {
8
- steps {
9
- sh " git clone https://github.com/codingelle/django-whatsapp-web-clone.git"
10
- dir(" django-whatsapp-web-clone" ){
11
- sh " podman build -t django-app ."
12
- }
8
+ steps {
13
9
sh """
10
+ git clone https://github.com/codingelle/django-whatsapp-web-clone.git
14
11
podman pod create -n ci-pod -p 8081:80 -p 8082:8082 -p 6379:6379 -p 5432:5432
15
12
podman run --pod=ci-pod -d --name redis-svc registry.redhat.io/rhel8/redis-5:1-160.1647451816
16
13
podman run --pod=ci-pod -d --name postgres-svc --env-file=$MYHOME /.env registry.redhat.io/rhel8/postgresql-12:1-99.1647451835
17
- podman run --pod=ci-pod -d --name app-svc --env-file=$MYHOME /.env localhost/django-app:latest
18
14
"""
15
+ // podman run --pod=ci-pod -d --name app-svc --env-file=$MYHOME/.env localhost/django-app:latest
19
16
}
20
17
}
21
18
22
19
stage(" Test" ) {
23
20
steps {
24
- sh ' podman exec -ti app-svc bash -c "python manage.py test"'
21
+ sh ' podman run -u root --pod ci-pod --name app-svc --env-file=$MYHOME/.env -v $MYHOME/:/opt/app-root/src/ registry.access.redhat.com/ubi8/python-38 bash -c "pip install -U pip && pip install -r requirements.txt && python manage.py migrate && python manage.py createsuperuser --no-input && python manage.py test"'
22
+ // sh 'podman run -u root --pod ci-pod --name app-svc --env-file=$MYHOME/.env -v $MYHOME/:/opt/app-root/src/ registry.access.redhat.com/ubi8/python-38 bash -c "pip install -U pip && pip install -r requirements.txt && python manage.py migrate && python manage.py createsuperuser --no-input && daphne -b 0.0.0.0 -p 8080 django_channel_tutorial.asgi:application && python manage.py test"'
25
23
}
26
24
}
27
25
You can’t perform that action at this time.
0 commit comments