Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
COM3014
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Abdelsamad, Mouaz R (UG - SISC)
COM3014
Commits
c24b29aa
Commit
c24b29aa
authored
1 year ago
by
Abdelsamad, Mouaz R (UG - SISC)
Browse files
Options
Downloads
Patches
Plain Diff
Remove unnecessary file
parent
187cc592
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab -ci.yml
+0
-119
0 additions, 119 deletions
.gitlab -ci.yml
with
0 additions
and
119 deletions
.gitlab -ci.yml
deleted
100644 → 0
+
0
−
119
View file @
187cc592
##################
# CI/CD Pipeline #
##################
stages
:
-
build
-
test
-
deploy
###############
# Build Stage #
###############
build_user_service
:
stage
:
build
script
:
-
echo "Building User Microservice"
-
dotnet publish UserMicroservice -c Release -o ./output/UserMicroservice
artifacts
:
paths
:
-
output/UserMicroservice/
build_flight_service
:
stage
:
build
script
:
-
echo "Building Flight Microservice"
-
dotnet publish FlightMicroservice -c Release -o ./output/FlightMicroservice
artifacts
:
paths
:
-
output/FlightMicroservice/
build_booking_service
:
stage
:
build
script
:
-
echo "Building Booking Microservice"
-
dotnet publish BookingMicroservice -c Release -o ./output/BookingMicroservice
artifacts
:
paths
:
-
output/BookingMicroservice/
build_gateway_api
:
stage
:
build
script
:
-
echo "Building Gateway API"
-
dotnet publish GatewayAPI -c Release -o ./output/GatewayAPI
artifacts
:
paths
:
-
output/GatewayAPI/
build_client_app
:
stage
:
build
script
:
-
echo "Building Client Application"
-
cd client
-
npm install
-
npm run build
-
mkdir -p ../output/client
-
cp -R dist/* ../output/client/
artifacts
:
paths
:
-
output/client/
##############
# Test Stage #
##############
test-services
:
stage
:
test
script
:
-
echo "Running unit tests..."
-
find . -name "*.Tests.csproj" -exec dotnet test {} \;
artifacts
:
when
:
always
reports
:
junit
:
-
"
**/TestResults/*.xml"
coverage
:
'
/^Total
coverage:
(\d+\.\d+)%/'
################
# Deploy Stage #
################
deploy_services_to_registry
:
stage
:
deploy
script
:
-
echo "Publishing User Microservice to GitLab Package Registry..."
-
dotnet nuget push "output/UserMicroservice/*.nupkg" --source "https://gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/packages/nuget" --api-key $CI_JOB_TOKEN
-
echo "Publishing Flight Microservice to GitLab Package Registry..."
-
dotnet nuget push "output/FlightMicroservice/*.nupkg" --source "https://gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/packages/nuget" --api-key $CI_JOB_TOKEN
-
echo "Publishing Booking Microservice to GitLab Package Registry..."
-
dotnet nuget push "output/BookingMicroservice/*.nupkg" --source "https://gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/packages/nuget" --api-key $CI_JOB_TOKEN
-
echo "Publishing Gateway API to GitLab Package Registry..."
-
dotnet nuget push "output/GatewayAPI/*.nupkg" --source "https://gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/packages/nuget" --api-key $CI_JOB_TOKEN
-
echo "Publishing Client Application to GitLab NPM Registry..."
-
cd output/client
-
npm pack
-
npm publish --registry "https://gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/packages/npm" --auth "//gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/packages/npm/:_authToken=$CI_JOB_TOKEN"
dependencies
:
-
build_user_service
-
build_client_app
-
build_gateway_api
-
build_booking_service
-
build_flight_service
only
:
-
/^release\/.*$/
deploy_docker_images
:
stage
:
deploy
script
:
-
echo "Building and pushing Docker images..."
-
docker-compose -f docker-compose.yml build
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker-compose -f docker-compose.yml push
only
:
-
/^release\/.*$/
\ No newline at end of file
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