Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #34

Open
wants to merge 115 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
d14b82e
change port from 3000 to 8000
Oct 22, 2023
b8a7f16
add brach 'staging'
Oct 22, 2023
03d65ee
edit readme
Oct 22, 2023
c30a39b
edit readme
Oct 22, 2023
8f7bfbe
edit readme
Oct 22, 2023
242678d
edit readme
Oct 22, 2023
8943f84
edit readme
Oct 22, 2023
d460ec6
edit app
Oct 22, 2023
8c0424f
edit app
Oct 22, 2023
3e8d091
edit app
Oct 22, 2023
2f7d4c2
edit app
Oct 22, 2023
d4d3c9e
edit Jenkinsfile
Oct 22, 2023
3efc0b4
add timeout
Oct 22, 2023
ce7e057
stable version
Oct 22, 2023
bf66888
add variable TEST
Oct 22, 2023
b4187e5
add test.sh
Oct 22, 2023
e9e93d5
edit Jenkinsfile
Oct 23, 2023
0b4499c
edit Jenkinsfile
Oct 23, 2023
158d115
edit test.sh
Oct 23, 2023
2bff366
edit test job
Oct 23, 2023
7d6d6ec
edit test
Oct 23, 2023
8e0f9c6
edit test
Oct 23, 2023
ffe81bf
edit Jenkinsfile
Oct 23, 2023
79f568b
add 'app_port' parameter
Oct 23, 2023
91ecc80
add APP_PORT parameter
Oct 23, 2023
f658d5d
add APP_PORT parameter
Oct 23, 2023
11f2647
stable realease
Oct 23, 2023
fcf8777
stable realease
Oct 23, 2023
64961cb
add port mapping
Oct 23, 2023
8c271b4
add port mapping
Oct 23, 2023
a744ed1
add port mapping
Oct 23, 2023
db05241
add port mapping
Oct 23, 2023
caa0b3d
add port mapping
Oct 23, 2023
cc8dd7c
add port mapping
Oct 23, 2023
8c66eb7
add port mapping
Oct 23, 2023
5a6eb9b
add port mapping
Oct 23, 2023
e909679
add port mapping
Oct 23, 2023
19bf0ba
add port mapping
Oct 23, 2023
39bc867
add port mapping
Oct 23, 2023
112b5e7
add deploy.sh
Oct 24, 2023
dfa893d
add deploy.sh
Oct 24, 2023
b30561b
edit pipeline
Oct 24, 2023
a67b7ba
edit pipeline
Oct 24, 2023
cce8f0e
edit pipeline
Oct 24, 2023
6df591b
edit pipeline
Oct 24, 2023
97bcec2
edit pipeline
Oct 24, 2023
6540f67
edit pipeline
Oct 24, 2023
0409052
add Dockerfile
Oct 24, 2023
9cbca49
add Dockerfile
Oct 24, 2023
d1acc31
add Dockerfile
Oct 24, 2023
e1c87b0
add Dockerfile
Oct 24, 2023
9391e89
add Dockerfile
Oct 24, 2023
9da6740
add Dockerfile
Oct 24, 2023
ec930be
add Dockerfile
Oct 24, 2023
0086091
add scp
Oct 24, 2023
3576564
add scp
Oct 24, 2023
9d97304
edit Dockerfile
Oct 24, 2023
5dfa481
edit Dockerfile
Oct 24, 2023
664b1c8
test
Oct 24, 2023
2760afe
test
Oct 24, 2023
8dbec4e
test
Oct 24, 2023
dbe4f74
test
Oct 24, 2023
9bda651
test
Oct 24, 2023
2f57611
test
Oct 24, 2023
c2dd023
test
Oct 24, 2023
7afd6a8
test
Oct 24, 2023
c0bed49
test
Oct 24, 2023
38fe0e9
test
Oct 24, 2023
e7e7731
test
Oct 24, 2023
ced15d6
test
Oct 24, 2023
58601f1
test
Oct 24, 2023
5d7aa33
test
Oct 24, 2023
c2a559f
test
Oct 24, 2023
eeac4c7
test
Oct 24, 2023
ca36751
test
Oct 24, 2023
670855d
test
Oct 24, 2023
075d404
test
Oct 24, 2023
6c0c2f0
test
Oct 24, 2023
88f864d
test
Oct 24, 2023
75fccfa
test
Oct 24, 2023
fc32e7c
test
Oct 24, 2023
d903927
test
Oct 24, 2023
e325822
add cleanup
Oct 24, 2023
d8cc4ee
docker build no cache
Oct 24, 2023
fe9058f
edit Jenkinsfile
Oct 24, 2023
693925c
edit Jenkinsfile
Oct 24, 2023
8994df5
edit Jenkinsfile
Oct 24, 2023
fb021d6
edit Jenkinsfile
Oct 24, 2023
fa60f58
edit Jenkinsfile
Oct 24, 2023
f994a66
edit Jenkinsfile
Oct 24, 2023
8d644b8
edit Jenkinsfile
Oct 24, 2023
3b24826
edit Jenkinsfile
Oct 24, 2023
59289c5
edit Jenkinsfile
Oct 24, 2023
96d7862
edit Jenkinsfile
Oct 24, 2023
4dac38e
edit Jenkinsfile
Oct 24, 2023
6a51d02
edit Jenkinsfile
Oct 24, 2023
405f945
edit Jenkinsfile
Oct 24, 2023
d1ebd0c
edit Jenkinsfile
Oct 24, 2023
4cfaa6c
edit Jenkinsfile
Oct 24, 2023
ee02333
edit Jenkinsfile
Oct 24, 2023
913a8d7
edit Jenkinsfile
Oct 24, 2023
5445fe1
edit Jenkinsfile
Oct 24, 2023
b9d6a1d
edit Jenkinsfile
Oct 24, 2023
e829bff
edit Jenkinsfile
Oct 24, 2023
be33023
edit Jenkinsfile
Oct 24, 2023
2c5d094
edit Jenkinsfile
Oct 24, 2023
38faffd
edit Jenkinsfile
Oct 24, 2023
44e9ac7
edit Jenkinsfile
Oct 24, 2023
410a915
edit Jenkinsfile
Oct 24, 2023
32877d5
clean
Oct 24, 2023
123197b
stable release
Oct 25, 2023
cb3e15e
edit Jenkinsfile
Oct 26, 2023
83d6595
Delete .drone.yml
ignatstrelets Nov 1, 2023
599a721
Delete .gitlab-ci.yml
ignatstrelets Nov 1, 2023
faa1352
Update Jenkinsfile
ignatstrelets Nov 16, 2023
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
7 changes: 0 additions & 7 deletions .drone.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .gitlab-ci.yml

This file was deleted.

12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
# use the latest node LTS release
FROM node:gallium
FROM node:alpine
WORKDIR /usr/src/app

# copy package.json and package-lock.json and install packages. we do this
# separate from the application code to better use docker's caching
# `npm install` will be cached on future builds if only the app code changed
COPY package*.json ./
RUN npm install

# copy the app
COPY . .

# expose port 3000 and start the app
EXPOSE 3000
CMD [ "npm", "start" ]
ARG APP_PORT=8000

EXPOSE ${APP_PORT}
25 changes: 0 additions & 25 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,26 +1 @@
#!/usr/bin/env groovy

pipeline {

agent {
docker {
image 'node'
args '-u root'
}
}

stages {
stage('Build') {
steps {
echo 'Building...'
sh 'npm install'
}
}
stage('Test') {
steps {
echo 'Testing...'
sh 'npm test'
}
}
}
}
41 changes: 2 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,2 @@
# Hello Hapi

An example [Hapi.js](https://hapijs.com/) app with https://github.com/hapijs/lab tests. Solution to Exercise 1 from [Exercises for Programmers](http://pragprog.com/titles/bhwb), copyright 2015 The Pragmatic Programmers.

## Usage

Install dependencies:

```
npm install
```

Run with

`npm start`

to fire the server. VIsit <http://localhost:3000/hello/Homer> to see the result

Replace `homer` with your name to echo the response. Use `Homer%20Simpson` to test that URL decoding for spaces works

## Running tests

Run tests with `npm test`

This will run tests and a linter using the default linting settings.

Run tests and code coverage with `npm run coverage`.

## License

MIT

Copyright (c) 2016 Brian P. Hogan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# branch staging
##### build, test and deploy containerized node.js web app via jenkins
7 changes: 5 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

const Hapi = require('@hapi/hapi');

const app_port = process.env.APP_PORT || 8000;

console.log('Listening on port: ' + app_port);

const Server = new Hapi.Server({
host: 'localhost',
port: 3000
port: app_port
});
const Hello = require('./lib/hello');

Expand All @@ -18,7 +22,6 @@ Server.route({
}
});

// don't start server if this file was required

if (!module.parent) {

Expand Down
Loading