Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pythonApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Syed Bilal Raees
pythonApp
Commits
f27ea211
Commit
f27ea211
authored
Jun 02, 2022
by
Syed Bilal Raees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update .gitlab-ci.yml
parent
023b70b6
Pipeline
#2094
passed with stage
in 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
44 deletions
+45
-44
.gitlab-ci.yml
.gitlab-ci.yml
+45
-44
No files found.
.gitlab-ci.yml
View file @
f27ea211
#
stages:
stages
:
# - deploy
# - deploy
# - build
# - build
#test_app:
#test_app:
#
build_app:
build_app
:
#
image: python:3.6
image
:
python:3.6
# stage: test
# stage: test
# stage: build
# stage: build
#
before_script:
before_script
:
#
- python3 -V
-
python3 -V
#
- ls -ltr
-
ls -ltr
#
- python3 -m venv venv
-
python3 -m venv venv
#
- python3 -m venv python3-virtualenv
-
python3 -m venv python3-virtualenv
#
- source python3-virtualenv/bin/activate
-
source python3-virtualenv/bin/activate
#
- pwd
-
pwd
#
- whoami
-
whoami
#
script:
script
:
#
- pip install Flask
-
pip install Flask
# - echo $PATH
# - echo $PATH
# - /usr/bin/find / -name systemctl
# - /usr/bin/find / -name systemctl
# - export FLASK_APP=hello.py
# - export FLASK_APP=hello.py
...
@@ -31,29 +31,30 @@
...
@@ -31,29 +31,30 @@
# - sudo systemctl start python.service
# - sudo systemctl start python.service
# - sudo systemctl start prod.service
# - sudo systemctl start prod.service
# - sudo systemctl status python.service
# - sudo systemctl status python.service
# - |
-
|
# if [[ $CI_COMMIT_REF_NAME == master ]]; then
if [[ $CI_COMMIT_REF_NAME == master ]]; then
# echo "it's a prod server"
echo "it's a prod server"
# sudo systemctl start prod.service
sudo systemctl start prod.service
# elif [[ $CI_COMMIT_REF_NAME == dev ]]; then
elif [[ $CI_COMMIT_REF_NAME == dev ]]; then
# else
echo "it's a dev server"
# echo "it's a dev server"
sudo systemctl start prod.service
# sudo systemctl start python.service
else
# fi
echo "hello world"
fi
# environment:
# environment:
# name: staging
# name: staging
# url : http://localhost/test
# url : http://localhost/test
#build_app:
#build_app:
job1
:
#
job1:
before_script
:
#
before_script:
-
python3 -V
#
- python3 -V
-
ls -ltr
#
- ls -ltr
-
python3 -m venv venv
#
- python3 -m venv venv
-
python3 -m venv python3-virtualenv
#
- python3 -m venv python3-virtualenv
-
source python3-virtualenv/bin/activate
#
- source python3-virtualenv/bin/activate
-
pwd
#
- pwd
# - whoami
# - whoami
#stages:
#stages:
...
@@ -62,22 +63,22 @@ job1:
...
@@ -62,22 +63,22 @@ job1:
#production:
#production:
# stage: production
# stage: production
image
:
python:3.6
#
image: python:3.6
script
:
#
script:
-
pip install Flask
#
- pip install Flask
-
echo "deploying to prod server"
#
- echo "deploying to prod server"
-
sudo systemctl start python.service
#
- sudo systemctl start python.service
only
:
#
only:
-
master
#
- master
# development:
# development:
# stage: development
# stage: development
image
:
python:3.6
#
image: python:3.6
script
:
#
script:
-
pip install Flask
#
- pip install Flask
-
echo "deploying to development server"
#
- echo "deploying to development server"
-
sudo systemctl start prod.service
#
- sudo systemctl start prod.service
only
:
#
only:
-
dev
#
- dev
tags
:
tags
:
-
ci
-
ci
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment