Skip to content

Improve SSI #4366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ default:
parallel:
matrix:
# ADD NEW RUBIES HERE
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
script:
- >
docker build
Expand Down Expand Up @@ -67,7 +67,7 @@ promote-image:
parallel:
matrix:
# ADD NEW RUBIES HERE
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
ARCHITECTURE: ["amd64", "arm64"]
script:
- docker pull $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE:$CI_PIPELINE_ID
Expand Down Expand Up @@ -105,8 +105,7 @@ install-dependencies:
tags: ["arch:$ARCH"]
parallel:
matrix:
# Promote again when adding 3.4 support
- RUBY_VERSION: ["3.3", "3.2", "3.1", "3.0", "2.7"]
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
ARCH: ["amd64", "arm64"]
stage: package
needs:
Expand Down Expand Up @@ -180,7 +179,7 @@ vaccine:

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

after_script:
# Revoke the token after usage
Expand Down
1 change: 1 addition & 0 deletions .gitlab/Dockerfile-2.6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM ghcr.io/datadog/images-rb/engines/ruby:2.6-centos-gcc
41 changes: 33 additions & 8 deletions .gitlab/prepare-oci-package.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,45 @@
#!/bin/bash
#!/usr/bin/env bash

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

if [ "$OS" != "linux" ]; then
set -euo pipefail

## Early checks

if [[ "$OS" != "linux" ]]; then
echo "Only linux packages are supported. Exiting"
exit 0
fi

## Obtain injector source

injector_repo="https://github.com/DataDog/datadog-injector-rb.git"
injector_ref="v1.0.0"
injector_path="${HOME}/datadog-injector-rb"

git clone "${injector_repo}" --branch "${injector_ref}" "${injector_path}"

## Prepare package structure as expected by shared pipeline

mkdir sources

cp ../lib-injection/host_inject.rb sources
cp ../lib-injection/host_inject_main.rb sources
# Copy injector runtime source
cp -Rv "${injector_path}/src"/* sources

# host injection expects a specific name
ln -rs sources/injector.rb sources/host_inject.rb

# Kubernetes injection expects a specific name
ln -rs sources/injector.rb sources/auto_inject.rb

## Copy system injector rules

cp ../lib-injection/requirements.json sources/requirements.json
# Kubernetes injection expects a different path
ln -rs sources/host_inject.rb sources/auto_inject.rb

cp -r ../tmp/${ARCH}/* sources
## Copy arch-specific content, a.k.a per-version `GEM_HOME`

cp -r "../tmp/${ARCH}"/* sources

## Add `datadog` gem version information

cp ../tmp/version sources
52 changes: 0 additions & 52 deletions lib-injection/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions lib-injection/host_inject.rb

This file was deleted.

Loading
Loading