Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rdos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien David
rdos
Commits
bd1bd7cf
Commit
bd1bd7cf
authored
4 years ago
by
Julien David
Browse files
Options
Downloads
Patches
Plain Diff
Update gitlab ci
parent
40b89ddb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+4
-11
4 additions, 11 deletions
.gitlab-ci.yml
softwares/server/server.py
+11
-9
11 additions, 9 deletions
softwares/server/server.py
with
15 additions
and
20 deletions
.gitlab-ci.yml
+
4
−
11
View file @
bd1bd7cf
image
:
alpine
stages
:
-
build
-
test
job:build
:
stage
:
build
script
:
-
apk update
-
apk add python3
-
apk add py-pip
-
pip install pytest mysql-connector-python get_docker_secret docker
job:test:unit
:
before_script
:
-
echo "Install Dependancies"
-
sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
-
apk update
-
apk add python3
-
apk add py-pip
-
pip install pytest mysql-connector-python get_docker_secret docker
-
pip install pytest mysql-connector-python get_docker_secret docker
flake8
-
echo "Start Tests"
script
:
-
cd tests
-
pytest -v
-
cd ..
-
flake8 --max-line-length=120 softwares/server/*
after_script
:
-
echo "Tests have been done"
This diff is collapsed.
Click to expand it.
softwares/server/server.py
+
11
−
9
View file @
bd1bd7cf
#
a
uthors : Julien David & Ismail MOUMNI
#
A
uthors : Julien David & Ismail MOUMNI
import
socket
# SERVER PORT
__RDOS_Port__
=
9393
# Creating Socket IP4 TCP
def
server_conn
(
address
,
PORT
):
with
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
as
serv
:
#BINDING
serv
.
bind
((
address
,
PORT
))
# Listening to 1 CLient
#
BINDING
serv
.
bind
((
address
,
PORT
))
# Listening to 1 CLient
serv
.
listen
()
#
a
ccepting the connection from client and getting client IP
#
A
ccepting the connection from client and getting client IP
conn
,
addr
=
serv
.
accept
()
with
conn
:
# Sending
conn
.
send
(
bytes
(
"
Bonjour !!
"
,
"
utf-8
"
))
print
(
'
Connexion acceptée depuis l IP :
'
,
addr
)
# Sending
conn
.
send
(
bytes
(
"
Bonjour !!
"
,
"
utf-8
"
))
print
(
'
Connexion acceptée depuis l IP :
'
,
addr
)
# Receiving Data from Client
data
=
conn
.
recv
(
1024
)
print
(
data
)
serv
.
close
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment