Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tosca2doc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
CTI Tools
tosca2doc
Commits
6f51f033
Commit
6f51f033
authored
1 year ago
by
Miguel Angel Reina Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Adding gitlab-ci yaml file for automatic deployment
parent
2bb5c756
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#3174
passed
1 year ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+19
-0
19 additions, 0 deletions
.gitlab-ci.yml
relaunch.sh
+4
-4
4 additions, 4 deletions
relaunch.sh
with
23 additions
and
4 deletions
.gitlab-ci.yml
0 → 100644
+
19
−
0
View file @
6f51f033
# CI/CD:
#
# BUILD triggered by:
# - branches
#
#
Build tosca-ie docker image
:
stage
:
build
before_script
:
-
cp ./env_example env
script
:
-
./relaunch.sh $CI_COMMIT_BRANCH
rules
:
-
if
:
$CI_COMMIT_BRANCH
changes
:
-
Dockerfile
-
src/*
-
requirements.txt
\ No newline at end of file
This diff is collapsed.
Click to expand it.
relaunch.sh
+
4
−
4
View file @
6f51f033
...
@@ -11,13 +11,13 @@ if [ "$CNT" != "" ] ; then
...
@@ -11,13 +11,13 @@ if [ "$CNT" != "" ] ; then
docker stop
"
$CNT
"
docker stop
"
$CNT
"
fi
fi
if
[
"
$
1
"
==
"stop"
]
;
then
if
[
"
$
2
"
==
"stop"
]
;
then
exit
0
exit
0
fi
fi
sed
-i
-E
"s/(LAST_COMMIT=).+/
\1
$(
git
log
-n
1
--oneline
)
/"
env
sed
-i
-E
"s/(LAST_COMMIT=).+/
\1
$(
git
rev-parse HEAD
)
/"
env
docker build
-t
tosca-ie-sample:
latest
.
docker build
-t
tosca-ie-sample:
$1
.
docker run
-d
--restart
unless-stopped
-t
-p
5000:5000
--env-file
./env tosca-ie-sample
docker run
-d
--restart
unless-stopped
-t
-p
5000:5000
--env-file
./env tosca-ie-sample
:
$1
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