Skip to content

Commit

Permalink
updated post_push to generate manifest dynamically (#124)
Browse files Browse the repository at this point in the history
- Takes the git-version tag at runtime to generate the correct tags
  • Loading branch information
jack1902 authored Jul 17, 2020
1 parent 448fe6d commit 407374a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 26 deletions.
34 changes: 34 additions & 0 deletions scripts/dockerfiles/hooks/post_push
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,38 @@
curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.9.0/manifest-tool-linux-amd64
chmod +x manifest-tool

git_tag=$(git describe --abbrev=0 --tags)
IFS=. read major minor bugfix <<EOF
${git_tag##*v}
EOF

cat <<EOF > multi-arch-manifest.yaml
image: subspacecommunity/subspace
tags: ['${major}.${minor}.${bugfix}', '${major}.${minor}', '${major}']
manifests:
- image: subspacecommunity/subspace:amd64
platform:
architecture: amd64
os: linux
- image: subspacecommunity/subspace:386
platform:
architecture: 386
os: linux
- image: subspacecommunity/subspace:arm32v6
platform:
architecture: arm
os: linux
variant: v6
- image: subspacecommunity/subspace:arm32v7
platform:
architecture: arm
os: linux
variant: v7
- image: subspacecommunity/subspace:arm64v8
platform:
architecture: arm64
os: linux
variant: v8
EOF

./manifest-tool push from-spec multi-arch-manifest.yaml
26 changes: 0 additions & 26 deletions scripts/dockerfiles/multi-arch-manifest.yaml

This file was deleted.

0 comments on commit 407374a

Please sign in to comment.