Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ecb27521b4 | |||
| b6875487fd |
Vendored
+77
-3
@@ -1,6 +1,6 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
label 'master'
|
label 'docker-multiarch'
|
||||||
}
|
}
|
||||||
options {
|
options {
|
||||||
buildDiscarder(logRotator(numToKeepStr: '5'))
|
buildDiscarder(logRotator(numToKeepStr: '5'))
|
||||||
@@ -11,7 +11,7 @@ pipeline {
|
|||||||
IMAGE = "nginx-proxy-manager"
|
IMAGE = "nginx-proxy-manager"
|
||||||
BUILD_VERSION = getVersion()
|
BUILD_VERSION = getVersion()
|
||||||
MAJOR_VERSION = "2"
|
MAJOR_VERSION = "2"
|
||||||
BRANCH_LOWER = "proxyprotocol"
|
BRANCH_LOWER = "${BRANCH_NAME.toLowerCase().replaceAll('/', '-')}"
|
||||||
COMPOSE_PROJECT_NAME = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}"
|
COMPOSE_PROJECT_NAME = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}"
|
||||||
COMPOSE_FILE = 'docker/docker-compose.ci.yml'
|
COMPOSE_FILE = 'docker/docker-compose.ci.yml'
|
||||||
COMPOSE_INTERACTIVE_NO_CLI = 1
|
COMPOSE_INTERACTIVE_NO_CLI = 1
|
||||||
@@ -20,6 +20,29 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage('Environment') {
|
stage('Environment') {
|
||||||
parallel {
|
parallel {
|
||||||
|
stage('Master') {
|
||||||
|
when {
|
||||||
|
branch 'master'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
env.BUILDX_PUSH_TAGS = "-t docker.io/jc21/${IMAGE}:${BUILD_VERSION} -t docker.io/jc21/${IMAGE}:${MAJOR_VERSION} -t docker.io/jc21/${IMAGE}:latest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Other') {
|
||||||
|
when {
|
||||||
|
not {
|
||||||
|
branch 'master'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Defaults to the Branch name, which is applies to all branches AND pr's
|
||||||
|
env.BUILDX_PUSH_TAGS = "-t docker.io/jc21/${IMAGE}:github-${BRANCH_LOWER}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Versions') {
|
stage('Versions') {
|
||||||
steps {
|
steps {
|
||||||
sh 'cat frontend/package.json | jq --arg BUILD_VERSION "${BUILD_VERSION}" \'.version = $BUILD_VERSION\' | sponge frontend/package.json'
|
sh 'cat frontend/package.json | jq --arg BUILD_VERSION "${BUILD_VERSION}" \'.version = $BUILD_VERSION\' | sponge frontend/package.json'
|
||||||
@@ -140,8 +163,58 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
|
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
|
||||||
|
// Docker Login
|
||||||
|
sh "docker login -u '${duser}' -p '${dpass}'"
|
||||||
// Buildx with push from cache
|
// Buildx with push from cache
|
||||||
sh "./scripts/buildx"
|
sh "./scripts/buildx --push ${BUILDX_PUSH_TAGS}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Docs Deploy') {
|
||||||
|
when {
|
||||||
|
allOf {
|
||||||
|
branch 'master'
|
||||||
|
not {
|
||||||
|
equals expected: 'UNSTABLE', actual: currentBuild.result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', accessKeyVariable: 'AWS_ACCESS_KEY_ID', credentialsId: 'npm-s3-docs', secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {
|
||||||
|
sh """docker run --rm \\
|
||||||
|
--name \${COMPOSE_PROJECT_NAME}-docs-upload \\
|
||||||
|
-e S3_BUCKET=jc21-npm-site \\
|
||||||
|
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \\
|
||||||
|
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \\
|
||||||
|
-v \$(pwd):/app \\
|
||||||
|
-w /app \\
|
||||||
|
jc21/ci-tools \\
|
||||||
|
scripts/docs-upload /app/docs/.vuepress/dist/
|
||||||
|
"""
|
||||||
|
|
||||||
|
sh """docker run --rm \\
|
||||||
|
--name \${COMPOSE_PROJECT_NAME}-docs-invalidate \\
|
||||||
|
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \\
|
||||||
|
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \\
|
||||||
|
jc21/ci-tools \\
|
||||||
|
aws cloudfront create-invalidation --distribution-id EN1G6DEWZUTDT --paths '/*'
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('PR Comment') {
|
||||||
|
when {
|
||||||
|
allOf {
|
||||||
|
changeRequest()
|
||||||
|
not {
|
||||||
|
equals expected: 'UNSTABLE', actual: currentBuild.result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
def comment = pullRequest.comment("This is an automated message from CI:\n\nDocker 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.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -167,6 +240,7 @@ pipeline {
|
|||||||
sh 'figlet "UNSTABLE"'
|
sh 'figlet "UNSTABLE"'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def getVersion() {
|
def getVersion() {
|
||||||
ver = sh(script: 'cat .version', returnStdout: true)
|
ver = sh(script: 'cat .version', returnStdout: true)
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://nginxproxymanager.com/github.png">
|
<img src="https://nginxproxymanager.com/github.png">
|
||||||
<br><br>
|
<br><br>
|
||||||
<img src="https://img.shields.io/badge/version-2.9.18-green.svg?style=for-the-badge">
|
<img src="https://img.shields.io/badge/version-2.9.16-green.svg?style=for-the-badge">
|
||||||
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
|
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
|
||||||
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
|
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
|
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
|
||||||
<img src="https://img.shields.io/docker/pulls/jc21/nginx-proxy-manager.svg?style=for-the-badge">
|
<img src="https://img.shields.io/docker/pulls/jc21/nginx-proxy-manager.svg?style=for-the-badge">
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://ci.nginxproxymanager.com/blue/organizations/jenkins/nginx-proxy-manager/branches/">
|
||||||
|
<img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fci.nginxproxymanager.com%2Fjob%2Fnginx-proxy-manager%2Fjob%2Fmaster&style=for-the-badge">
|
||||||
|
</a>
|
||||||
<a href="https://gitter.im/nginx-proxy-manager/community">
|
<a href="https://gitter.im/nginx-proxy-manager/community">
|
||||||
<img alt="Gitter" src="https://img.shields.io/gitter/room/nginx-proxy-manager/community?style=for-the-badge">
|
<img alt="Gitter" src="https://img.shields.io/gitter/room/nginx-proxy-manager/community?style=for-the-badge">
|
||||||
</a>
|
</a>
|
||||||
@@ -517,13 +520,7 @@ Special thanks to the following contributors:
|
|||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/ivankristianto">
|
<a href="https://github.com/ivankristianto">
|
||||||
<img src="https://avatars.githubusercontent.com/u/656006?v=4" width="80" alt=""/>
|
<img src="https://avatars.githubusercontent.com/u/656006?v=4" width="80" alt=""/>
|
||||||
<br /><sub><b>Ivan Kristianto</b></sub>
|
<br /><sub><b>Ivan Kristianto </b></sub>
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<a href="https://github.com/omercnet">
|
|
||||||
<img src="https://avatars.githubusercontent.com/u/639682?v=4" width="80" alt=""/>
|
|
||||||
<br /><sub><b>Omer Cohen</b></sub>
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ chown root /tmp/nginx
|
|||||||
|
|
||||||
# Dynamically generate resolvers file, if resolver is IPv6, enclose in `[]`
|
# Dynamically generate resolvers file, if resolver is IPv6, enclose in `[]`
|
||||||
# thanks @tfmm
|
# thanks @tfmm
|
||||||
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" { sub(/%.*$/,"",$2); print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf) valid=10s;" > /etc/nginx/conf.d/include/resolvers.conf
|
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" { sub(/%.*$/,"",$2); print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" > /etc/nginx/conf.d/include/resolvers.conf
|
||||||
|
|
||||||
# Generate dummy self-signed certificate.
|
# Generate dummy self-signed certificate.
|
||||||
if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]
|
if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]
|
||||||
|
|||||||
+6
-6
@@ -7718,9 +7718,9 @@ pretty-time@^1.1.0:
|
|||||||
integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==
|
integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==
|
||||||
|
|
||||||
prismjs@^1.13.0, prismjs@^1.20.0:
|
prismjs@^1.13.0, prismjs@^1.20.0:
|
||||||
version "1.27.0"
|
version "1.25.0"
|
||||||
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.27.0.tgz#bb6ee3138a0b438a3653dd4d6ce0cc6510a45057"
|
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.25.0.tgz#6f822df1bdad965734b310b315a23315cf999756"
|
||||||
integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==
|
integrity sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg==
|
||||||
|
|
||||||
private@^0.1.8:
|
private@^0.1.8:
|
||||||
version "0.1.8"
|
version "0.1.8"
|
||||||
@@ -9681,9 +9681,9 @@ url-parse-lax@^3.0.0:
|
|||||||
prepend-http "^2.0.0"
|
prepend-http "^2.0.0"
|
||||||
|
|
||||||
url-parse@^1.4.3, url-parse@^1.4.7:
|
url-parse@^1.4.3, url-parse@^1.4.7:
|
||||||
version "1.5.9"
|
version "1.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.9.tgz#05ff26484a0b5e4040ac64dcee4177223d74675e"
|
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.2.tgz#a4eff6fd5ff9fe6ab98ac1f79641819d13247cda"
|
||||||
integrity sha512-HpOvhKBvre8wYez+QhHcYiVvVmeF6DVnuSOOPhe3cTum3BnqHhvKaZm8FU5yTiOu/Jut2ZpB2rA/SbBA1JIGlQ==
|
integrity sha512-6bTUPERy1muxxYClbzoRo5qtQuyoGEbzbQvi0SW4/8U8UyVkAQhWFBlnigqJkRm4su4x1zDQfNbEzWkt+vchcg==
|
||||||
dependencies:
|
dependencies:
|
||||||
querystringify "^2.1.1"
|
querystringify "^2.1.1"
|
||||||
requires-port "^1.0.0"
|
requires-port "^1.0.0"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<form>
|
<form>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-12">
|
<div class="col-sm-12 col-md-12">
|
||||||
<%= i18n('dead-hosts', 'delete-confirm', {domains: domain_names.join(', ').toHtmlEntities()}) %>
|
<%= i18n('dead-hosts', 'delete-confirm', {domains: domain_names.join(', ')}) %>
|
||||||
<% if (certificate_id) { %>
|
<% if (certificate_id) { %>
|
||||||
<br><br>
|
<br><br>
|
||||||
<%- i18n('ssl', 'delete-ssl') %>
|
<%- i18n('ssl', 'delete-ssl') %>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<form>
|
<form>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-12">
|
<div class="col-sm-12 col-md-12">
|
||||||
<%= i18n('proxy-hosts', 'delete-confirm', {domains: domain_names.join(', ').toHtmlEntities()}) %>
|
<%= i18n('proxy-hosts', 'delete-confirm', {domains: domain_names.join(', ')}) %>
|
||||||
<% if (certificate_id) { %>
|
<% if (certificate_id) { %>
|
||||||
<br><br>
|
<br><br>
|
||||||
<%- i18n('ssl', 'delete-ssl') %>
|
<%- i18n('ssl', 'delete-ssl') %>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<form>
|
<form>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-12">
|
<div class="col-sm-12 col-md-12">
|
||||||
<%= i18n('redirection-hosts', 'delete-confirm', {domains: domain_names.join(', ').toHtmlEntities()}) %>
|
<%= i18n('redirection-hosts', 'delete-confirm', {domains: domain_names.join(', ')}) %>
|
||||||
<% if (certificate_id) { %>
|
<% if (certificate_id) { %>
|
||||||
<br><br>
|
<br><br>
|
||||||
<%- i18n('ssl', 'delete-ssl') %>
|
<%- i18n('ssl', 'delete-ssl') %>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<form>
|
<form>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-12">
|
<div class="col-sm-12 col-md-12">
|
||||||
<%= i18n('users', 'delete-confirm', {name: name.toHtmlEntities()}) %>
|
<%= i18n('users', 'delete-confirm', {name: name}) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -103,13 +103,6 @@ window.tabler = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
String.prototype.toHtmlEntities = function() {
|
|
||||||
return this.replace(/./gm, function(s) {
|
|
||||||
// return "&#" + s.charCodeAt(0) + ";";
|
|
||||||
return (s.match(/[a-z0-9\s]+/i)) ? s : "&#" + s.charCodeAt(0) + ";";
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
require('tabler-core');
|
require('tabler-core');
|
||||||
|
|
||||||
const App = require('./app/main');
|
const App = require('./app/main');
|
||||||
|
|||||||
+11
-11
@@ -92,17 +92,17 @@ module.exports = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /source-sans-pro.*\.(woff(2)?)(\?v=\d+\.\d+\.\d+)?$/,
|
test: /source-sans-pro.*\.(woff(2)?)(\?v=\d+\.\d+\.\d+)?$/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
options: {
|
options: {
|
||||||
name: '[name].[ext]',
|
name: '[name].[ext]',
|
||||||
outputPath: 'assets/'
|
outputPath: 'assets/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|||||||
+13
-12
@@ -10,7 +10,7 @@ cd "${DIR}/.." || exit 1
|
|||||||
|
|
||||||
# determine commit if not already set
|
# determine commit if not already set
|
||||||
if [ "$BUILD_COMMIT" == "" ]; then
|
if [ "$BUILD_COMMIT" == "" ]; then
|
||||||
BUILD_COMMIT=$(git log -n 1 --format=%h)
|
BUILD_COMMIT=$(git log -n 1 --format=%h)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Buildx Builder
|
# Buildx Builder
|
||||||
@@ -18,18 +18,19 @@ docker buildx create --name "${BUILDX_NAME:-npm}" || echo
|
|||||||
docker buildx use "${BUILDX_NAME:-npm}"
|
docker buildx use "${BUILDX_NAME:-npm}"
|
||||||
|
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--build-arg BUILD_VERSION="${BUILD_VERSION:-dev}" \
|
--build-arg BUILD_VERSION="${BUILD_VERSION:-dev}" \
|
||||||
--build-arg BUILD_COMMIT="${BUILD_COMMIT:-notset}" \
|
--build-arg BUILD_COMMIT="${BUILD_COMMIT:-notset}" \
|
||||||
--build-arg BUILD_DATE="$(date '+%Y-%m-%d %T %Z')" \
|
--build-arg BUILD_DATE="$(date '+%Y-%m-%d %T %Z')" \
|
||||||
--build-arg GOPROXY="${GOPROXY:-}" \
|
--build-arg GOPROXY="${GOPROXY:-}" \
|
||||||
--build-arg GOPRIVATE="${GOPRIVATE:-}" \
|
--build-arg GOPRIVATE="${GOPRIVATE:-}" \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64,linux/arm64,linux/arm/7 \
|
||||||
--progress plain \
|
--progress plain \
|
||||||
--pull \
|
--pull \
|
||||||
-f docker/Dockerfile \
|
-f docker/Dockerfile \
|
||||||
--output=type=docker,dest=- . > npm.tar
|
$@ \
|
||||||
|
.
|
||||||
|
|
||||||
rc=$?
|
rc=$?
|
||||||
docker buildx rm "${BUILDX_NAME:-npm}"
|
docker buildx rm "${BUILDX_NAME:-npm}"
|
||||||
echo -e "${BLUE}❯ ${GREEN}Multiarch build Complete${RESET}"
|
echo -e "${BLUE}❯ ${GREEN}Multiarch build Complete${RESET}"
|
||||||
exit $rc
|
exit $rc
|
||||||
|
|||||||
Reference in New Issue
Block a user