Fix test
This commit is contained in:
parent
4cce1da4cb
commit
b3044fbc5c
5 changed files with 25 additions and 10 deletions
|
@ -7,9 +7,9 @@ set -o errexit
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
# dirs
|
# dirs
|
||||||
srcDir="/home/$USER/"
|
srcDir="/home/$USER/repo/c4k/c4k-website/public/js/"
|
||||||
srcName="main.js"
|
srcName="main.js"
|
||||||
targetDir="/home/$USER/"
|
targetDir="/home/$USER/repo/website/dda-io/content/templates/js/"
|
||||||
targetName="c4k-website.js"
|
targetName="c4k-website.js"
|
||||||
|
|
||||||
echo "build"
|
echo "build"
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
# Release process for stable release
|
# Release process
|
||||||
|
|
||||||
|
## ... for testing (snapshots)
|
||||||
|
|
||||||
|
Make sure your clojars.org credentials are correctly set in your ~/.lein/profiles.clj file.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
git add .
|
||||||
|
git commit
|
||||||
|
```
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
lein deploy # or lein deploy clojars
|
||||||
|
```
|
||||||
|
|
||||||
|
## ... for stable release
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
git checkout main # for old projects replace main with master
|
git checkout main # for old projects replace main with master
|
||||||
|
@ -18,4 +33,5 @@ git commit -am "version bump"
|
||||||
git push
|
git push
|
||||||
```
|
```
|
||||||
|
|
||||||
Done.
|
Done.
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,8 @@
|
||||||
:license {:name "Apache License, Version 2.0"
|
:license {:name "Apache License, Version 2.0"
|
||||||
:url "https://www.apache.org/licenses/LICENSE-2.0.html"}
|
:url "https://www.apache.org/licenses/LICENSE-2.0.html"}
|
||||||
:dependencies [[org.clojure/clojure "1.10.3"]
|
:dependencies [[org.clojure/clojure "1.10.3"]
|
||||||
[org.clojure/tools.reader "1.3.6"]
|
[org.clojure/tools.reader "1.3.6"]
|
||||||
[org.clojure/math.numeric-tower "0.0.5"]
|
[org.domaindrivenarchitecture/c4k-common-clj "3.0.2-SNAPSHOT"]
|
||||||
[org.domaindrivenarchitecture/c4k-common-clj "3.0.1"]
|
|
||||||
[hickory "0.7.1"]]
|
[hickory "0.7.1"]]
|
||||||
:target-path "target/%s/"
|
:target-path "target/%s/"
|
||||||
:source-paths ["src/main/cljc"
|
:source-paths ["src/main/cljc"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
[dda.c4k-common.common :as cm]
|
[dda.c4k-common.common :as cm]
|
||||||
[dda.c4k-common.base64 :as b64]
|
[dda.c4k-common.base64 :as b64]
|
||||||
[dda.c4k-common.predicate :as pred]
|
[dda.c4k-common.predicate :as pred]
|
||||||
[dda.c4k-website.ingress :as ing]
|
[dda.c4k-common.ingress :as ing]
|
||||||
[clojure.string :as str]))
|
[clojure.string :as str]))
|
||||||
|
|
||||||
(defn fqdn-list?
|
(defn fqdn-list?
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
:branchname "main"}]}))))
|
:branchname "main"}]}))))
|
||||||
|
|
||||||
(deftest should-generate-nginx-configmap
|
(deftest should-generate-nginx-configmap
|
||||||
(is (= {:website.conf-c1 "server {\n listen 80 default_server;\n listen [::]:80 default_server;\n listen 443 ssl;\n ssl_certificate /etc/certs/tls.crt;\n ssl_certificate_key /etc/certs/tls.key;\n server_name test.de www.test.de test-it.de www.test-it.de; \n add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';\n add_header Content-Security-Policy \"default-src 'self'; font-src *;img-src * data:; script-src *; style-src *\";\n add_header X-XSS-Protection \"1; mode=block\";\n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-Content-Type-Options nosniff;\n add_header Referrer-Policy \"strict-origin\";\n # add_header Permissions-Policy \"permissions here\";\n root /var/www/html/website/;\n index index.html;\n location / {\n try_files $uri $uri/ /index.html =404;\n }\n}\n",
|
(is (= {:website.conf-c1 "server {\n listen 80 default_server;\n listen [::]:80 default_server;\n listen 443 ssl;\n ssl_certificate /etc/certs/tls.crt;\n ssl_certificate_key /etc/certs/tls.key;\n server_name test.de www.test.de test-it.de www.test-it.de; \n add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';\n add_header X-XSS-Protection \"1; mode=block\";\n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-Content-Type-Options nosniff;\n add_header Referrer-Policy \"strict-origin\";\n # add_header Permissions-Policy \"permissions here\";\n root /var/www/html/website/;\n index index.html;\n location / {\n try_files $uri $uri/ /index.html =404;\n }\n}\n",
|
||||||
:website.conf-c2 "server {\n listen 80 default_server;\n listen [::]:80 default_server;\n listen 443 ssl;\n ssl_certificate /etc/certs/tls.crt;\n ssl_certificate_key /etc/certs/tls.key;\n server_name example.de www.example.de example-by.de www.example-by.de; \n add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';\n add_header Content-Security-Policy \"default-src 'self'; font-src *;img-src * data:; script-src *; style-src *\";\n add_header X-XSS-Protection \"1; mode=block\";\n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-Content-Type-Options nosniff;\n add_header Referrer-Policy \"strict-origin\";\n # add_header Permissions-Policy \"permissions here\";\n root /var/www/html/website/;\n index index.html;\n location / {\n try_files $uri $uri/ /index.html =404;\n }\n}\n",
|
:website.conf-c2 "server {\n listen 80 default_server;\n listen [::]:80 default_server;\n listen 443 ssl;\n ssl_certificate /etc/certs/tls.crt;\n ssl_certificate_key /etc/certs/tls.key;\n server_name example.de www.example.de example-by.de www.example-by.de; \n add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';\n add_header X-XSS-Protection \"1; mode=block\";\n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-Content-Type-Options nosniff;\n add_header Referrer-Policy \"strict-origin\";\n # add_header Permissions-Policy \"permissions here\";\n root /var/www/html/website/;\n index index.html;\n location / {\n try_files $uri $uri/ /index.html =404;\n }\n}\n",
|
||||||
:name-c1 "test-io-configmap",
|
:name-c1 "test-io-configmap",
|
||||||
:name-c2 "example-io-configmap"}
|
:name-c2 "example-io-configmap"}
|
||||||
(th/map-diff (cut/generate-nginx-configmap {:unique-name "test.io",
|
(th/map-diff (cut/generate-nginx-configmap {:unique-name "test.io",
|
||||||
|
|
Loading…
Reference in a new issue