stack-service-base 0.0.96 → 0.0.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc8c596dfdf27d84258f0ba68d013ace512f83fba64842e6879720d67a9941bb
4
- data.tar.gz: a2ec58f6f4d43c93f3c2e7e6225c4d9b18734d6786852dd86c1f57f0a7cb186e
3
+ metadata.gz: a29686255562ea2b36806d5d50db270dda9c65d6b9d819f0f9c241a3a4f85049
4
+ data.tar.gz: 2e33c64c8f927a7ac034c39d2b2ea1b5118bedb3315d44d2265f80d463fafdad
5
5
  SHA512:
6
- metadata.gz: 0f752b33da42763403b0d193b5ea6543814f1d4de078297dabc29b64517307089b007260147a81ba55598337fa832bb88de17ce156f111d1b1f504a3be4dce7c
7
- data.tar.gz: 8ecbdfaca6f1d944f2e232895b5ea929b4698434f7092fa8afcc44a4171bd9458a46a7c4de18fc62f07068edcd8606d0bec1e1627cfc262d1bb0a8241a4617fd
6
+ metadata.gz: 0f8d15d2b3e8c33e8e321464df2068351da9e6fdb5b0439405635ed7876f4fb014d9525284a87c6237ee13c4731cc177ebfd0f5328f9d44fcc8a32b36f811ff9
7
+ data.tar.gz: ea9223839e6ccabe433121647be6a8c93ce62d6d807c482aad9c3a1fdf48b18a226a8d7eb1449b71c7ab93e41c4c390f7379d092e6403de8136d0249e3ce4647
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kernel
4
+ private
5
+
6
+ def ENV! = ENV.method(:fetch)
7
+ end
@@ -13,3 +13,4 @@ html
13
13
  font-family: "Courier New", monospace
14
14
  body
15
15
  == yield
16
+ span.version = "v " + (ENV['ORG_OPENCONTAINERS_IMAGE_VERSION'] || '0.0.0')
@@ -0,0 +1 @@
1
+ *.drs linguist-language=Ruby
@@ -0,0 +1,50 @@
1
+ on: { push: { branches: [master,main,release,dev] } }
2
+
3
+ jobs:
4
+ deploy:
5
+ runs-on: ubuntu-latest
6
+ timeout-minutes: 20
7
+ env:
8
+ DEPLOY_SERVER: ${{ secrets.DEPLOY_SERVER }}
9
+ DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
10
+ DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
11
+ # ssh-keygen -t ed25519 -C "github-actions-deploy" -f ~/.ssh/github_actions_deploy -N ""
12
+ # cat ~/.ssh/github_actions_deploy.pub >> ~/.ssh/authorized_keys
13
+ # chmod 600 ~/.ssh/authorized_keys
14
+ # base64 -w 0 ~/.ssh/github_actions_deploy
15
+ DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
16
+ DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
17
+ DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - run: |
22
+ sudo apt-get update
23
+ sudo apt-get install -y --no-install-recommends ruby ruby-dev build-essential
24
+ sudo gem install dry-stack:0.1.54
25
+
26
+ - run: |
27
+ test -n "$DEPLOY_SERVER"
28
+ test -n "$DEPLOY_KEY"
29
+ mkdir -p ~/.ssh
30
+ echo "$DEPLOY_KEY" | base64 -d > ~/.ssh/id_rsa
31
+ chmod 600 ~/.ssh/id_rsa
32
+ printf 'Host *\n\tBatchMode yes\n\tStrictHostKeyChecking no\n' > ~/.ssh/config
33
+ chmod 400 ~/.ssh/config
34
+
35
+ - run: |
36
+ if [ -n "$DOCKER_USERNAME" ] && [ -n "$DOCKER_PASSWORD" ]; then
37
+ registry="${DOCKER_REGISTRY:-docker.io}"
38
+ echo "$DOCKER_PASSWORD" | docker login "$registry" -u "$DOCKER_USERNAME" --password-stdin
39
+ else
40
+ echo "Skipping Docker registry login; DOCKER_USERNAME or DOCKER_PASSWORD is not set."
41
+ fi
42
+
43
+ - working-directory: stack
44
+ run: |
45
+ deploy_target="$DEPLOY_SERVER"
46
+ if ! printf '%s' "$deploy_target" | grep -q '@'; then
47
+ deploy_target="${DEPLOY_USER:-root}@${deploy_target}"
48
+ fi
49
+
50
+ dry-stack swarm_deploy -x "ssh://${deploy_target}" -- --prune --resolve-image=always < ruby-mitm-proxy.drs
@@ -1,6 +1,6 @@
1
1
  FROM ruby:3.4.4-slim-bookworm AS base
2
2
  RUN apt update && apt install -y --no-install-recommends openssh-client ca-certificates
3
- RUN gem install build-labels:0.0.76 dry-stack:0.1.54
3
+ RUN gem install build-labels:0.0.76 dry-stack:0.1.56
4
4
  RUN install-docker-static # 28
5
5
 
6
6
  WORKDIR /build
@@ -8,6 +8,6 @@ RUN mkdir -p /root/.ssh && mkdir -pv /root/.ssh/sockets
8
8
  RUN printf 'Host *\n\tControlPersist yes\n\tControlMaster auto\n\tControlPath /root/.ssh/sockets/%%r@%%h-%%p\n\tBatchMode yes\n\tStrictHostKeyChecking no\n\tPort 22\n' > /root/.ssh/config
9
9
  ADD . .
10
10
 
11
- CMD ["sh", "-c", "\
11
+ CMD ["sh", "-c", "rparallel <<EOF \n\
12
12
  cat otlp.drs stack.drs | dry-stack swarm_deploy --tls-domain=example.com -x ssh://example.com -- --prune \n\
13
- "]
13
+ EOF\n"]
@@ -1,3 +1,4 @@
1
+ # vim: set syntax=ruby:
1
2
  Options name: 'stack-name'
2
3
 
3
4
  Service :service_name, image: 'service_name/master', ports: 7000, ingress: { host: 'service_name.*' }
@@ -1,3 +1,3 @@
1
1
  module StackServiceBase
2
- VERSION = '0.0.96'
2
+ VERSION = '0.0.97'
3
3
  end
@@ -4,6 +4,7 @@ unless defined? RSpec
4
4
  end
5
5
 
6
6
  require 'stack-service-base/version'
7
+ require 'stack-service-base/env_fetch'
7
8
  require 'stack-service-base/logging'
8
9
  require 'stack-service-base/rack_helpers'
9
10
  require 'stack-service-base/open_telemetry'
@@ -98,4 +99,4 @@ module StackServiceBase
98
99
  end
99
100
  end
100
101
  end
101
- end
102
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stack-service-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.96
4
+ version: 0.0.97
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artyom B
@@ -415,6 +415,7 @@ files:
415
415
  - lib/stack-service-base/db_ext/db_proxy.rb
416
416
  - lib/stack-service-base/db_ext/geo_ext.rb
417
417
  - lib/stack-service-base/debugger.rb
418
+ - lib/stack-service-base/env_fetch.rb
418
419
  - lib/stack-service-base/examples/mcp_config.ru
419
420
  - lib/stack-service-base/fiber_pool.rb
420
421
  - lib/stack-service-base/logging.rb
@@ -456,6 +457,8 @@ files:
456
457
  - lib/stack-service-base/safe_exec.rb
457
458
  - lib/stack-service-base/sinatra_ext.rb
458
459
  - lib/stack-service-base/socket_trace.rb
460
+ - lib/stack-service-base/stack_template/github/.gitattributes
461
+ - lib/stack-service-base/stack_template/github/.github/workflows/deploy.yml
459
462
  - lib/stack-service-base/stack_template/gitlab-c/.gitattributes
460
463
  - lib/stack-service-base/stack_template/gitlab-c/.gitlab-ci.yml
461
464
  - lib/stack-service-base/stack_template/gitlab-c/stack/otlp.drs