Skip to content

Commit b77ecbd

Browse files
authored
Properly archive Kafka binaries between steps in GHA (#45)
* Properly archive Kafka binaries between steps in GHA Signed-off-by: Jakub Stejskal <xstejs24@gmail.com> * Try to fix path for extract binaries Signed-off-by: Jakub Stejskal <xstejs24@gmail.com> --------- Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
1 parent d2cd2ce commit b77ecbd

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

.github/actions/build/build-containers/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ runs:
2020
- name: Download Kafka binaries artifact
2121
uses: actions/download-artifact@v7
2222
with:
23-
name: kafka-binaries
24-
path: images/kafka_binaries/
23+
name: kafka-binaries.tar.gz
24+
path: .
2525

26-
- name: Restore execute permissions on Kafka scripts
26+
- name: Extract Kafka binaries
2727
shell: bash
28-
run: chmod -R +x images/kafka_binaries/*/bin/
28+
run: tar -xzf kafka-binaries.tar.gz -C images
2929

3030
- name: Build base images
3131
shell: bash

.github/actions/build/prepare-kafka/action.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ runs:
2222
shell: bash
2323
run: make prepare
2424

25+
- name: Create tar archive of Kafka binaries
26+
shell: bash
27+
run: tar -czf kafka-binaries.tar.gz -C images kafka_binaries
28+
2529
- name: Upload Kafka binaries artifact
2630
uses: actions/upload-artifact@v5
2731
with:
28-
name: kafka-binaries
29-
path: images/kafka_binaries/
30-
retention-days: 1
31-
32-
# Made with Bob
32+
name: kafka-binaries.tar.gz
33+
path: kafka-binaries.tar.gz

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
.idea
22

33
# MacOS related
4-
.DS_Store
4+
.DS_Store
5+
6+
# Build artifacts
7+
images/kafka_binaries/
8+
images/kafka_tars/
9+
images/base/strimzi_base_*.tar
10+
container-archives/

images/base/build_base_images.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ do
2424
-t strimzi/$PROJECT_NAME_BASE:$CURRENT_TAG-$ARCH $DOCKERFILE_BASE_DIR
2525

2626
# "refresh" Docker's awareness of the image
27-
$DOCKER_CMD save strimzi/$PROJECT_NAME_BASE:$CURRENT_TAG-$ARCH -o strimzi_base_$ARCH.tar
28-
$DOCKER_CMD load -i strimzi_base_$ARCH.tar
27+
$DOCKER_CMD save strimzi/$PROJECT_NAME_BASE:$CURRENT_TAG-$ARCH -o $DOCKERFILE_BASE_DIR/strimzi_base_$ARCH.tar
28+
$DOCKER_CMD load -i $DOCKERFILE_BASE_DIR/strimzi_base_$ARCH.tar
2929
# tagging this image eliminate this error
3030
# ```
3131
# ERROR: failed to solve: strimzi/base:local: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

0 commit comments

Comments
 (0)