Compare commits

...

44 Commits

Author SHA1 Message Date
giles 3ee99f3772 ${DRONE_COMMIT_MESSAGE}
continuous-integration/drone/push Build is passing Details
2023-10-18 19:43:56 +00:00
giles b126796747 Merge pull request 'product-development' (#29) from product-development into master
continuous-integration/drone/push Build is passing Details
Reviewed-on: #29
2023-10-18 19:43:45 +00:00
giles b4b4be310e ${DRONE_COMMIT_MESSAGE}
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2023-10-18 18:24:43 +00:00
giles b0c61acaf8 Merge branch 'format-branch' into product-development 2023-10-18 18:24:37 +00:00
giles 7de76e60a2 ...
continuous-integration/drone/push Build is passing Details
2023-10-18 19:22:55 +01:00
giles bf85760a8a ...
continuous-integration/drone/push Build is failing Details
2023-10-18 19:21:52 +01:00
giles 5e40901906 ...
continuous-integration/drone/push Build is failing Details
2023-10-18 19:18:16 +01:00
giles 31a71091ac ....
continuous-integration/drone/push Build is failing Details
2023-10-18 19:15:03 +01:00
giles f3a2f5aff4 ....
continuous-integration/drone/push Build is failing Details
2023-10-18 19:09:12 +01:00
giles 6d6f8dbe72 ...
continuous-integration/drone/push Build is failing Details
2023-10-18 19:05:24 +01:00
giles 4244737843 Merge pull request '.go' (#28) from format-branch into master
continuous-integration/drone/push Build is passing Details
Reviewed-on: #28
2023-10-18 18:03:27 +00:00
giles 626416155c Merge branch 'master' into format-branch
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is failing Details
2023-10-18 18:03:17 +00:00
giles 2801272030 .
continuous-integration/drone/push Build is failing Details
continuous-integration/drone/pr Build is passing Details
2023-10-18 19:00:37 +01:00
giles d791430727 Merge pull request 'this is a PR! it rocks!' (#27) from format-branch into master
continuous-integration/drone/push Build is failing Details
Reviewed-on: #27
2023-10-18 17:43:48 +00:00
giles 1ad9a77105 Merge branch 'master' into format-branch
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-10-18 17:43:19 +00:00
giles 4d34319e3a .
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-10-18 18:42:09 +01:00
giles 9ef50093df .
continuous-integration/drone/push Build encountered an error Details
continuous-integration/drone/pr Build encountered an error Details
2023-10-18 18:38:16 +01:00
giles 6e44bd5c64 Merge pull request 'this is a PR! it rocks!' (#26) from format-branch into master
continuous-integration/drone/push Build is passing Details
Reviewed-on: #26
2023-10-18 17:04:09 +00:00
giles 3038179906 trycommitmessage
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2023-10-18 17:03:38 +01:00
giles 1132491bb8 Merge pull request 'this is a PR! it rocks!' (#25) from format-branch into master
continuous-integration/drone/push Build is passing Details
Reviewed-on: #25
2023-10-18 16:02:16 +00:00
giles 8b7f6769b5 trycommitmessage
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2023-10-18 17:01:29 +01:00
giles 5eb36a4b05 Merge pull request 'this is a PR! it rocks!' (#24) from format-branch into master
continuous-integration/drone/push Build is failing Details
Reviewed-on: #24
2023-10-18 16:00:21 +00:00
giles 1cac52cb70 trycommitmessage
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2023-10-18 16:58:38 +01:00
giles 913be7371f Merge pull request 'this is a PR! it rocks!' (#23) from format-branch into master
continuous-integration/drone/push Build is passing Details
Reviewed-on: #23
2023-10-18 15:53:52 +00:00
giles a54116c8a9 .
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-10-18 16:48:19 +01:00
giles d39a32ea5f .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2023-10-18 16:44:27 +01:00
giles c50fbe34db .
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-10-18 16:40:55 +01:00
giles c86a272294 .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/promote/xml Build is passing Details
2023-10-18 15:41:04 +01:00
giles 267d88cedf .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2023-10-18 15:40:25 +01:00
giles 2212f55b16 .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/promote/xml Build is passing Details
2023-10-18 15:34:15 +01:00
giles 9c3b3e66d8 .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/promote/yml Build is passing Details
2023-10-18 15:32:21 +01:00
giles 3e45c60e17 .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/promote/yml Build is failing Details
2023-10-18 15:30:57 +01:00
giles c341b18a82 .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/promote/yml Build is failing Details
2023-10-18 15:26:00 +01:00
giles 3e3d0cb624 .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/promote/yml Build is failing Details
2023-10-18 15:21:31 +01:00
giles 48b1564104 Merge pull request 'this is a PR! it rocks!' (#20) from format-branch into master
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/promote/yml Build is failing Details
Reviewed-on: #20
2023-10-18 14:19:13 +00:00
giles 4356cf4c8e .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2023-10-18 15:18:34 +01:00
giles 48e693a3f5 .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/promote/yml Build is failing Details
2023-10-18 14:32:53 +01:00
giles b20d235e4b Merge pull request 'this is a PR! it rocks!' (#19) from format-branch into master
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/promote/yml Build encountered an error Details
Reviewed-on: #19
2023-10-18 13:29:46 +00:00
giles a41b0a8c35 . 2023-10-18 14:27:48 +01:00
giles 1489d72410 Merge pull request 'This is a PR! it rocks!' (#18) from format-branch into master
continuous-integration/drone Build is passing Details
Reviewed-on: #18
2023-10-18 13:20:22 +00:00
giles c0cb4b09d5 extra yml files added 2023-10-18 14:14:53 +01:00
giles d4b5b743b5 Merge pull request 'this is a PR! it rocks!' (#17) from product-development into master
Reviewed-on: #17
2023-10-17 21:31:02 +00:00
giles 14fe52de2a another unit 2023-10-17 22:28:21 +01:00
Giles Bradshaw 9de51db7be another unit 2023-10-17 21:26:43 +00:00
3 changed files with 502 additions and 5 deletions

484
.drone.yml Normal file
View File

@ -0,0 +1,484 @@
---
kind: pipeline
type: docker
name: register
platform:
os: linux
arch: amd64
clone:
disable: true
trigger:
event:
exclude:
- promote
---
kind: pipeline
type: docker
name: yml
platform:
os: linux
arch: amd64
clone:
disable: false
steps:
- name: "yml"
image: sigyl/zone-10-batch2yaml:latest
commands:
- node /app/servers/apps/batch2yaml/build/index.js . yml
volumes:
- name: dockersock
path: /var/run
services:
- name: docker
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
privileged: true
volumes:
- name: dockersock
path: /var/run
- name: ca
path: /etc/docker/certs.d
- name: daemonjson
path: /etc/docker/daemon.json
volumes:
- name: dockersock
temp: {}
- name: ca
host:
path: /etc/docker/certs.d
- name: daemonjson
host:
path: /etc/docker/daemon.json
trigger:
event:
- promote
target:
- yml
---
kind: pipeline
type: docker
name: convert
platform:
os: linux
arch: amd64
clone:
disable: false
steps:
- name: "check out deployed"
when:
branch:
- master
image: alpine/git:latest
commands:
- git config credential.helper '!f() { sleep 1; echo "username=${GIT_USER}"; echo "password=${GIT_PASSWORD}"; }; f'
- git fetch
- git checkout deployed
- git merge master
environment:
GIT_PASSWORD:
from_secret: GIT_PASSWORD
GIT_USER:
from_secret: GIT_USER
- name: "check out product-development"
when:
branch:
- format-branch
image: alpine/git:latest
commands:
- git config credential.helper '!f() { sleep 1; echo "username=${GIT_USER}"; echo "password=${GIT_PASSWORD}"; }; f'
- git fetch
- git checkout product-development
- git merge format-branch
environment:
GIT_PASSWORD:
from_secret: GIT_PASSWORD
GIT_USER:
from_secret: GIT_USER
- name: "convert to xml"
image: sigyl/zone-10-batch2yaml:latest
when:
branch:
- master
commands:
- node /app/servers/apps/batch2yaml/build/index.js . xml
volumes:
- name: dockersock
path: /var/run
- name: "convert to yml"
image: sigyl/zone-10-batch2yaml:latest
when:
branch:
- format-branch
commands:
- node /app/servers/apps/batch2yaml/build/index.js . yml
volumes:
- name: dockersock
path: /var/run
- name: "git - status"
when:
branch:
- master
- format-branch
image: alpine/git:latest
commands:
- git status
volumes:
- name: dockersock
path: /var/run
- name: "git - deployed"
when:
branch:
- master
- format-branch
image: alpine/git:latest
commands:
- git config credential.helper '!f() { sleep 1; echo "username=$${GIT_USER}"; echo "password=$${GIT_PASSWORD}"; }; f'
- git add -A
- git commit -m '$${DRONE_COMMIT_MESSAGE}'
- git push origin
environment:
GIT_PASSWORD:
from_secret: GIT_PASSWORD
GIT_USER:
from_secret: GIT_USER
volumes:
- name: dockersock
path: /var/run
services:
- name: docker
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
privileged: true
volumes:
- name: dockersock
path: /var/run
- name: ca
path: /etc/docker/certs.d
- name: daemonjson
path: /etc/docker/daemon.json
volumes:
- name: dockersock
temp: {}
- name: ca
host:
path: /etc/docker/certs.d
- name: daemonjson
host:
path: /etc/docker/daemon.json
trigger:
branch:
- format-branch
- master
event:
- push
---
kind: pipeline
type: docker
name: save
platform:
os: linux
arch: amd64
clone:
disable: true
steps:
- name: mkdir
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
script:
- mkdir -p /stack/.images/ghost/built
- rm -f /stack/.images/ghost/*.*
- rm -f /stack/.images/ghost/built/*.*
- name: alpine/git:v2.26.2
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- registry_domain
- registry_port
- registry_password
- destination_registry
script:
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --username client --password \"$${REGISTRY_PASSWORD}\" \\\\\n && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"login failed\"\n exit 1\n fi\n echo \"retrying login..$n\"\n sleep 5\ndone\n"
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/alpine/git:v2.26.2
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/alpine/git:v2.26.2 -o /stack/.images/ghost/alpine_git:v2.26.2.tar
- echo "docker load < alpine_git:v2.26.2.tar" >> /stack/.images/ghost/load.sh
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/alpine/git:v2.26.2 $${DESTINATION_REGISTRY}/stack/ghost/alpine/git:v2.26.2" >> /stack/.images/ghost/load.sh
- name: ghost:3.14.0
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- registry_domain
- registry_port
- registry_password
- destination_registry
script:
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --username client --password \"$${REGISTRY_PASSWORD}\" \\\\\n && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"login failed\"\n exit 1\n fi\n echo \"retrying login..$n\"\n sleep 5\ndone\n"
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/ghost:3.14.0
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/ghost:3.14.0 -o /stack/.images/ghost/ghost:3.14.0.tar
- echo "docker load < ghost:3.14.0.tar" >> /stack/.images/ghost/load.sh
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/ghost:3.14.0 $${DESTINATION_REGISTRY}/stack/ghost/ghost:3.14.0" >> /stack/.images/ghost/load.sh
- name: mysql:5.7
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- registry_domain
- registry_port
- registry_password
- destination_registry
script:
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --username client --password \"$${REGISTRY_PASSWORD}\" \\\\\n && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"login failed\"\n exit 1\n fi\n echo \"retrying login..$n\"\n sleep 5\ndone\n"
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/mysql:5.7
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/mysql:5.7 -o /stack/.images/ghost/mysql:5.7.tar
- echo "docker load < mysql:5.7.tar" >> /stack/.images/ghost/load.sh
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/mysql:5.7 $${DESTINATION_REGISTRY}/stack/ghost/mysql:5.7" >> /stack/.images/ghost/load.sh
- name: my-ghost
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- registry_domain
- registry_port
- registry_password
- destination_registry
script:
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --username client --password \"$${REGISTRY_PASSWORD}\" \\\\\n && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"login failed\"\n exit 1\n fi\n echo \"retrying login..$n\"\n sleep 5\ndone\n"
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/my-ghost
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/my-ghost -o /stack/.images/ghost/built/my-ghost.tar
- echo "docker load my-ghost.tar" >> /stack/.images/ghost/built/load.sh
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/my-ghost ${DESINATION_REGISTRY}/stack/ghost/my-ghost" >> /stack/.images/ghost/built/load.sh
trigger:
event:
- promote
target:
- save
---
kind: pipeline
type: docker
name: print
platform:
os: linux
arch: amd64
steps:
- name: print env
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- mail_service
- mail_user
- commento_origin
- theme
- mysql_root_password
script:
- rm -f env-ghost
- "echo \"export MAIL_SERVICE='$${MAIL_SERVICE}'\" >> env-ghost # \"mail-service\""
- "echo \"export MAIL_USER='$${MAIL_USER}'\" >> env-ghost # \"mail-user\""
- "echo \"export COMMENTO_ORIGIN='$${COMMENTO_ORIGIN}'\" >> env-ghost # \"commento-origin\""
- "echo \"export THEME='$${THEME}'\" >> env-ghost # \"theme\""
- "echo \"export MYSQL_ROOT_PASSWORD='$${MYSQL_ROOT_PASSWORD}'\" >> env-ghost # \"mysql-root-password\""
environment:
COMMENTO_ORIGIN:
from_secret: commento-origin
MAIL_SERVICE:
from_secret: mail-service
MAIL_USER:
from_secret: mail-user
MYSQL_ROOT_PASSWORD:
from_secret: mysql-root-password
THEME:
from_secret: theme
trigger:
event:
- promote
target:
- print
---
kind: pipeline
type: docker
name: build
platform:
os: linux
arch: amd64
steps:
- name: "dockerbuild:"
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
commands:
- set -e
- export NAME=ghost
- export ROOT=stack
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --username client --password \"$${REGISTRY_PASSWORD}\" \\\\\n && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"login failed\"\n exit 1\n fi\n echo \"retrying login..$n\"\n sleep 5\ndone\n"
- sh .drone/build.sh
- sh .drone/push.sh
environment:
THEME:
from_secret: theme
volumes:
- name: dockersock
path: /var/run
services:
- name: docker
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
privileged: true
volumes:
- name: dockersock
path: /var/run
- name: ca
path: /etc/docker/certs.d
- name: daemonjson
path: /etc/docker/daemon.json
volumes:
- name: dockersock
temp: {}
- name: ca
host:
path: /etc/docker/certs.d
- name: daemonjson
host:
path: /etc/docker/daemon.json
trigger:
event:
- promote
target:
- build
---
kind: pipeline
type: docker
name: deploy
platform:
os: linux
arch: amd64
steps:
- name: scp
image: appleboy/drone-scp:1.6.2@sha256:bd37a55f4b97e7742b0de7333669b96220b3cc422d366e1fa8c34059b736ab47
settings:
command_timeout: 2m
source:
- .
target: /stack/ghost
- name: deploy
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- scheme
- domain
- registry_domain
- registry_port
- registry_password
- mail_service
- mail_user
- commento_origin
- theme
- mysql_root_password
- theme
script:
- export MYSQL_ROOT_PASSWORD=$${MYSQL_ROOT_PASSWORD}
- export MAIL_SERVICE=$${MAIL_SERVICE}
- export MAIL_USER=$${MAIL_USER}
- export COMMENTO_ORIGIN=$${COMMENTO_ORIGIN}
- export THEME=$${THEME}
- export THEME=$${THEME}
- export SCHEME=$${SCHEME}
- export DOMAIN=$${DOMAIN}
- export REGISTRY_DOMAIN=$${REGISTRY_DOMAIN}
- export REGISTRY_PORT=$${REGISTRY_PORT}
- export REGISTRY_PASSWORD=$${REGISTRY_PASSWORD}
- set -e
- export NAME=ghost
- export ROOT=stack
- cd /stack/ghost
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --username client --password \"$${REGISTRY_PASSWORD}\" \\\\\n && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"login failed\"\n exit 1\n fi\n echo \"retrying login..$n\"\n sleep 5\ndone\n"
- sh .drone/pull.sh
- sh .drone/deploy.sh
environment:
COMMENTO_ORIGIN:
from_secret: commento-origin
MAIL_SERVICE:
from_secret: mail-service
MAIL_USER:
from_secret: mail-user
MYSQL_ROOT_PASSWORD:
from_secret: mysql-root-password
THEME:
from_secret: theme
trigger:
event:
- promote
- promote
target:
- deploy
- production
...

View File

@ -10,12 +10,24 @@ tea is here (i had to change docker file to just be based on node:latest)
https://gitea.com/gitea/tea/src/branch/main/docs/CLI.md
get tea for ubuntu
```sh
sudo apt-get update -y
sudo apt-get install -y tea
```
On ?tag ? push to master
clone master
branch deployed
yml -> xml
push deployed
pull to production PC and import.
pull to development, import, modify, export
push from development to format branch
on format-branch pull, xml -> yml, push to product-development and PR
### FTBatch development pc on development branch

File diff suppressed because one or more lines are too long