Skip to content
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
31 changes: 22 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ jobs:

build-docker:
name: Docker ${{ matrix.goarch }} ${{ matrix.fips }} default release build
needs: [get-product-version, build]
needs: [get-product-version, get-go-version, build]
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -279,7 +279,7 @@ jobs:
echo "minor_dev_tag=$(echo ${{ env.version }}| sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+(-[0-9a-zA-Z\+\.]+)?$/\1\2/')" >> $GITHUB_ENV

- name: Docker Build (Action)
uses: hashicorp/actions-docker-build@v1
uses: hashicorp/actions-docker-build@76d2fc91532d816ca2660d8f3139e432ac3700fd
if: ${{ !matrix.fips }}
with:
smoke_test: |
Expand All @@ -302,9 +302,11 @@ jobs:
docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.full_dev_tag }}-${{ github.sha }}
docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.minor_dev_tag }}
docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.minor_dev_tag }}-${{ github.sha }}
extra_build_args: |
GOLANG_VERSION=${{ needs.get-go-version.outputs.go-version }}

- name: Docker FIPS Build (Action)
uses: hashicorp/actions-docker-build@v1
uses: hashicorp/actions-docker-build@76d2fc91532d816ca2660d8f3139e432ac3700fd
if: ${{ matrix.fips }}
with:
smoke_test: |
Expand All @@ -327,10 +329,12 @@ jobs:
docker.io/hashicorppreview/${{ env.repo }}-control-plane-fips:${{ env.full_dev_tag }}-${{ github.sha }}
docker.io/hashicorppreview/${{ env.repo }}-control-plane-fips:${{ env.minor_dev_tag }}
docker.io/hashicorppreview/${{ env.repo }}-control-plane-fips:${{ env.minor_dev_tag }}-${{ github.sha }}
extra_build_args: |
GOLANG_VERSION=${{ needs.get-go-version.outputs.go-version }}

build-docker-ubi-redhat-registry:
name: Docker ${{ matrix.arch }} ${{ matrix.fips }} UBI build for RedHat Registry
needs: [get-product-version, build]
needs: [get-product-version, get-go-version, build]
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -357,7 +361,7 @@ jobs:
cp LICENSE ./control-plane
- name: Docker Build (Action)
if: ${{ !matrix.fips }}
uses: hashicorp/actions-docker-build@v1
uses: hashicorp/actions-docker-build@76d2fc91532d816ca2660d8f3139e432ac3700fd
with:
smoke_test: |
TEST_VERSION="$(docker run "${IMAGE_NAME}" consul-k8s-control-plane version | awk '{print $2}')"
Expand All @@ -373,9 +377,12 @@ jobs:
bin_name: consul-k8s-control-plane
workdir: control-plane
redhat_tag: quay.io/redhat-isv-containers/611ca2f89a9b407267837100:${{env.version}}-ubi
extra_build_args: |
GOLANG_VERSION=${{ needs.get-go-version.outputs.go-version }}

- name: Docker FIPS Build (Action)
if: ${{ matrix.fips }}
uses: hashicorp/actions-docker-build@v1
uses: hashicorp/actions-docker-build@76d2fc91532d816ca2660d8f3139e432ac3700fd
with:
smoke_test: |
TEST_VERSION="$(docker run "${IMAGE_NAME}" consul-k8s-control-plane version | awk '{print $2}')"
Expand All @@ -391,10 +398,12 @@ jobs:
bin_name: consul-k8s-control-plane
workdir: control-plane
redhat_tag: quay.io/redhat-isv-containers/6486b1beabfc4e51588c0416:${{env.version}}-ubi # this is different than the non-FIPS one
extra_build_args: |
GOLANG_VERSION=${{ needs.get-go-version.outputs.go-version }}

build-docker-ubi-dockerhub:
name: Docker ${{ matrix.arch }} ${{ matrix.fips }} UBI build for DockerHub
needs: [ get-product-version, build ]
needs: [ get-product-version, get-go-version, build ]
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -428,8 +437,8 @@ jobs:
echo "minor_dev_tag=$(echo ${{ env.version }}| sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+(-[0-9a-zA-Z\+\.]+)?$/\1\2/')" >> $GITHUB_ENV

- name: Docker Build (Action)
uses: hashicorp/actions-docker-build@v1
if: ${{ !matrix.fips }}
uses: hashicorp/actions-docker-build@76d2fc91532d816ca2660d8f3139e432ac3700fd
with:
smoke_test: |
TEST_VERSION="$(docker run "${IMAGE_NAME}" consul-k8s-control-plane version | awk '{print $2}')"
Expand All @@ -451,9 +460,11 @@ jobs:
docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.full_dev_tag }}-ubi-${{ github.sha }}
docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.minor_dev_tag }}-ubi
docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.minor_dev_tag }}-ubi-${{ github.sha }}
extra_build_args: |
GOLANG_VERSION=${{ needs.get-go-version.outputs.go-version }}

- name: Docker FIPS Build (Action)
uses: hashicorp/actions-docker-build@v1
uses: hashicorp/actions-docker-build@76d2fc91532d816ca2660d8f3139e432ac3700fd
if: ${{ matrix.fips }}
with:
smoke_test: |
Expand All @@ -476,3 +487,5 @@ jobs:
docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.full_dev_tag }}-ubi-${{ github.sha }}
docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.minor_dev_tag }}-ubi
docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.minor_dev_tag }}-ubi-${{ github.sha }}
extra_build_args: |
GOLANG_VERSION=${{ needs.get-go-version.outputs.go-version }}
2 changes: 1 addition & 1 deletion control-plane/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# go-discover builds the discover binary (which we don't currently publish
# either).
ARG GOLANG_VERSION
FROM golang:${GOLANG_VERSION} as go-discover
FROM golang:${GOLANG_VERSION}-alpine as go-discover
RUN CGO_ENABLED=0 go install github.com/hashicorp/go-discover/cmd/discover@214571b6a5309addf3db7775f4ee8cf4d264fd5f

# dev copies the binary from a local build
Expand Down