diff --git a/projects/age-calculator/Jenkinsfile b/projects/age-calculator/Jenkinsfile new file mode 100644 index 0000000..1f9bd23 --- /dev/null +++ b/projects/age-calculator/Jenkinsfile @@ -0,0 +1,34 @@ +pipeline { + agent {label "kritika"} + + stages { + stage('Code') { + steps { + echo 'This is a cloning part' + git url:"https://github.com/Kritika70/HTML-CSS-JavaScript-projects-for-beginners", branch:"main" + echo "Cloning Successful" + } + } + stage('Test'){ + steps{ + echo "There is no testing here" + echo "Hello!" + } + } + stage('Deploy'){ + steps{ + echo "Deploying to Apache server...." + sh "sudo cp -r /home/ubuntu/workspace/practice-jenkins/projects/age-calculator/* /var/www/html/" + echo "Deployment successful!!" + } + } + } + post{ + success{ + echo 'Deployment Successful!' + } + failure{ + echo 'Deployment failure' + } + } +} diff --git a/projects/amine-pics-generator/index.html b/projects/amine-pics-generator/index.html deleted file mode 100644 index 0cb6e43..0000000 --- a/projects/amine-pics-generator/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - Anime Pics Generator - - - -
-

Anime Pics Generator

- -
- -

Anime Name

-
-
- - - \ No newline at end of file diff --git a/projects/amine-pics-generator/index.js b/projects/amine-pics-generator/index.js deleted file mode 100644 index ab0dfe5..0000000 --- a/projects/amine-pics-generator/index.js +++ /dev/null @@ -1,25 +0,0 @@ -const btnEl = document.getElementById("btn"); -const animeContainerEl = document.querySelector(".anime-container"); -const animeImgEl = document.querySelector(".anime-img"); -const amineNameEl = document.querySelector(".anime-name"); - -btnEl.addEventListener("click", async function () { - try { - btnEl.disabled = true; - btnEl.innerText = "Loading..."; - amineNameEl.innerText = "Updating..."; - animeImgEl.src = "spinner.svg"; - const response = await fetch("https://api.catboys.com/img"); - const data = await response.json(); - btnEl.disabled = false; - btnEl.innerText = "Get Anime"; - animeContainerEl.style.display = "block"; - animeImgEl.src = data.url; - amineNameEl.innerText = data.artist; - } catch (error) { - console.log(error); - btnEl.disabled = false; - btnEl.innerText = "Get Anime"; - amineNameEl.innerText = "An error happened, please try again"; - } -}); diff --git a/projects/amine-pics-generator/spinner.svg b/projects/amine-pics-generator/spinner.svg deleted file mode 100644 index fd9b80a..0000000 --- a/projects/amine-pics-generator/spinner.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/projects/amine-pics-generator/style.css b/projects/amine-pics-generator/style.css deleted file mode 100644 index 077c804..0000000 --- a/projects/amine-pics-generator/style.css +++ /dev/null @@ -1,56 +0,0 @@ -body{ - margin: 0; - background: linear-gradient(to right, lightblue, yellow); - display: flex; - height: 100vh; - justify-content: center; - align-items: center; - font-family: 'Courier New', Courier, monospace; -} - -.container{ - background: aliceblue; - border-radius: 10px; - box-shadow: 0 10px 20px rgba(0,0,0,0.3); - text-align: center; - padding: 10px; - width: 450px; - margin: 5px; -} - -.btn{ - background-color: green; - color: aliceblue; - padding: 10px 30px; - font-size: 16px; - margin-bottom: 30px; - border-radius: 6px; - cursor: pointer; - -} - -.btn:disabled{ - background-color: gray; - cursor: not-allowed; -} - -.anime-img{ - height: 300px; - width: 300px; - border-radius: 50%; - border: 3px solid green; -} - -.anime-name{ - margin: 20px; - background-color: green; - color: aliceblue; - padding: 10px; - border-radius: 6px; - font-size: 17px; - font-weight: 600; -} - -.anime-container{ - display: none; -} \ No newline at end of file