Skip to content

Commit 6ada742

Browse files
committed
Remvoe other multiline \
Signed-off-by: Federico Busetti <[email protected]>
1 parent fb7f4d7 commit 6ada742

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.gitlab_ci/_templates.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@ variables:
2828
- if [[ -n "$DOCKER_TARGET" ]]; then export TARGET_ARG="--target $DOCKER_TARGET"; fi;
2929
- if [[ -n "$DOCKER_PLATFORM" ]]; then export PLATFORM_ARG="--platform $DOCKER_PLATFORM"; fi;
3030
- if [[ -n "$DOCKER_PLATFORM" ]]; then export PLATFORM_SUFFIX="-$(echo $DOCKER_PLATFORM | sed 's/\///')"; fi;
31-
# remove \ from platform to
31+
# remove \ from platform variable
3232
- export SUFFIX=$(echo $DOCKER_PLATFORM | sed 's/\///')
33-
- |
34-
docker buildx build --push \
35-
$TARGET_ARG \
36-
--tag $DOCKER_IMAGE_FULL_TAG$PLATFORM_SUFFIX \
37-
$PLATFORM_ARG \
38-
--cache-from type=registry,ref=$DOCKER_CACHE_FULL_TAG \
39-
--cache-to type=registry,ref=$DOCKER_CACHE_FULL_TAG \
33+
- docker buildx build --push
34+
$TARGET_ARG
35+
--tag $DOCKER_IMAGE_FULL_TAG$PLATFORM_SUFFIX
36+
$PLATFORM_ARG
37+
--cache-from type=registry,ref=$DOCKER_CACHE_FULL_TAG
38+
--cache-to type=registry,ref=$DOCKER_CACHE_FULL_TAG
4039
.
4140

4241
# Architectures are hardcoded for multiarch, need to make this better
@@ -47,8 +46,8 @@ variables:
4746
script:
4847
- *docker-gitlab-login
4948
- echo "Building $DOCKER_IMAGE_FULL_TAG multiarch manifest"
50-
- docker manifest create $DOCKER_IMAGE_FULL_TAG \
51-
--amend $DOCKER_IMAGE_FULL_TAG-linuxamd64 \
49+
- docker manifest create $DOCKER_IMAGE_FULL_TAG
50+
--amend $DOCKER_IMAGE_FULL_TAG-linuxamd64
5251
--amend $DOCKER_IMAGE_FULL_TAG-linuxarm64
5352
- docker manifest push $DOCKER_IMAGE_FULL_TAG
5453

0 commit comments

Comments
 (0)