Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Ранасингхе Мудиянселаге Патма Канта Кудагаммана
DevOps2022Pathma
Commits
29a027f3
Commit
29a027f3
authored
2 years ago
by
Ранасингхе Мудиянселаге Патма Канта Кудагаммана
Browse files
Options
Download
Patches
Plain Diff
Update .gitlab-ci.yml file for day5
parent
82773bbc
develop
day5
feature_new
master
to-develop
to-develop-spec
to-master
2 merge requests
!12
To master
,
!6
Update .gitlab-ci.yml file for day5
Pipeline
#73470
passed with stages
in 1 minute and 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+67
-0
.gitlab-ci.yml
with
67 additions
and
0 deletions
+67
-0
.gitlab-ci.yml
0 → 100644
+
67
−
0
View file @
29a027f3
stages
:
-
build
-
testing
-
packaging
build_application
:
stage
:
build
tags
:
-
docker_itsoft
script
:
-
echo "This application will build here..."
-
pwd
-
echo "Build application Done!"
lint-testing
:
stage
:
testing
tags
:
-
docker_itsoft
script
:
-
echo "This application will lint-test here..."
-
pwd
-
ls -a
-
echo "Lint test Done!"
unit-testing
:
stage
:
testing
tags
:
-
docker_itsoft
needs
:
-
job
:
'
lint-testing'
optional
:
true
before_script
:
-
echo "Prepare test data"
script
:
-
echo "This application will unit-test here..."
-
echo "Unit test Done!"
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"master"'
-
if
:
'
$CI_COMMIT_BRANCH
==
"develop"'
-
if
:
'
$CI_PIPELINE_SOURCE
==
"feature_new"'
build-image-job
:
stage
:
packaging
tags
:
-
docker_itsoft
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"master"'
variables
:
TAG
:
'
latest'
-
if
:
'
$CI_COMMIT_BRANCH
==
"develop"'
variables
:
TAG
:
'
dev'
image
:
docker:20.10.16
services
:
-
docker:20.10.16-dind
parallel
:
matrix
:
-
SERVICE
:
[
cat
,
dog
,
child
]
script
:
-
echo "This application will package here..."
-
cd $SERVICE
-
docker login docker.io -u $DOCKER_USERNAME -p $DOCKER_PWD
-
docker info
-
docker build -t docker.io/pathmakantha/$SERVICE:$TAG .
-
docker push docker.io/pathmakantha/$SERVICE:$TAG
-
echo "Packaging Done!"
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets