-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
433320b
commit 5d3c5e3
Showing
26 changed files
with
455 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
"WPS361": 3, | ||
"WPS231": 2, | ||
"WPS421": 2, | ||
"WPS214": 1, | ||
"WPS226": 4 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/python/tests/blueprints/multi-arch-buildx-platform/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
fake-target: | ||
echo 'here to make sure this file is modified' |
26 changes: 26 additions & 0 deletions
26
packages/python/tests/blueprints/multi-arch-buildx-platform/fixtures/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
fake-target: | ||
echo 'here to make sure this file is modified' | ||
|
||
# START: M-DOCKER-IMAGES | ||
define m_env | ||
$(eval include packages/python/tests/blueprints/multi-arch-buildx-platform/m/.m/m_env.sh) | ||
$(eval $(cut -d= -f1 packages/python/tests/blueprints/multi-arch-buildx-platform/m/.m/m_env.sh)) | ||
endef | ||
|
||
m-env: | ||
mkdir -p packages/python/tests/blueprints/multi-arch-buildx-platform/m/.m && m ci env --bashrc > packages/python/tests/blueprints/multi-arch-buildx-platform/m/.m/m_env.sh | ||
|
||
m-blueprints: m-env | ||
$(call m_env) | ||
m blueprints --skip-makefile --skip-workflow packages/python/tests/blueprints/multi-arch-buildx-platform/m | ||
chmod +x packages/python/tests/blueprints/multi-arch-buildx-platform/m/.m/blueprints/local/*.sh | ||
|
||
dev-m-image1: m-blueprints | ||
$(call m_env) | ||
packages/python/tests/blueprints/multi-arch-buildx-platform/m/.m/blueprints/local/m-image1.build.sh | ||
|
||
dev-m-image2: dev-m-image1 | ||
$(call m_env) | ||
packages/python/tests/blueprints/multi-arch-buildx-platform/m/.m/blueprints/local/m-image2.build.sh | ||
|
||
# END: M-DOCKER-IMAGES |
14 changes: 14 additions & 0 deletions
14
packages/python/tests/blueprints/multi-arch-buildx-platform/fixtures/ci/_find-cache.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
imageName=$1 | ||
pullCache() { | ||
if docker pull -q "$1:$2" 2> /dev/null; then | ||
docker tag "$1:$2" "staged-image:cache" | ||
else | ||
return 1 | ||
fi | ||
} | ||
findCache() { | ||
pullCache "$1" master || echo "NO CACHE FOUND" | ||
} | ||
set -euxo pipefail | ||
findCache "ghcr.io/repo-owner/$imageName" |
1 change: 1 addition & 0 deletions
1
packages/python/tests/blueprints/multi-arch-buildx-platform/fixtures/ci/_image-names.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["m-image1","m-image2"] |
1 change: 1 addition & 0 deletions
1
packages/python/tests/blueprints/multi-arch-buildx-platform/fixtures/ci/_image-tags.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["1.1.1","latest","v1","v1.1"] |
5 changes: 5 additions & 0 deletions
5
packages/python/tests/blueprints/multi-arch-buildx-platform/fixtures/ci/_push-image.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
imageName=$1 | ||
set -euxo pipefail | ||
docker tag staged-image:latest "ghcr.io/repo-owner/$ARCH-$imageName:$M_TAG" | ||
docker push "ghcr.io/repo-owner/$ARCH-$imageName:$M_TAG" |
16 changes: 16 additions & 0 deletions
16
packages/python/tests/blueprints/multi-arch-buildx-platform/fixtures/ci/m-image1.build.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
export DOCKER_BUILDKIT=1 | ||
set -euxo pipefail | ||
|
||
docker buildx build --platform "$PLATFORM" \ | ||
--build-arg ARCH="$ARCH" \ | ||
--build-arg BUILDKIT_INLINE_CACHE=1 \ | ||
--build-arg M_TAG= \ | ||
--cache-from staged-image:cache \ | ||
--file packages/python/tests/blueprints/multi-arch/m/docker/Dockerfile.image1 \ | ||
--progress plain \ | ||
--secret id=GITHUB_TOKEN \ | ||
--tag ghcr.io/repo-owner/m-image1: \ | ||
--tag staged-image:latest \ | ||
--target first \ | ||
. |
10 changes: 10 additions & 0 deletions
10
packages/python/tests/blueprints/multi-arch-buildx-platform/fixtures/ci/m-image1.manifest.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
docker buildx imagetools create \ | ||
-t ghcr.io/repo-owner/m-image1:1.1.1 \ | ||
-t ghcr.io/repo-owner/m-image1:latest \ | ||
-t ghcr.io/repo-owner/m-image1:v1 \ | ||
-t ghcr.io/repo-owner/m-image1:v1.1 \ | ||
ghcr.io/repo-owner/amd64-m-image1:1.1.1 \ | ||
ghcr.io/repo-owner/arm64-m-image1:1.1.1 |
15 changes: 15 additions & 0 deletions
15
packages/python/tests/blueprints/multi-arch-buildx-platform/fixtures/ci/m-image2.build.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
export DOCKER_BUILDKIT=1 | ||
set -euxo pipefail | ||
|
||
docker buildx build --platform "$PLATFORM" \ | ||
--build-arg ARCH="$ARCH" \ | ||
--build-arg BUILDKIT_INLINE_CACHE=1 \ | ||
--build-arg M_TAG= \ | ||
--cache-from staged-image:cache \ | ||
--file packages/python/tests/blueprints/multi-arch/m/docker/Dockerfile.image1 \ | ||
--progress plain \ | ||
--tag ghcr.io/repo-owner/m-image2: \ | ||
--tag staged-image:latest \ | ||
--target second \ | ||
. |
10 changes: 10 additions & 0 deletions
10
packages/python/tests/blueprints/multi-arch-buildx-platform/fixtures/ci/m-image2.manifest.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
docker buildx imagetools create \ | ||
-t ghcr.io/repo-owner/m-image2:1.1.1 \ | ||
-t ghcr.io/repo-owner/m-image2:latest \ | ||
-t ghcr.io/repo-owner/m-image2:v1 \ | ||
-t ghcr.io/repo-owner/m-image2:v1.1 \ | ||
ghcr.io/repo-owner/amd64-m-image2:1.1.1 \ | ||
ghcr.io/repo-owner/arm64-m-image2:1.1.1 |
Oops, something went wrong.