-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from dhiller/create-builder-image
Create builder image
- Loading branch information
Showing
12 changed files
with
72 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
images=("builder" "test_install") | ||
for image in "${images[@]}"; do | ||
./build.sh $image | ||
./publish.sh $image | ||
done |
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,7 @@ | ||
#!/bin/bash | ||
|
||
set -xeuo pipefail | ||
|
||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd || exit 1)/common.sh" | ||
|
||
docker build "$SCRIPT_DIR/$1" -t ${IMAGE_NAME} |
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,22 @@ | ||
FROM gcr.io/k8s-testimages/bootstrap:v20190516-c6832d9 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends --no-upgrade \ | ||
shellcheck \ | ||
gettext-base \ | ||
python3-pkg-resources \ | ||
yamllint | ||
|
||
ENV GIMME_GO_VERSION=1.13.14 | ||
|
||
RUN mkdir -p /gimme && curl -sL \ | ||
https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | \ | ||
HOME=/gimme bash >> /etc/profile.d/gimme.sh | ||
|
||
ENV GOPATH="/go" GOBIN="/usr/bin" GO111MODULE="on" | ||
|
||
RUN set -x && \ | ||
. /etc/profile.d/gimme.sh && \ | ||
go get -v sigs.k8s.io/krew/cmd/[email protected] && \ | ||
go clean -cache -modcache && \ | ||
rm -rf /go && mkdir /go |
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,3 @@ | ||
#!/bin/bash | ||
|
||
IMAGE_NAME="dhiller/kubectl-virt-builder" |
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,8 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd || exit 1) | ||
BASE_DIR="${SCRIPT_DIR/\/kubectl-virt-plugin\/*/\/kubectl-virt-plugin}" | ||
|
||
[ ! -d "$SCRIPT_DIR/$1/config.sh" ] || exit 1 | ||
|
||
source "$SCRIPT_DIR/$1/config.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,7 @@ | ||
#!/bin/bash | ||
|
||
set -xeuo pipefail | ||
|
||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd || exit 1)/common.sh" | ||
|
||
docker push ${IMAGE_NAME}:latest |
File renamed without changes.
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,3 @@ | ||
#!/bin/bash | ||
|
||
IMAGE_NAME="dhiller/kubectl-krew" |
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 | ||
|
||
set -xeuo pipefail | ||
|
||
set -xeuo pipefail | ||
|
||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd || exit 1)/common.sh" | ||
|
||
docker pull ${IMAGE_NAME} | ||
sha_id=$(docker images --digests ${IMAGE_NAME} | grep 'latest ' | awk '{ print $3 }') | ||
echo "sha: ${sha_id}" | ||
|
||
sed -i -E 's#'"${IMAGE_NAME}"'@sha256\:[a-z0-9]+#'"${IMAGE_NAME}@$sha_id"'#g' ../scripts/functions | ||
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.