diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4654290943..cc33090d08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -153,12 +153,12 @@ jobs: ${{ matrix.env }} go build -o dist/${{ matrix.bin_name }} -ldflags "${GOLDFLAGS}" -tags=${{ matrix.gotags }} . zip -r -j out/${{ matrix.pkg_name }}_${{ needs.get-product-version.outputs.product-version }}${{ matrix.fips }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip dist/ - - name: Upload built binaries + - name: Upload built binaries uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 with: name: ${{ matrix.pkg_name }}_${{ needs.get-product-version.outputs.product-version }}${{ matrix.fips }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip path: ${{ matrix.component}}/out/${{ matrix.pkg_name }}_${{ needs.get-product-version.outputs.product-version }}${{ matrix.fips }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip - + - name: Package rpm and deb files if: matrix.goos == 'linux' && matrix.component == 'cli' && matrix.skip_packaging != 'true' uses: hashicorp/actions-packaging-linux@v1 @@ -227,7 +227,7 @@ jobs: fi echo "Test PASSED, expected: ${VERSION}, got: ${CONSUL_K8S_VERSION}" - - name: Upload debian packages + - name: Upload debian packages uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 if: matrix.goos == 'linux' && matrix.component == 'cli' && matrix.skip_packaging != 'true' with: @@ -268,7 +268,7 @@ jobs: run: | echo "full_dev_tag=${{ env.version }}" echo "full_dev_tag=${{ env.version }}" >> $GITHUB_ENV - echo "minor_dev_tag=$(echo ${{ env.version }}| sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+(-[0-9a-zA-Z\+\.]+)?$/\1\2/')" + echo "minor_dev_tag=$(echo ${{ env.version }}| sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+(-[0-9a-zA-Z\+\.]+)?$/\1\2/')" 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) @@ -286,7 +286,7 @@ jobs: target: release-default arch: ${{ matrix.goarch }} pkg_name: consul-k8s-control-plane_${{ env.version }} - bin_name: consul-k8s-control-plane + bin_name: consul-k8s-control-plane workdir: control-plane tags: | docker.io/hashicorp/${{ env.repo }}-control-plane:${{ env.version }} @@ -360,12 +360,12 @@ jobs: run: | echo "full_dev_tag=${{ env.version }}" echo "full_dev_tag=${{ env.version }}" >> $GITHUB_ENV - echo "minor_dev_tag=$(echo ${{ env.version }}| sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+(-[0-9a-zA-Z\+\.]+)?$/\1\2/')" + echo "minor_dev_tag=$(echo ${{ env.version }}| sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+(-[0-9a-zA-Z\+\.]+)?$/\1\2/')" 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@76d2fc91532d816ca2660d8f3139e432ac3700fd 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}')" @@ -382,6 +382,7 @@ jobs: workdir: control-plane tags: | docker.io/hashicorp/${{ env.repo }}-control-plane:${{ env.version }}-ubi + public.ecr.aws/hashicorp/${{ env.repo }}-control-plane:${{ env.version }}-ubi dev_tags: | docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.full_dev_tag }}-ubi docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.full_dev_tag }}-ubi-${{ github.sha }} @@ -407,6 +408,14 @@ jobs: pkg_name: consul-k8s-control-plane_${{ env.version }} bin_name: consul-k8s-control-plane workdir: control-plane + tags: | + public.ecr.aws/hashicorp/${{ env.repo }}-control-plane-fips:${{ env.version }}-ubi + docker.io/hashicorp/${{ env.repo }}-control-plane-fips:${{ env.version }}-ubi + 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 }} - redhat_tag: quay.io/redhat-isv-containers/6486b1beabfc4e51588c0416:${{env.version}}-ubi # this is different than the non-FIPS one + dev_tags: | + docker.io/hashicorppreview/${{ env.repo }}-control-plane-fips:${{ env.full_dev_tag }}-ubi + docker.io/hashicorppreview/${{ env.repo }}-control-plane-fips:${{ env.full_dev_tag }}-ubi-${{ github.sha }} + docker.io/hashicorppreview/${{ env.repo }}-control-plane-fips:${{ env.minor_dev_tag }}-ubi + docker.io/hashicorppreview/${{ env.repo }}-control-plane-fips:${{ env.minor_dev_tag }}-ubi-${{ github.sha }}