Skip to content

Commit

Permalink
only build images with DOCKER_BUILDKIT=1, don't run tests with it?
Browse files Browse the repository at this point in the history
  • Loading branch information
imjasonh committed Dec 22, 2021
1 parent ca7a9bf commit 4605872
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 50 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/integration-k8s-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Integration tests (K8s)

# Triggers the workflow on pull request events
on: [pull_request]
on:
pull_request:
branches: ['master']

concurrency:
group: int-test-k8s-${{ github.head_ref }}
Expand All @@ -12,12 +13,11 @@ jobs:
env:
IMAGE_REPO: 'localhost:5000'
REGISTRY: 'localhost:5000'
DOCKER_BUILDKIT: 1
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.14
go-version: 1.17
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration-layers-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Integration tests (Layers)

# Triggers the workflow on push or pull request events
on: [pull_request]
on:
pull_request:
branches: ['master']

concurrency:
group: int-test-layers-${{ github.head_ref }}
Expand All @@ -12,12 +13,11 @@ jobs:
env:
IMAGE_REPO: 'localhost:5000'
REGISTRY: 'localhost:5000'
DOCKER_BUILDKIT: 1
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.14
go-version: 1.17
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1

Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/integration-misc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Integration Tests Misc

# Triggers the workflow on push or pull request events
on: [pull_request]
on:
pull_request:
branches: ['master']

concurrency:
group: int-test-mis-${{ github.head_ref }}
Expand All @@ -15,23 +16,22 @@ jobs:
TRAVIS_REPO_SLUG: ${{ github.repository }}
TRAVIS_BRANCH: ${{ github.head_ref }}
TRAVIS_PULL_REQUEST: ${{ github.event.number }}
DOCKER_BUILDKIT: 1
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.14
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- uses: actions/setup-go@v2
with:
go-version: 1.17
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1

- name: Print Travis ENV vars
run: |
echo "TRAVIS_BRANCH: ${TRAVIS_BRANCH}"
echo "TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST}"
echo "TRAVIS_REPO_SLUG: ${TRAVIS_REPO_SLUG}"
- name: Print Travis ENV vars
run: |
echo "TRAVIS_BRANCH: ${TRAVIS_BRANCH}"
echo "TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST}"
echo "TRAVIS_REPO_SLUG: ${TRAVIS_REPO_SLUG}"
- name: Run integration-test-misc
run : |
make travis-setup
make minikube-setup
make integration-test-misc
- name: Run integration-test-misc
run : |
make travis-setup
make minikube-setup
make integration-test-misc
26 changes: 13 additions & 13 deletions .github/workflows/integration-run-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Integration tests (Run)

# Triggers the workflow on push or pull request events
on: [pull_request]
on:
pull_request:
branches: ['master']

concurrency:
group: int-test-run-${{ github.head_ref }}
Expand All @@ -12,17 +13,16 @@ jobs:
env:
IMAGE_REPO: 'localhost:5000'
REGISTRY: 'localhost:5000'
DOCKER_BUILDKIT: 1
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.14
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- uses: actions/setup-go@v2
with:
go-version: 1.17
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1

- name: Run integration-test-run
run: |
make travis-setup
make minikube-setup
make integration-test-run
- name: Run integration-test-run
run: |
make travis-setup
make minikube-setup
make integration-test-run
18 changes: 8 additions & 10 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
name: Unit tests

# Triggers the workflow on push or pull request events
on: [pull_request]
on:
pull_request:
branches: ['master']

concurrency:
group: unit-tests-${{ github.head_ref }}
cancel-in-progress: true

jobs:
tests:
env:
IMAGE_REPO: 'localhost:5000'
REGISTRY: 'localhost:5000'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.14
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.17
- uses: actions/checkout@v2

- run: make test
- run: make test
1 change: 1 addition & 0 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ func buildRequiredImages() error {
for _, setupCmd := range setupCommands {
fmt.Println(setupCmd.name)
cmd := exec.Command(setupCmd.command[0], setupCmd.command[1:]...)
cmd.Env = append(os.Environ(), "DOCKER_BUILDKIT=1") // Build with buildkit enabled.
if out, err := RunCommandWithoutTest(cmd); err != nil {
return errors.Wrap(err, fmt.Sprintf("%s failed: %s", setupCmd.name, string(out)))
}
Expand Down
1 change: 0 additions & 1 deletion scripts/integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ IMAGE_REPO="${IMAGE_REPO:-gcr.io/kaniko-test}"

docker version

# Sets up a kokoro (Google internal integration testing tool) environment
echo "Running integration tests..."
make out/executor
make out/warmer
Expand Down

0 comments on commit 4605872

Please sign in to comment.