Skip to content

Commit 89a405f

Browse files
authored
Merge pull request #3466 from NginxProxyManager/develop
v2.11.0
2 parents 1c498f8 + 0353051 commit 89a405f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+6541
-12825
lines changed

.github/workflows/stale.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '30 1 * * *'
5+
workflow_dispatch:
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/stale@v9
12+
with:
13+
stale-issue-label: 'stale'
14+
stale-pr-label: 'stale'
15+
stale-issue-message: 'Issue is now considered stale. If you want to keep it open, please comment :+1:'
16+
stale-pr-message: 'PR is now considered stale. If you want to keep it open, please comment :+1:'
17+
close-issue-message: 'Issue was closed due to inactivity.'
18+
close-pr-message: 'PR was closed due to inactivity.'
19+
days-before-stale: 182
20+
days-before-close: 365
21+
operations-per-run: 50

.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.10.4
1+
2.11.0

Jenkinsfile

+139-113
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ pipeline {
1717
IMAGE = 'nginx-proxy-manager'
1818
BUILD_VERSION = getVersion()
1919
MAJOR_VERSION = '2'
20-
BRANCH_LOWER = "${BRANCH_NAME.toLowerCase().replaceAll('/', '-')}"
20+
BRANCH_LOWER = "${BRANCH_NAME.toLowerCase().replaceAll('\\\\', '-').replaceAll('/', '-').replaceAll('\\.', '-')}"
2121
COMPOSE_PROJECT_NAME = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}"
2222
COMPOSE_FILE = 'docker/docker-compose.ci.yml'
2323
COMPOSE_INTERACTIVE_NO_CLI = 1
2424
BUILDX_NAME = "${COMPOSE_PROJECT_NAME}"
25-
DOCS_BUCKET = 'jc21-npm-site'
26-
DOCS_CDN = 'EN1G6DEWZUTDT'
2725
}
2826
stages {
2927
stage('Environment') {
@@ -62,103 +60,114 @@ pipeline {
6260
}
6361
}
6462
}
65-
stage('Build and Test') {
66-
steps {
67-
script {
68-
// Frontend and Backend
69-
def shStatusCode = sh(label: 'Checking and Building', returnStatus: true, script: '''
70-
set -e
71-
./scripts/ci/frontend-build > ${WORKSPACE}/tmp-sh-build 2>&1
72-
./scripts/ci/test-and-build > ${WORKSPACE}/tmp-sh-build 2>&1
73-
''')
74-
shOutput = readFile "${env.WORKSPACE}/tmp-sh-build"
75-
if (shStatusCode != 0) {
76-
error "${shOutput}"
63+
stage('Builds') {
64+
parallel {
65+
stage('Project') {
66+
steps {
67+
script {
68+
// Frontend and Backend
69+
def shStatusCode = sh(label: 'Checking and Building', returnStatus: true, script: '''
70+
set -e
71+
./scripts/ci/frontend-build > ${WORKSPACE}/tmp-sh-build 2>&1
72+
./scripts/ci/test-and-build > ${WORKSPACE}/tmp-sh-build 2>&1
73+
''')
74+
shOutput = readFile "${env.WORKSPACE}/tmp-sh-build"
75+
if (shStatusCode != 0) {
76+
error "${shOutput}"
77+
}
78+
}
79+
}
80+
post {
81+
always {
82+
sh 'rm -f ${WORKSPACE}/tmp-sh-build'
83+
}
84+
failure {
85+
npmGithubPrComment("CI Error:\n\n```\n${shOutput}\n```", true)
86+
}
7787
}
7888
}
79-
}
80-
post {
81-
always {
82-
sh 'rm -f ${WORKSPACE}/tmp-sh-build'
83-
}
84-
failure {
85-
npmGithubPrComment("CI Error:\n\n```\n${shOutput}\n```", true)
89+
stage('Docs') {
90+
steps {
91+
dir(path: 'docs') {
92+
sh 'yarn install'
93+
sh 'yarn build'
94+
}
95+
dir(path: 'docs/.vuepress/dist') {
96+
sh 'tar -czf ../../docs.tgz *'
97+
}
98+
archiveArtifacts(artifacts: 'docs/docs.tgz', allowEmptyArchive: false)
99+
}
86100
}
87-
}
88-
}
89-
stage('Integration Tests Sqlite') {
90-
steps {
91-
// Bring up a stack
92-
sh 'docker-compose up -d fullstack-sqlite'
93-
sh './scripts/wait-healthy $(docker-compose ps --all -q fullstack-sqlite) 120'
94-
// Stop and Start it, as this will test it's ability to restart with existing data
95-
sh 'docker-compose stop fullstack-sqlite'
96-
sh 'docker-compose start fullstack-sqlite'
97-
sh './scripts/wait-healthy $(docker-compose ps --all -q fullstack-sqlite) 120'
98-
99-
// Run tests
100-
sh 'rm -rf test/results'
101-
sh 'docker-compose up cypress-sqlite'
102-
// Get results
103-
sh 'docker cp -L "$(docker-compose ps --all -q cypress-sqlite):/test/results" test/'
104-
}
105-
post {
106-
always {
107-
// Dumps to analyze later
108-
sh 'mkdir -p debug'
109-
sh 'docker-compose logs fullstack-sqlite > debug/docker_fullstack_sqlite.log'
110-
sh 'docker-compose logs db > debug/docker_db.log'
111-
// Cypress videos and screenshot artifacts
112-
dir(path: 'test/results') {
113-
archiveArtifacts allowEmptyArchive: true, artifacts: '**/*', excludes: '**/*.xml'
114-
}
115-
junit 'test/results/junit/*'
101+
stage('Cypress') {
102+
steps {
103+
// Creating will also create the network prior to
104+
// using it in parallel stages below and mitigating
105+
// a race condition.
106+
sh 'docker-compose build cypress-sqlite'
107+
sh 'docker-compose build cypress-mysql'
108+
sh 'docker-compose create cypress-sqlite'
109+
sh 'docker-compose create cypress-mysql'
110+
}
116111
}
117112
}
118113
}
119-
stage('Integration Tests Mysql') {
120-
steps {
121-
// Bring up a stack
122-
sh 'docker-compose up -d fullstack-mysql'
123-
sh './scripts/wait-healthy $(docker-compose ps --all -q fullstack-mysql) 120'
114+
stage('Integration Tests') {
115+
parallel {
116+
stage('Sqlite') {
117+
steps {
118+
// Bring up a stack
119+
sh 'docker-compose up -d fullstack-sqlite'
120+
sh './scripts/wait-healthy $(docker-compose ps --all -q fullstack-sqlite) 120'
121+
// Stop and Start it, as this will test it's ability to restart with existing data
122+
sh 'docker-compose stop fullstack-sqlite'
123+
sh 'docker-compose start fullstack-sqlite'
124+
sh './scripts/wait-healthy $(docker-compose ps --all -q fullstack-sqlite) 120'
124125

125-
// Run tests
126-
sh 'rm -rf test/results'
127-
sh 'docker-compose up cypress-mysql'
128-
// Get results
129-
sh 'docker cp -L "$(docker-compose ps --all -q cypress-mysql):/test/results" test/'
130-
}
131-
post {
132-
always {
133-
// Dumps to analyze later
134-
sh 'mkdir -p debug'
135-
sh 'docker-compose logs fullstack-mysql > debug/docker_fullstack_mysql.log'
136-
sh 'docker-compose logs db > debug/docker_db.log'
137-
// Cypress videos and screenshot artifacts
138-
dir(path: 'test/results') {
139-
archiveArtifacts allowEmptyArchive: true, artifacts: '**/*', excludes: '**/*.xml'
140-
}
141-
junit 'test/results/junit/*'
142-
}
143-
}
144-
}
145-
stage('Docs') {
146-
when {
147-
not {
148-
equals expected: 'UNSTABLE', actual: currentBuild.result
149-
}
150-
}
151-
steps {
152-
dir(path: 'docs') {
153-
sh 'yarn install'
154-
sh 'yarn build'
126+
// Run tests
127+
sh 'rm -rf test/results-sqlite'
128+
sh 'docker-compose up cypress-sqlite'
129+
// Get results
130+
sh 'docker cp -L "$(docker-compose ps --all -q cypress-sqlite):/test/results" test/results-sqlite'
131+
}
132+
post {
133+
always {
134+
// Dumps to analyze later
135+
sh 'mkdir -p debug/sqlite'
136+
sh 'docker-compose logs fullstack-sqlite > debug/sqlite/docker_fullstack_sqlite.log'
137+
// Cypress videos and screenshot artifacts
138+
dir(path: 'test/results-sqlite') {
139+
archiveArtifacts allowEmptyArchive: true, artifacts: '**/*', excludes: '**/*.xml'
140+
}
141+
junit 'test/results-sqlite/junit/*'
142+
}
143+
}
155144
}
145+
stage('Mysql') {
146+
steps {
147+
// Bring up a stack
148+
sh 'docker-compose up -d fullstack-mysql'
149+
sh './scripts/wait-healthy $(docker-compose ps --all -q fullstack-mysql) 120'
156150

157-
dir(path: 'docs/.vuepress/dist') {
158-
sh 'tar -czf ../../docs.tgz *'
151+
// Run tests
152+
sh 'rm -rf test/results-mysql'
153+
sh 'docker-compose up cypress-mysql'
154+
// Get results
155+
sh 'docker cp -L "$(docker-compose ps --all -q cypress-mysql):/test/results" test/results-mysql'
156+
}
157+
post {
158+
always {
159+
// Dumps to analyze later
160+
sh 'mkdir -p debug/mysql'
161+
sh 'docker-compose logs fullstack-mysql > debug/mysql/docker_fullstack_mysql.log'
162+
sh 'docker-compose logs db > debug/mysql/docker_db.log'
163+
// Cypress videos and screenshot artifacts
164+
dir(path: 'test/results-mysql') {
165+
archiveArtifacts allowEmptyArchive: true, artifacts: '**/*', excludes: '**/*.xml'
166+
}
167+
junit 'test/results-mysql/junit/*'
168+
}
169+
}
159170
}
160-
161-
archiveArtifacts(artifacts: 'docs/docs.tgz', allowEmptyArchive: false)
162171
}
163172
}
164173
stage('MultiArch Build') {
@@ -174,31 +183,48 @@ pipeline {
174183
}
175184
}
176185
}
177-
stage('Docs Deploy') {
178-
when {
179-
allOf {
180-
branch 'master'
181-
not {
182-
equals expected: 'UNSTABLE', actual: currentBuild.result
186+
stage('Docs / Comment') {
187+
parallel {
188+
stage('Master Docs') {
189+
when {
190+
allOf {
191+
branch 'master'
192+
not {
193+
equals expected: 'UNSTABLE', actual: currentBuild.result
194+
}
195+
}
196+
}
197+
steps {
198+
npmDocsReleaseMaster()
183199
}
184200
}
185-
}
186-
steps {
187-
npmDocsRelease("$DOCS_BUCKET", "$DOCS_CDN")
188-
}
189-
}
190-
stage('PR Comment') {
191-
when {
192-
allOf {
193-
changeRequest()
194-
not {
195-
equals expected: 'UNSTABLE', actual: currentBuild.result
201+
stage('Develop Docs') {
202+
when {
203+
allOf {
204+
branch 'develop'
205+
not {
206+
equals expected: 'UNSTABLE', actual: currentBuild.result
207+
}
208+
}
209+
}
210+
steps {
211+
npmDocsReleaseDevelop()
196212
}
197213
}
198-
}
199-
steps {
200-
script {
201-
npmGithubPrComment("Docker Image for build ${BUILD_NUMBER} is available on [DockerHub](https://cloud.docker.com/repository/docker/jc21/${IMAGE}) as `jc21/${IMAGE}:github-${BRANCH_LOWER}`\n\n**Note:** ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.", true)
214+
stage('PR Comment') {
215+
when {
216+
allOf {
217+
changeRequest()
218+
not {
219+
equals expected: 'UNSTABLE', actual: currentBuild.result
220+
}
221+
}
222+
}
223+
steps {
224+
script {
225+
npmGithubPrComment("Docker Image for build ${BUILD_NUMBER} is available on [DockerHub](https://cloud.docker.com/repository/docker/jc21/${IMAGE}) as `jc21/${IMAGE}:github-${BRANCH_LOWER}`\n\n**Note:** ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.", true)
226+
}
227+
}
202228
}
203229
}
204230
}
@@ -214,12 +240,12 @@ pipeline {
214240
sh 'figlet "SUCCESS"'
215241
}
216242
failure {
217-
archiveArtifacts(artifacts: 'debug/**.*', allowEmptyArchive: true)
243+
archiveArtifacts(artifacts: 'debug/**/*.*', allowEmptyArchive: true)
218244
juxtapose event: 'failure'
219245
sh 'figlet "FAILURE"'
220246
}
221247
unstable {
222-
archiveArtifacts(artifacts: 'debug/**.*', allowEmptyArchive: true)
248+
archiveArtifacts(artifacts: 'debug/**/*.*', allowEmptyArchive: true)
223249
juxtapose event: 'unstable'
224250
sh 'figlet "UNSTABLE"'
225251
}

README.md

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p align="center">
22
<img src="https://nginxproxymanager.com/github.png">
33
<br><br>
4-
<img src="https://img.shields.io/badge/version-2.10.4-green.svg?style=for-the-badge">
4+
<img src="https://img.shields.io/badge/version-2.11.0-green.svg?style=for-the-badge">
55
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
66
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
77
</a>
@@ -98,7 +98,18 @@ Password: changeme
9898
Immediately after logging in with this default user you will be asked to modify your details and change your password.
9999

100100

101-
## Contributors
101+
## Contributing
102+
103+
All are welcome to create pull requests for this project, against the `develop` branch. Official releases are created from the `master` branch.
104+
105+
CI is used in this project. All PR's must pass before being considered. After passing,
106+
docker builds for PR's are available on dockerhub for manual verifications.
107+
108+
Documentation within the `develop` branch is available for preview at
109+
[https://develop.nginxproxymanager.com](https://develop.nginxproxymanager.com)
110+
111+
112+
### Contributors
102113

103114
Special thanks to [all of our contributors](https://github.com/NginxProxyManager/nginx-proxy-manager/graphs/contributors).
104115

@@ -107,5 +118,4 @@ Special thanks to [all of our contributors](https://github.com/NginxProxyManager
107118

108119
1. [Found a bug?](https://github.com/NginxProxyManager/nginx-proxy-manager/issues)
109120
2. [Discussions](https://github.com/NginxProxyManager/nginx-proxy-manager/discussions)
110-
3. [Development Gitter](https://gitter.im/nginx-proxy-manager/community)
111-
4. [Reddit](https://reddit.com/r/nginxproxymanager)
121+
3. [Reddit](https://reddit.com/r/nginxproxymanager)

0 commit comments

Comments
 (0)