Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5902c34
changes
jonnygovish Jun 24, 2020
bc9f8df
procfile
jonnygovish Jun 24, 2020
47b51dc
db name
jonnygovish Jun 24, 2020
7a239b5
Add a test file
jonnygovish Aug 6, 2020
ef7fadf
config file for the database
jonnygovish Aug 6, 2020
3892250
Add new dependencies
jonnygovish Aug 6, 2020
22d3625
add config
jonnygovish Aug 6, 2020
c4e2a3b
database config
jonnygovish Aug 7, 2020
6d3af18
Update _config.js
brianmarete Aug 13, 2020
67ae1a8
Update serverTest.js
brianmarete Aug 13, 2020
4f35c3b
Update package.json
brianmarete Aug 13, 2020
f01d53e
Update _config.js
brianmarete Aug 13, 2020
18ece3b
Update _config.js
brianmarete Aug 13, 2020
94d540f
inserted my atlas user cridecial
rashidjosphat Sep 20, 2024
45bfdad
updating the server setting to config with atlas
rashidjosphat Sep 20, 2024
b6c4903
added the jenkins file
rashidjosphat Sep 20, 2024
f690dd0
i set the pipeline to the credential of jenkins
rashidjosphat Sep 20, 2024
6609acd
just added the milestone 2 to the landing page
rashidjosphat Sep 20, 2024
20d1230
hooree finally i have known how the application works
rashidjosphat Sep 20, 2024
0f4e97f
Merge branch 'test'
rashidjosphat Sep 20, 2024
8ea80c4
finally my test has passed
rashidjosphat Sep 20, 2024
edd7acd
configuring the jenkins file to initiate test
rashidjosphat Sep 20, 2024
9b86022
completed the marging step "milestone 3 added"
rashidjosphat Sep 20, 2024
d29d7ba
just a few changes in the jenkins file for sending emails
rashidjosphat Sep 21, 2024
ffaf58e
i forgot to add the culprits if the test was success
rashidjosphat Sep 21, 2024
ca6d13e
just few changes on the failed email
rashidjosphat Sep 21, 2024
50422b1
i missed a comma
rashidjosphat Sep 21, 2024
b11527a
Update Jenkinsfile
rashidjosphat Sep 21, 2024
b0a2999
configuring with slack
rashidjosphat Sep 21, 2024
c6c9168
adding all the milestones
rashidjosphat Sep 21, 2024
1eb012e
adding the url link
rashidjosphat Sep 21, 2024
4e03d2c
adding the build stage
rashidjosphat Sep 22, 2024
c8b15d1
adding the build stage
rashidjosphat Sep 22, 2024
333d146
Update server.js
rashidjosphat Sep 22, 2024
30fb2e0
Create README.md
rashidjosphat Sep 25, 2024
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node_modules
node_modules/
67 changes: 67 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
pipeline {
agent any
environment {
RENDER_DEPLOY_URL = 'https://api.render.com/deploy/srv-crmk3vo8fa8c73ak0q5g'
RENDER_API_KEY = credentials('ccfca321-a4e8-4c64-9ff5-1848aea5b33c')
}
tools {
nodejs 'nodejs' // Required tool (1 point)
}
stages {
stage('Cloning Repo') {
steps {
git 'https://github.com/rashidjosphat/gallery_ip1.git' // Repository is correctly hooked (1 point)
}
}
stage('Installing Dependencies') {
steps {
sh 'npm install' // Installs Node and other dependencies (1 point)
}
}
stage('building the application'){steps{sh 'echo building the application'}}
stage('Testing the Application') {
steps {
sh 'npm test' // Tests the project (1 point)
}
}
stage('Activation of Deployment') {
steps {
script {
def response = sh(script: """
curl -X POST '${RENDER_DEPLOY_URL}?key=${RENDER_API_KEY}' \
-H 'Content-Type: application/json' \
-d '{}'
""", returnStdout: true).trim()

echo "Deployment triggered successfully via Render. If nothing else, it's time for some rest. 😊"
}
}
}
}
post {
failure {
emailext (
to: 'jamesrashid226@gmail.com',
subject: "Build Failed 😔: ${env.JOB_NAME} #${env.BUILD_NUMBER}",
body: """
The build failed for ${env.JOB_NAME} #${env.BUILD_NUMBER}.
"""
) // Emails on failure (1 point)
// Slack notification on failure
slackSend(channel: '#social', message: "Build Failed 😔: ${env.JOB_NAME} #${env.BUILD_NUMBER}. Render Deployment URL: ${RENDER_DEPLOY_URL}")
}
success {
emailext (
to: 'jamesrashid226@gmail.com',
subject: "Build Succeeded 🎉: ${env.JOB_NAME} #${env.BUILD_NUMBER}",
body: """
The build was successful for ${env.JOB_NAME} #${env.BUILD_NUMBER}.

Build URL: ${env.BUILD_URL}
"""
) // Emails on success, but the focus is on failure (already counted)
// Slack notification on success
slackSend(channel: '#social', message: "Build succeeded 🎉: ${env.JOB_NAME} #${env.BUILD_NUMBER}. Render Deployment URL: ${RENDER_DEPLOY_URL}. the site is at https://ip1-m6to.onrender.com")
}
}
}
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node server.js
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Live demo
you can view my web application at [https://ip1-m6to.onrender.com]
7 changes: 4 additions & 3 deletions _config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ var config = {}

// Update to have your correct username and password
config.mongoURI = {
production: 'mongodb+srv://<USERNAME>:<PASSWORD>@gallery.wc344.mongodb.net/darkroom?retryWrites=true&w=majority',
development: 'mongodb+srv://<USERNAME>:<PASSWORD>@gallery.wc344.mongodb.net/darkroom-dev?retryWrites=true&w=majority',
test: 'mongodb+srv://<USERNAME>:<PASSWORD>@gallery.wc344.mongodb.net/darkroom-test?retryWrites=true&w=majority',
production: 'mongodb+srv://james_rashid:james_rashid@cluster0.bwtll.mongodb.net/darkroom?retryWrites=true&w=majority',
development: 'mongodb+srv://james_rashid:james_rashid@cluster0.bwtll.mongodb.net/darkroom-dev?retryWrites=true&w=majority',
test: 'mongodb+srv://james_rashid:james_rashid@cluster0.bwtll.mongodb.net/darkroom-test?retryWrites=true&w=majority',
}

module.exports = config;
Loading