Skip to content

Commit

Permalink
Merge pull request #181 from briandowns/gzip_images
Browse files Browse the repository at this point in the history
zip tarballs
  • Loading branch information
briandowns authored Aug 12, 2020
2 parents 86afc88 + ac44b1b commit ffaa1f8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ remote-debug: build-debug ## Run with remote debugging listening on :2
remote-debug-exit: ## Kill dlv started with make remote-debug
./scripts/remote-debug-exit

dev-shell-build: build/images/airgap.tar
dev-shell-build: build/images/airgap.tar.gz
./scripts/dev-shell-build

build/images/airgap.tar:
build/images/airgap.tar.gz:
./scripts/airgap-images.sh

clean-cache: ## Clean up docker base caches used for development
Expand Down Expand Up @@ -82,7 +82,7 @@ download-charts: ## Download packaged helm charts
package: download-charts package-airgap ## Package the rke2 binary
./scripts/package

package-airgap: build/images/airgap.tar ## Package docker images for airgap environment
package-airgap: build/images/airgap.tar.gz ## Package docker images for airgap environment
./scripts/package-airgap

./.dapper:
Expand Down
4 changes: 1 addition & 3 deletions pkg/bootstrap/stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ import (
"github.com/sirupsen/logrus"
)

var (
releasePattern = regexp.MustCompile("^v[0-9]")
)
var releasePattern = regexp.MustCompile("^v[0-9]")

func dataDirFor(dataDir, dataName string) string {
return filepath.Join(dataDir, "data", dataName, "bin")
Expand Down
3 changes: 1 addition & 2 deletions scripts/airgap-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ mkdir -p ./build/images/
airgap_image_file='scripts/airgap/image-list.txt'
images=$(cat "${airgap_image_file}")
xargs -n1 docker pull <<< "${images}"
docker save ${images} -o ./build/images/airgap.tar

docker save ${images} | gzip > ./build/images/airgap.tar.gz
7 changes: 2 additions & 5 deletions scripts/dev-shell-build
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ IMAGE_REPO=ranchertest

mkdir -p build/images

docker save ranchertest/kubernetes:${VERSION} \
-o build/images/k8s-image-amd64.tar

docker save rancher/rke2-runtime:${VERSION}-${GOARCH} \
-o build/images/rke2-runtime-image-amd64.tar
docker save ranchertest/kubernetes:${VERSION} | gzip > ./build/images/k8s-image-amd64.tar.gz
docker save rancher/rke2-runtime:${VERSION}-${GOARCH} | gzip > ./build/images/rke2-runtime-image-amd64.tar.gz

# build the dev shell image
docker build -t ${PROG}-dev --target shell .
2 changes: 1 addition & 1 deletion scripts/package-airgap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ cd $(dirname $0)/..

airgap_image_file='scripts/airgap/image-list.txt'
mkdir -p dist/artifacts
cp build/images/airgap.tar dist/artifacts/rke2-airgap-images-amd64.tar
cp build/images/airgap.tar.gz dist/artifacts/rke2-airgap-images-amd64.tar.gz
cp "${airgap_image_file}" dist/artifacts/rke2-images.txt

5 changes: 5 additions & 0 deletions scripts/validate
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash
set -e

if [ -n ${SKIP_VALIDATE} ]; then
echo "skipping validation. continuing..."
exit 0
fi

cd $(dirname $0)/..

GO=${GO-go}
Expand Down

0 comments on commit ffaa1f8

Please sign in to comment.