Skip to content

Commit 6f46c22

Browse files
authored
Merge pull request #4366 from DataDog/lloeki/ssi
Improve SSI
2 parents 736caf5 + 26ed8db commit 6f46c22

File tree

6 files changed

+38
-323
lines changed

6 files changed

+38
-323
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ default:
3232
parallel:
3333
matrix:
3434
# ADD NEW RUBIES HERE
35-
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
35+
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
3636
script:
3737
- >
3838
docker build
@@ -67,7 +67,7 @@ promote-image:
6767
parallel:
6868
matrix:
6969
# ADD NEW RUBIES HERE
70-
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
70+
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
7171
ARCHITECTURE: ["amd64", "arm64"]
7272
script:
7373
- docker pull $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE:$CI_PIPELINE_ID
@@ -105,8 +105,7 @@ install-dependencies:
105105
tags: ["arch:$ARCH"]
106106
parallel:
107107
matrix:
108-
# Promote again when adding 3.4 support
109-
- RUBY_VERSION: ["3.3", "3.2", "3.1", "3.0", "2.7"]
108+
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
110109
ARCH: ["amd64", "arm64"]
111110
stage: package
112111
needs:
@@ -181,7 +180,7 @@ vaccine:
181180

182181
script:
183182
- export GITHUB_TOKEN=$(cat token.txt)
184-
- .gitlab/scripts/vaccine.sh master "${CI_COMMIT_SHA}" "glci:${CI_PIPELINE_ID}"
183+
- .gitlab/scripts/vaccine.sh lloeki/ssi "${CI_COMMIT_SHA}" "glci:${CI_PIPELINE_ID}"
185184

186185
after_script:
187186
# Revoke the token after usage

.gitlab/Dockerfile-2.6

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM ghcr.io/datadog/images-rb/engines/ruby:2.6-centos-gcc

.gitlab/prepare-oci-package.sh

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,45 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

3-
set -e
3+
## This script is called by `package-oci` in `one-pipeline.yml`
44

5-
if [ "$OS" != "linux" ]; then
5+
set -euo pipefail
6+
7+
## Early checks
8+
9+
if [[ "$OS" != "linux" ]]; then
610
echo "Only linux packages are supported. Exiting"
711
exit 0
812
fi
913

14+
## Obtain injector source
15+
16+
injector_repo="https://github.com/DataDog/datadog-injector-rb.git"
17+
injector_ref="v1.0.0"
18+
injector_path="${HOME}/datadog-injector-rb"
19+
20+
git clone "${injector_repo}" --branch "${injector_ref}" "${injector_path}"
21+
22+
## Prepare package structure as expected by shared pipeline
23+
1024
mkdir sources
1125

12-
cp ../lib-injection/host_inject.rb sources
13-
cp ../lib-injection/host_inject_main.rb sources
26+
# Copy injector runtime source
27+
cp -Rv "${injector_path}/src"/* sources
28+
29+
# host injection expects a specific name
30+
ln -rs sources/injector.rb sources/host_inject.rb
31+
32+
# Kubernetes injection expects a specific name
33+
ln -rs sources/injector.rb sources/auto_inject.rb
34+
35+
## Copy system injector rules
36+
1437
cp ../lib-injection/requirements.json sources/requirements.json
15-
# Kubernetes injection expects a different path
16-
ln -rs sources/host_inject.rb sources/auto_inject.rb
1738

18-
cp -r ../tmp/${ARCH}/* sources
39+
## Copy arch-specific content, a.k.a per-version `GEM_HOME`
40+
41+
cp -r "../tmp/${ARCH}"/* sources
42+
43+
## Add `datadog` gem version information
1944

2045
cp ../tmp/version sources

lib-injection/README.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

lib-injection/host_inject.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)