Skip to content
Open

Main #30

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 163 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: jenkins-CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Trigger jenkins job
uses: joshlk/jenkins-githubaction@master
with:
url: http://139.162.253.204:8080
job_name: EndCourseProject
username: ${{ secrets.UNAME }}
api_token: ${{ secrets.MYTOKEN }}
timeout: "1000"

# name: Trigger Jenkins Pipeline
# on: push

# env:
# JENKINS_HOSTS: http://139.162.253.204:8080/ ## jenkins base url
# #JENKINS_JOBS: ## builds the HelloWorld job inside testJobs
# #JENKINS_PARAM: no

# jobs:
# launch_jenkins_job:
# name: trigger jenkins job
# runs-on: ubuntu-latest
# steps:
# -
# name: Trigger Jenkins Job
# uses: sbitio/trigger-jenkins-job@master
# with:
# JENKINS_USER: ${{ secrets.JUSER }}
# JENKINS_TOKEN: ${{ secrets.UTOKEN }}
# JENKINS_HOST: ${{ env.JENKINS_HOSTS }}
# JENKINS_JOB: job/EndCourseProject
# #JENKINS_PARAMS: ${{ env.JENKINS_PARAM }}
# on:
# push:
# branches:
# - main

# jobs:
# trigger-jenkins:
# runs-on: ubuntu-latest
# steps:
# - name: Trigger Jenkins
# uses: appleboy/jenkins-action@master
# with:
# url: "http://139.162.253.204:8080/"
# user: ${{ secrets.JUSER }}
# token: ${{ secrets.UTOKEN }}
# job: "EndCourseProject"

# on: push

# jobs:
# launch_jenkins_job:
# name: trigger jenkins job
# runs-on: ubuntu-latest
# steps:
# -
# name: Trigger Jenkins Job
# uses: sbitio/trigger-jenkins-job@master
# with:
# JENKINS_USER: ${{ secrets.JUSER }}
# JENKINS_TOKEN: ${{ secrets.UTOKEN }}
# JENKINS_HOST: "http://139.162.253.204:8080"
# JENKINS_JOB: job/EndCourseProject/build


# on: push

# env:
# JENKINS_HOST: http://139.162.253.204:8080 ## jenkins base url
# JENKINS_JOB: job/EndCourseProject ## builds the HelloWorld job inside testJobs
# JENKINS_PARAMS: no

# jobs:
# launch_jenkins_job:
# name: trigger jenkins job
# runs-on: ubuntu-latest
# steps:
# - name: Trigger Jenkins Job
# uses: sbitio/trigger-jenkins-job@master
# with:
# JENKINS_USER: ${{ secrets.JUSER }}
# JENKINS_TOKEN: ${{ secrets.UTOKEN }}
# JENKINS_HOST: ${{ env.JENKINS_HOST }}
# JENKINS_JOB: ${{ env.JENKINS_JOB }}
# JENKINS_PARAMS: ${{ env.JENKINS_PARAMS }}



# name: Trigger Jenkins Pipeline

# on:
# push:
# branches:
# - main

# jobs:
# trigger-jenkins:
# runs-on: ubuntu-latest
# steps:
# - name: Trigger Jenkins
# run: curl -X POST "http://139.162.253.204:8080/job/EndCourseProject/build" --user ${{ secrets.JUSER }}:${{ secrets.UTOKEN }}


# name: Trigger Jenkins Job

# on:
# push:
# branches:
# - main # Change this to the branch you want to trigger the action on

# jobs:
# trigger-jenkins:
# runs-on: ubuntu-latest

# steps:
# - name: Trigger Jenkins Job
# run: |
# curl -X POST "http://139.162.253.204:8080/job/EndCourseProject/build" \
# --user "${{ secrets.JUSER }}:${{ secrets.UTOKEN }}" \
# --data-urlencode "BRANCH=main" \
# --data-urlencode "DEPLOY_ENV=staging" \
# --data-urlencode "RUN_TESTS=true"


# name: jenkins-CI

# # Controls when the workflow will run
# on:
# # Triggers the workflow on push or pull request events but only for the main branch
# push:
# branches: [ main ]


# # A workflow run is made up of one or more jobs that can run sequentially or in parallel
# jobs:
# # This workflow contains a single job called "build"
# build:
# name: Build
# runs-on: ubuntu-latest
# steps:
# - name: Trigger jenkins job
# uses: joshlk/jenkins-githubaction@master
# with:
# url: "http://139.162.253.204:8080"
# job_name: job/EndCourseProject/build
# username: ${{ secrets.JUSER }}
# api_token: ${{ secrets.UTOKEN }}
# timeout: "1000"
2 changes: 2 additions & 0 deletions t.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yo
1
94 changes: 91 additions & 3 deletions webapp/src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
@@ -1,3 +1,91 @@
<h1> Hello, Welcome to Simple DevOps Project !! </h1>
<h2> Deploying on a kubernetes using ansible for Valaxy Technologies </h2>
<h2> Glad to see you here </h2>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Backyard BBQ</title>
<!-- Bootstrap CSS CDN -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background-color: #f8f9fa;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.jumbotron {
background-image: url('https://images.unsplash.com/photo-1556911220-e15b28f1c14a');
background-size: cover;
color: white;
text-shadow: 2px 2px 4px #000000;
}
.menu-item {
border: 1px solid #dee2e6;
border-radius: 5px;
padding: 10px;
background-color: #ffffff;
margin-bottom: 20px;
}
</style>
</head>
<body>

<!-- Header Section -->
<div class="jumbotron text-center">
<h1 class="display-4"> Welcome to my End Course Project, where my World of Food awaits! </h1>
<p class="lead">Where the grill is always hot, and the drinks are always cold!! IF YOU THIS THEN THE GITHUB ACTION INVOCATION WORKS, yes its working</p>
</div>

<!-- Main Content Section -->
<div class="container">
<!-- Food Section -->
<h2 class="mb-4">Our BBQ Menu</h2>
<div class="row">
<div class="col-md-4">
<div class="menu-item">
<h4>Grilled Burgers</h4>
<p>Juicy, flame-grilled beef patties with all the fixings.</p>
</div>
</div>
<div class="col-md-4">
<div class="menu-item">
<h4>BBQ Ribs</h4>
<p>Slow-cooked pork ribs, slathered in our signature BBQ sauce.</p>
</div>
</div>
<div class="col-md-4">
<div class="menu-item">
<h4>Grilled Vegetables</h4>
<p>A mix of seasonal veggies, perfectly grilled and seasoned.</p>
</div>
</div>
</div>

<!-- Drinks Section -->
<h2 class="mt-5 mb-4">Refreshing Drinks</h2>
<div class="row">
<div class="col-md-4">
<div class="menu-item">
<h4>Lemonade</h4>
<p>Freshly squeezed lemons with a hint of mint.</p>
</div>
</div>
<div class="col-md-4">
<div class="menu-item">
<h4>Cold Brew Iced Coffee</h4>
<p>Rich, smooth, and refreshing cold brew coffee.</p>
</div>
</div>
<div class="col-md-4">
<div class="menu-item">
<h4>Ice-Cold Beer</h4>
<p>Your favorite brews, served ice-cold.</p>
</div>
</div>
</div>
</div>

<!-- Bootstrap JS, Popper.js, and jQuery -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>