Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

ref(build): build all images with buildx #4402

Merged
merged 3 commits into from
Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 8 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ jobs:
run: |
touch .env
make kind-up
make pkg/envoy/lds/stats.wasm
go test -v ./tests/scenarios/...

imagescan:
Expand Down Expand Up @@ -207,7 +206,9 @@ jobs:
with:
go-version: 1.17
- name: Build docker images
run: make docker-build-osm-controller docker-build-osm-injector docker-build-osm-crds docker-build-osm-bootstrap docker-build-init
env:
DOCKER_BUILDX_OUTPUT: type=docker
run: make docker-build-osm
- name: Scan docker images for vulnerabilities
run: make trivy-scan-images

Expand Down Expand Up @@ -241,7 +242,9 @@ jobs:
with:
go-version: 1.17
- name: Build test dependencies
run: make docker-build-osm-controller docker-build-osm-injector docker-build-osm-crds docker-build-osm-bootstrap docker-build-init build-osm docker-build-tcp-echo-server
env:
DOCKER_BUILDX_OUTPUT: type=docker
run: make docker-build-osm build-osm docker-build-tcp-echo-server
# PR Tests
- name: Run PR tests
id: pr_test
Expand Down Expand Up @@ -335,28 +338,13 @@ jobs:
env:
DOCKER_USER: ${{ secrets.RELEASE_DOCKER_USER }}
DOCKER_PASS: ${{ secrets.RELEASE_DOCKER_PASS }}
CTR_REGISTRY: ${{ github.repository_owner }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore Module Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomod2-
- name: Restore Build Cache
uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
- name: Setup Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Docker Login
run: docker login --username "$DOCKER_USER" --password-stdin <<< "$DOCKER_PASS"
- name: Push images with git sha tag
env:
CTR_TAG: ${{ github.sha }}
run: make docker-push
run: make docker-build-cross
22 changes: 3 additions & 19 deletions .github/workflows/nightly-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,12 @@ jobs:
env:
DOCKER_USER: ${{ secrets.RELEASE_DOCKER_USER }}
DOCKER_PASS: ${{ secrets.RELEASE_DOCKER_PASS }}
CTR_TAG: latest-main
CTR_REGISTRY: ${{ github.repository_owner }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore Module Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomod2-
- name: Restore Build Cache
uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
- name: Setup Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Docker Login
run: docker login --username "$DOCKER_USER" --password-stdin <<< "$DOCKER_PASS"
- name: Push images with git sha tag
env:
CTR_TAG: latest-main
run: make docker-push
run: make docker-build-cross
30 changes: 7 additions & 23 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,23 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore Module Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomod2-
- name: Restore Build Cache
uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
- name: Setup Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Docker Login
run: docker login --username "$DOCKER_USER" --password-stdin <<< "$DOCKER_PASS"
- name: Push images with version tag
env:
CTR_TAG: ${{ needs.version.outputs.version }}
run: make docker-push VERIFY_TAGS=true
VERIFY_TAGS: "true"
run: make docker-build-cross
- name: Push images with latest tag
# Only for non-pre-releases
if: ${{ !(contains(env.VERSION, '-alpha.') || contains(env.VERSION, '-beta.') || contains(env.VERSION, '-rc.') || contains(env.VERSION, '-nightly.')) }}
env:
CTR_TAG: latest
run: make docker-push
- name: Upload image digest
uses: actions/upload-artifact@v2
with:
name: osm_image_digests
path: /tmp/osm_image_digest_*
run: make docker-build-cross
- name: Image digests
env:
CTR_TAG: ${{ needs.version.outputs.version }}
run: make docker-digests-osm

imagescan:
name: Scan images for security vulnerabilities
Expand Down
Loading