Skip to content

Commit 4adcdd4

Browse files
committed
Cleanup CI images, add distro release and version
1 parent 18801e5 commit 4adcdd4

File tree

7 files changed

+57
-57
lines changed

7 files changed

+57
-57
lines changed

.github/workflows/debian.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
- docker/debian/Dockerfile
88
- test
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
1018
env:
1119
CONTAINER_REGISTRY: ghcr.io
1220
BUILDKIT_PROGRESS: plain
@@ -114,7 +122,6 @@ jobs:
114122
target: ${{ matrix.os.compiler_name }}
115123
- name: Export digest
116124
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
117-
shell: bash
118125
run: |
119126
mkdir -p /tmp/digests
120127
DIGEST="${{ steps.build.outputs.digest }}"
@@ -196,13 +203,11 @@ jobs:
196203
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
197204
- name: Create manifest list and push
198205
working-directory: /tmp/digests
199-
shell: bash
200206
run: |
201207
eval "docker buildx imagetools create \
202208
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
203209
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
204210
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
205211
- name: Inspect image
206-
shell: bash
207212
run: |
208213
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}

.github/workflows/rhel.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
- docker/rhel/Dockerfile
88
- test
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
1018
env:
1119
CONTAINER_REGISTRY: ghcr.io
1220
REDHAT_REGISTRY: registry.redhat.io
@@ -104,7 +112,6 @@ jobs:
104112
target: ${{ matrix.os.compiler_name }}
105113
- name: Export digest
106114
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
107-
shell: bash
108115
run: |
109116
mkdir -p /tmp/digests
110117
DIGEST="${{ steps.build.outputs.digest }}"
@@ -171,13 +178,11 @@ jobs:
171178
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
172179
- name: Create manifest list and push
173180
working-directory: /tmp/digests
174-
shell: bash
175181
run: |
176182
eval "docker buildx imagetools create \
177183
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
178184
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
179185
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
180186
- name: Inspect image
181-
shell: bash
182187
run: |
183188
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}

.github/workflows/tools-rippled.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ on:
66
- .github/workflows/tools-rippled.yml
77
- docker/tools-rippled/Dockerfile
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
defaults:
14+
run:
15+
shell: bash
16+
917
env:
1018
CONTAINER_REGISTRY: ghcr.io
1119
BUILDKIT_PROGRESS: plain
@@ -84,7 +92,6 @@ jobs:
8492
target: ${{ matrix.tool }}
8593
- name: Export digest
8694
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
87-
shell: bash
8895
run: |
8996
mkdir -p /tmp/digests
9097
DIGEST="${{ steps.build.outputs.digest }}"
@@ -143,13 +150,11 @@ jobs:
143150
type=raw,value=latest
144151
- name: Create manifest list and push
145152
working-directory: /tmp/digests
146-
shell: bash
147153
run: |
148154
eval "docker buildx imagetools create \
149155
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
150156
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
151157
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
152158
- name: Inspect image
153-
shell: bash
154159
run: |
155160
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}

.github/workflows/ubuntu.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
- docker/ubuntu/Dockerfile
88
- test
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
1018
env:
1119
CONTAINER_REGISTRY: ghcr.io
1220
BUILDKIT_PROGRESS: plain
@@ -112,7 +120,6 @@ jobs:
112120
target: ${{ matrix.os.compiler_name }}
113121
- name: Export digest
114122
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
115-
shell: bash
116123
run: |
117124
mkdir -p /tmp/digests
118125
DIGEST="${{ steps.build.outputs.digest }}"
@@ -191,13 +198,11 @@ jobs:
191198
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
192199
- name: Create manifest list and push
193200
working-directory: /tmp/digests
194-
shell: bash
195201
run: |
196202
eval "docker buildx imagetools create \
197203
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
198204
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
199205
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
200206
- name: Inspect image
201-
shell: bash
202207
run: |
203208
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}

docker/debian/Dockerfile

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ if [[ "${CXX_VER}" != "${GCC_VERSION}" ]]; then
116116
fi
117117
EOF
118118

119+
# Set the Conan home directory, so the users of this image can find the default
120+
# profile.
119121
ENV HOME=/root
120122
WORKDIR ${HOME}
121-
122-
# Set Conan home directory, so the users of this image can find default profile
123123
ENV CONAN_HOME=${HOME}/.conan2
124124

125125
# Create a default Conan profile.
@@ -128,14 +128,14 @@ conan profile detect
128128
rm -rf /tmp/*
129129
EOF
130130

131-
# Fix the C++ dialect.
132-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
133-
# Explicitly set the compiler flags.
131+
# Explicitly set the compiler flags and the distribution name and version.
134132
RUN <<EOF
135133
cat >> $(conan config home)/global.conf <<EOT
134+
tools.info.package_id:confs+=["RHEL", "${RHEL_VERSION}"]
136135
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
137136
EOT
138137
EOF
138+
139139
# Print the Conan profile to verify the configuration.
140140
RUN conan profile show
141141

@@ -197,10 +197,10 @@ if [[ "${CXX_VER}" != "${CLANG_VERSION}" ]]; then
197197
fi
198198
EOF
199199

200+
# Set the Conan home directory, so the users of this image can find the default
201+
# profile.
200202
ENV HOME=/root
201203
WORKDIR ${HOME}
202-
203-
# Set Conan home directory, so the users of this image can find default profile
204204
ENV CONAN_HOME=${HOME}/.conan2
205205

206206
# Create a default Conan profile.
@@ -209,16 +209,10 @@ conan profile detect
209209
rm -rf /tmp/*
210210
EOF
211211

212-
# Fix the C++ dialect.
213-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
214-
# Explicitly set the compiler flags. To ensure compatibility with a range of
215-
# Clang compilers, we must also add extra flags that apply to certain versions
216-
# of Clang.
217-
# TODO: Move extra flags into the rippled repository as a custom Conan profile.
212+
# Explicitly set the compiler flags and the distribution name and version.
218213
RUN <<EOF
219-
CXX_VER=$(${CXX} -dumpversion)
220-
CXX_VER=${CXX_VER%%.*}
221214
cat >> $(conan config home)/global.conf <<EOT
215+
tools.info.package_id:confs+=["RHEL", "${RHEL_VERSION}"]
222216
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
223217
EOT
224218
EOF

docker/rhel/Dockerfile

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ if [[ "${CXX_VER}" != "${GCC_VERSION}" ]]; then
8282
fi
8383
EOF
8484

85+
# Set the Conan home directory, so the users of this image can find the default
86+
# profile.
8587
ENV HOME=/root
8688
WORKDIR ${HOME}
87-
88-
# Set Conan home directory, so the users of this image can find default profile
8989
ENV CONAN_HOME=${HOME}/.conan2
9090

9191
# Create a default Conan profile.
@@ -94,11 +94,10 @@ conan profile detect
9494
rm -rf /tmp/*
9595
EOF
9696

97-
# Fix the C++ dialect.
98-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
99-
# Explicitly set the compiler flags.
97+
# Explicitly set the compiler flags and the distribution name and version.
10098
RUN <<EOF
10199
cat >> $(conan config home)/global.conf <<EOT
100+
tools.info.package_id:confs+=["RHEL", "${RHEL_VERSION}"]
102101
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
103102
EOT
104103
EOF
@@ -147,10 +146,10 @@ if [[ ${CXX_VER} -lt ${MINIMUM_CLANG_VERSION} ]]; then
147146
fi
148147
EOF
149148

149+
# Set the Conan home directory, so the users of this image can find the default
150+
# profile.
150151
ENV HOME=/root
151152
WORKDIR ${HOME}
152-
153-
# Set Conan home directory, so the users of this image can find default profile
154153
ENV CONAN_HOME=${HOME}/.conan2
155154

156155
# Create a default Conan profile.
@@ -159,16 +158,10 @@ conan profile detect
159158
rm -rf /tmp/*
160159
EOF
161160

162-
# Fix the C++ dialect.
163-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
164-
# Explicitly set the compiler flags. To ensure compatibility with a range of
165-
# Clang compilers, we must also add extra flags that apply to certain versions
166-
# of Clang.
167-
# TODO: Move extra flags into the rippled repository as a custom Conan profile.
161+
# Explicitly set the compiler flags and the distribution name and version.
168162
RUN <<EOF
169-
CXX_VER=$(${CXX} -dumpversion)
170-
CXX_VER=${CXX_VER%%.*}
171163
cat >> $(conan config home)/global.conf <<EOT
164+
tools.info.package_id:confs+=["RHEL", "${RHEL_VERSION}"]
172165
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
173166
EOT
174167
EOF

docker/ubuntu/Dockerfile

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ if [[ "${CXX_VER}" != "${GCC_VERSION}" ]]; then
100100
fi
101101
EOF
102102

103+
# Set the Conan home directory, so the users of this image can find the default
104+
# profile.
103105
ENV HOME=/root
104106
WORKDIR ${HOME}
105-
106-
# Set Conan home directory, so the users of this image can find default profile
107107
ENV CONAN_HOME=${HOME}/.conan2
108108

109109
# Create a default Conan profile.
@@ -112,11 +112,10 @@ conan profile detect
112112
rm -rf /tmp/*
113113
EOF
114114

115-
# Fix the C++ dialect.
116-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
117-
# Explicitly set the compiler flags.
115+
# Explicitly set the compiler flags and the distribution name and version.
118116
RUN <<EOF
119117
cat >> $(conan config home)/global.conf <<EOT
118+
tools.info.package_id:confs+=["RHEL", "${RHEL_VERSION}"]
120119
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
121120
EOT
122121
EOF
@@ -177,10 +176,10 @@ if [[ "${CXX_VER}" != "${CLANG_VERSION}" ]]; then
177176
fi
178177
EOF
179178

179+
# Set the Conan home directory, so the users of this image can find the default
180+
# profile.
180181
ENV HOME=/root
181182
WORKDIR ${HOME}
182-
183-
# Set Conan home directory, so the users of this image can find default profile
184183
ENV CONAN_HOME=${HOME}/.conan2
185184

186185
# Create a default Conan profile.
@@ -189,16 +188,10 @@ conan profile detect
189188
rm -rf /tmp/*
190189
EOF
191190

192-
# Fix the C++ dialect.
193-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
194-
# Explicitly set the compiler flags. To ensure compatibility with a range of
195-
# Clang compilers, we must also add extra flags that apply to certain versions
196-
# of Clang.
197-
# TODO: Move extra flags into the rippled repository as a custom Conan profile.
191+
# Explicitly set the compiler flags and the distribution name and version.
198192
RUN <<EOF
199-
CXX_VER=$(${CXX} -dumpversion)
200-
CXX_VER=${CXX_VER%%.*}
201193
cat >> $(conan config home)/global.conf <<EOT
194+
tools.info.package_id:confs+=["RHEL", "${RHEL_VERSION}"]
202195
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
203196
EOT
204197
EOF

0 commit comments

Comments
 (0)