Skip to content
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
6 changes: 2 additions & 4 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,14 @@ run-metadata-helper:
verbosity = "vvv"

[service]
scrape_timeout_secs = 300
pause_secs = {{pause_secs}}
address = "127.0.0.1"
port = 8080
port = 8082
path_prefix = "{{path_prefix}}"
tracing_endpoint = "{{default_tracing_endpoint}}"

[status]
address = "127.0.0.1"
port = 9080
port = 9082
EOF
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,20 @@ impl InternalPlugin for DkrV2OpenshiftSecondaryMetadataScraperPlugin {
self.update_cache_state(layers, data_dir).await;

let graph_data_tar_path = self.settings.output_directory.join("graph-data.tar.gz");
let signatures_path = graph_data_dir.as_path().join("signatures");
let signatures_symlink = self.settings.output_directory.join("signatures");

// create a symlink to signatures directory for metadata-helper
// the secondary metadata scraper creates a temp directory to extract graph-data
// other containers wont have context of the directory that is being used.
// signatures symlink is at /signatures in the graph-data directory and will keep
// updating as newer graph-data is scraped.
if signatures_path
.try_exists()
.expect("Can't check if signatures exist")
{
tokio::fs::symlink(signatures_path, signatures_symlink).await?;
}

commons::create_tar(
graph_data_tar_path.clone().into_boxed_path(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,20 @@ impl InternalPlugin for GithubOpenshiftSecondaryMetadataScraperPlugin {
.context("Extracting tarball")?;

let graph_data_tar_path = self.settings.output_directory.join("graph-data.tar.gz");
let signatures_path = graph_data_dir.as_path().join("signatures");
let signatures_symlink = self.settings.output_directory.join("signatures");

// create a symlink to signatures directory for metadata-helper
// the secondary metadata scraper creates a temp directory to extract graph-data
// other containers wont have context of the directory that is being used.
// signatures symlink is at /signatures in the graph-data directory and will keep
// updating as newer graph-data is scraped.
if signatures_path
.try_exists()
.expect("Can't check if signatures exist")
{
tokio::fs::symlink(signatures_path, signatures_symlink).await?;
}

commons::create_tar(
graph_data_tar_path.clone().into_boxed_path(),
Expand Down
3 changes: 2 additions & 1 deletion dist/Dockerfile.deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ COPY .git/ ./.git/
RUN cargo build --release && \
mkdir -p /opt/cincinnati/bin && \
cp -rvf $HOME/target/release/graph-builder /opt/cincinnati/bin && \
cp -rvf $HOME/target/release/policy-engine /opt/cincinnati/bin
cp -rvf $HOME/target/release/policy-engine /opt/cincinnati/bin && \
cp -rvf $HOME/target/release/metadata-helper /opt/cincinnati/bin

FROM registry.access.redhat.com/ubi8:latest

Expand Down
3 changes: 2 additions & 1 deletion dist/Dockerfile.rust-toolset/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ RUN dnf update -y \
&& cargo build --release \
&& mkdir -p /opt/cincinnati/bin \
&& cp -rvf target/release/graph-builder /opt/cincinnati/bin \
&& cp -rvf target/release/policy-engine /opt/cincinnati/bin
&& cp -rvf target/release/policy-engine /opt/cincinnati/bin \
&& cp -rvf target/release/metadata-helper /opt/cincinnati/bin

FROM registry.access.redhat.com/ubi8/ubi:latest
ENV RUST_LOG=actix_web=error,dkregistry=error
Expand Down
Loading