Skip to content

Commit 15ec97e

Browse files
authored
[SECURESIGN-1399] update pipelines: add prefetch and hermetic builds (#84)
* update pipelines: add prefetch and hermetic builds * enable prefetch for RPMs * remove packages install * add cargo, rust to preinstalled packages * add cargo, rust to preinstalled packages * update * add rpm prefetch-input * upste Dockerfiles, use rust/cargo version 1.84.0
1 parent 367d2e5 commit 15ec97e

File tree

10 files changed

+2181
-15
lines changed

10 files changed

+2181
-15
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
- name: Install ninja-build tool
4040
uses: seanmiddleditch/gha-setup-ninja@v5
4141
# print the current rustc. replace stable to pin to a specific toolchain version.
42-
- run: rustup default stable
42+
# - run: rustup default stable
43+
- run: rustup default 1.84.0
4344
- run: rustup component add rustfmt
4445
- run: rustup component add clippy
4546
- name: Install CMake 3.x (Ubuntu)

.tekton/tuf-tool-pull-request.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ spec:
3030
value: Dockerfile.rh
3131
- name: build-source-image
3232
value: "true"
33+
- name: prefetch-input
34+
value: '[{"type": "cargo", "path": "."}, {"type": "rpm", "path": "."}]'
35+
- name: hermetic
36+
value: "true"
37+
- name: dev-package-managers
38+
value: "true"
3339
pipelineRef:
3440
resolver: git
3541
params:

.tekton/tuf-tool-push.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ spec:
2727
value: Dockerfile.rh
2828
- name: build-source-image
2929
value: "true"
30+
- name: prefetch-input
31+
value: '[{"type": "cargo", "path": "."}, {"type": "rpm", "path": "."}]'
32+
- name: hermetic
33+
value: "true"
34+
- name: dev-package-managers
35+
value: "true"
3036
pipelineRef:
3137
resolver: git
3238
params:

.tekton/tuffer-pull-request.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ spec:
3030
value: Dockerfile.tuffer
3131
- name: build-source-image
3232
value: "true"
33+
- name: prefetch-input
34+
value: '[{"type": "cargo", "path": "."}, {"type": "rpm", "path": "."}]'
35+
- name: hermetic
36+
value: "true"
37+
- name: dev-package-managers
38+
value: "true"
3339
pipelineRef:
3440
resolver: git
3541
params:

.tekton/tuffer-push.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ spec:
2727
value: Dockerfile.tuffer
2828
- name: build-source-image
2929
value: "true"
30+
- name: prefetch-input
31+
value: '[{"type": "cargo", "path": "."}, {"type": "rpm", "path": "."}]'
32+
- name: hermetic
33+
value: "true"
34+
- name: dev-package-managers
35+
value: "true"
3036
pipelineRef:
3137
resolver: git
3238
params:

Dockerfile.rh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@ FROM registry.access.redhat.com/ubi9/ubi:latest as builder
22

33
USER root
44

5-
ARG RUST_VERSION="1.79.0"
6-
7-
RUN dnf install -y perl gcc openssl openssl-devel cmake gcc-c++ git curl-minimal unzip cyrus-sasl-devel
8-
9-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- --default-toolchain=${RUST_VERSION} -y
10-
11-
ENV PATH "$PATH:/root/.cargo/bin"
5+
RUN dnf install -y perl gcc openssl openssl-devel cmake gcc-c++ git curl-minimal unzip cyrus-sasl-devel rust cargo
126

137
RUN mkdir /tmp/tuftool
148
COPY . /tmp/tuftool

Dockerfile.tuffer

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@ FROM registry.access.redhat.com/ubi9/ubi:latest as builder
22

33
USER root
44

5-
ARG RUST_VERSION="1.79.0"
6-
7-
RUN dnf install -y perl gcc openssl openssl-devel cmake gcc-c++ git curl-minimal unzip cyrus-sasl-devel
8-
9-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- --default-toolchain=${RUST_VERSION} -y
10-
11-
ENV PATH "$PATH:/root/.cargo/bin"
5+
RUN dnf install -y perl gcc openssl openssl-devel cmake gcc-c++ git curl-minimal unzip cyrus-sasl-devel rust cargo
126

137
RUN mkdir /tmp/tuftool
148
COPY . /tmp/tuftool

rpms.in.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
packages: [perl, gcc, openssl, openssl-devel, cmake, gcc-c++, git, curl-minimal, unzip, cyrus-sasl-devel, rust, cargo]
2+
contentOrigin:
3+
repofiles: ["./ubi.repo"]
4+
arches: [x86_64]

0 commit comments

Comments
 (0)