-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run the hello test on multiple architectures (#227)
- Loading branch information
Showing
4 changed files
with
103 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,59 @@ | ||
sudo: required | ||
|
||
dist: trusty | ||
|
||
services: | ||
- docker | ||
|
||
language: | ||
- go | ||
|
||
dist: bionic | ||
language: go | ||
go: | ||
- '1.14' | ||
- '1.15' | ||
|
||
git: | ||
depth: 1 | ||
|
||
install: true # skipping the default go dependencies install step | ||
jobs: | ||
include: | ||
- arch: amd64 | ||
- arch: arm64 | ||
- arch: s390x | ||
- arch: ppc64le | ||
|
||
script: | ||
- bash integration_test.sh | ||
# Make sure ko compiles for the right architecture. | ||
- eval $(go env) | ||
- go install -mod=vendor ./cmd/ko | ||
# Try with all, and GOOS/GOARCH set. | ||
- | | ||
GOOS=${GOOS} GOARCH=${GOARCH} KO_DOCKER_REPO=ko.local ko publish --platform=all -B ./cmd/ko/test | ||
OUTPUT=$(docker run -i ko.local/test -wait=false 2>&1) | ||
if [[ ! "${OUTPUT}" =~ "$(cat ./cmd/ko/test/kodata/kenobi)" ]]; then | ||
echo Mismatched output: ${OUTPUT}, wanted: $(cat ./cmd/ko/test/kodata/kenobi) | ||
exit 1 | ||
fi | ||
if [[ ! "${OUTPUT}" =~ "$(cat ./cmd/ko/test/kodata/HEAD)" ]]; then | ||
echo Mismatched output: ${OUTPUT}, wanted: $(cat ./cmd/ko/test/kodata/HEAD) | ||
exit 1 | ||
fi | ||
# Try with the appropriate platform. | ||
- | | ||
KO_DOCKER_REPO=ko.local ko publish --platform=${GOOS}/${GOARCH} -B ./cmd/ko/test | ||
OUTPUT=$(docker run -i ko.local/test -wait=false 2>&1) | ||
if [[ ! "${OUTPUT}" =~ "$(cat ./cmd/ko/test/kodata/kenobi)" ]]; then | ||
echo Mismatched output: ${OUTPUT}, wanted: $(cat ./cmd/ko/test/kodata/kenobi) | ||
exit 1 | ||
fi | ||
if [[ ! "${OUTPUT}" =~ "$(cat ./cmd/ko/test/kodata/HEAD)" ]]; then | ||
echo Mismatched output: ${OUTPUT}, wanted: $(cat ./cmd/ko/test/kodata/HEAD) | ||
exit 1 | ||
fi | ||
# Try with just GOOS/GOARCH | ||
- | | ||
GOOS=${GOOS} GOARCH=${GOARCH} KO_DOCKER_REPO=ko.local ko publish -B ./cmd/ko/test | ||
OUTPUT=$(docker run -i ko.local/test -wait=false 2>&1) | ||
if [[ ! "${OUTPUT}" =~ "$(cat ./cmd/ko/test/kodata/kenobi)" ]]; then | ||
echo Mismatched output: ${OUTPUT}, wanted: $(cat ./cmd/ko/test/kodata/kenobi) | ||
exit 1 | ||
fi | ||
if [[ ! "${OUTPUT}" =~ "$(cat ./cmd/ko/test/kodata/HEAD)" ]]; then | ||
echo Mismatched output: ${OUTPUT}, wanted: $(cat ./cmd/ko/test/kodata/HEAD) | ||
exit 1 | ||
fi | ||
notifications: | ||
email: false |
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