|
|
|
@ -30,12 +30,12 @@ jobs:
|
|
|
|
|
pre-version: ${{ steps.set-product-version.outputs.prerelease-product-version }} |
|
|
|
|
shared-ldflags: ${{ steps.shared-ldflags.outputs.shared-ldflags }} |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
|
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
|
|
|
|
# action-set-product-version implicitly sets fields like 'product-version' using version/VERSION |
|
|
|
|
# https://github.com/hashicorp/actions-set-product-version |
|
|
|
|
- name: set product version |
|
|
|
|
id: set-product-version |
|
|
|
|
uses: hashicorp/actions-set-product-version@v1 |
|
|
|
|
uses: hashicorp/actions-set-product-version@v2 |
|
|
|
|
- name: get product version |
|
|
|
|
id: get-product-version |
|
|
|
|
run: | |
|
|
|
@ -70,7 +70,7 @@ jobs:
|
|
|
|
|
filepath: ${{ steps.generate-metadata-file.outputs.filepath }} |
|
|
|
|
steps: |
|
|
|
|
- name: 'Checkout directory' |
|
|
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
|
|
|
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
|
|
|
|
- name: Generate metadata file |
|
|
|
|
id: generate-metadata-file |
|
|
|
|
uses: hashicorp/actions-generate-metadata@v1 |
|
|
|
@ -78,7 +78,7 @@ jobs:
|
|
|
|
|
version: ${{ needs.set-product-version.outputs.product-version }} |
|
|
|
|
product: ${{ env.PKG_NAME }} |
|
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 |
|
|
|
|
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 |
|
|
|
|
with: |
|
|
|
|
name: metadata.json |
|
|
|
|
path: ${{ steps.generate-metadata-file.outputs.filepath }} |
|
|
|
@ -104,10 +104,10 @@ jobs:
|
|
|
|
|
|
|
|
|
|
name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
|
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
|
|
|
|
|
|
|
|
|
- name: Setup with node and yarn |
|
|
|
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 |
|
|
|
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 |
|
|
|
|
with: |
|
|
|
|
node-version: '18' |
|
|
|
|
cache: 'yarn' |
|
|
|
@ -132,7 +132,7 @@ jobs:
|
|
|
|
|
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }} |
|
|
|
|
CGO_ENABLED: "0" |
|
|
|
|
GOLDFLAGS: "${{needs.set-product-version.outputs.shared-ldflags}}" |
|
|
|
|
uses: hashicorp/actions-go-build@v0.1.7 |
|
|
|
|
uses: hashicorp/actions-go-build@v1 |
|
|
|
|
with: |
|
|
|
|
product_name: ${{ env.PKG_NAME }} |
|
|
|
|
product_version: ${{ needs.set-product-version.outputs.product-version }} |
|
|
|
@ -178,13 +178,13 @@ jobs:
|
|
|
|
|
echo "RPM_PACKAGE=$(basename out/*.rpm)" >> $GITHUB_ENV |
|
|
|
|
echo "DEB_PACKAGE=$(basename out/*.deb)" >> $GITHUB_ENV |
|
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 |
|
|
|
|
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 |
|
|
|
|
if: ${{ matrix.goos == 'linux' }} |
|
|
|
|
with: |
|
|
|
|
name: ${{ env.RPM_PACKAGE }} |
|
|
|
|
path: out/${{ env.RPM_PACKAGE }} |
|
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 |
|
|
|
|
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 |
|
|
|
|
if: ${{ matrix.goos == 'linux' }} |
|
|
|
|
with: |
|
|
|
|
name: ${{ env.DEB_PACKAGE }} |
|
|
|
@ -204,10 +204,10 @@ jobs:
|
|
|
|
|
|
|
|
|
|
name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
|
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
|
|
|
|
|
|
|
|
|
- name: Setup with node and yarn |
|
|
|
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 |
|
|
|
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 |
|
|
|
|
with: |
|
|
|
|
node-version: '18' |
|
|
|
|
cache: 'yarn' |
|
|
|
@ -232,7 +232,7 @@ jobs:
|
|
|
|
|
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }} |
|
|
|
|
CGO_ENABLED: "0" |
|
|
|
|
GOLDFLAGS: "${{needs.set-product-version.outputs.shared-ldflags}}" |
|
|
|
|
uses: hashicorp/actions-go-build@v0.1.7 |
|
|
|
|
uses: hashicorp/actions-go-build@v1 |
|
|
|
|
with: |
|
|
|
|
product_name: ${{ env.PKG_NAME }} |
|
|
|
|
product_version: ${{ needs.set-product-version.outputs.product-version }} |
|
|
|
@ -257,10 +257,10 @@ jobs:
|
|
|
|
|
|
|
|
|
|
name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
|
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
|
|
|
|
|
|
|
|
|
- name: Setup with node and yarn |
|
|
|
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 |
|
|
|
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 |
|
|
|
|
with: |
|
|
|
|
node-version: '18' |
|
|
|
|
cache: 'yarn' |
|
|
|
@ -283,7 +283,7 @@ jobs:
|
|
|
|
|
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }} |
|
|
|
|
CGO_ENABLED: "0" |
|
|
|
|
GOLDFLAGS: "${{needs.set-product-version.outputs.shared-ldflags}}" |
|
|
|
|
uses: hashicorp/actions-go-build@v0.1.7 |
|
|
|
|
uses: hashicorp/actions-go-build@v1 |
|
|
|
|
with: |
|
|
|
|
product_name: ${{ env.PKG_NAME }} |
|
|
|
|
product_version: ${{ needs.set-product-version.outputs.product-version }} |
|
|
|
@ -313,7 +313,7 @@ jobs:
|
|
|
|
|
version: ${{needs.set-product-version.outputs.product-version}} |
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
|
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
|
|
|
|
|
|
|
|
|
# Strip everything but MAJOR.MINOR from the version string and add a `-dev` suffix |
|
|
|
|
# This naming convention will be used ONLY for per-commit dev images |
|
|
|
@ -325,7 +325,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@v2 |
|
|
|
|
with: |
|
|
|
|
version: ${{env.version}} |
|
|
|
|
target: default |
|
|
|
@ -351,7 +351,7 @@ jobs:
|
|
|
|
|
version: ${{needs.set-product-version.outputs.product-version}} |
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
|
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
|
|
|
|
|
|
|
|
|
# Strip everything but MAJOR.MINOR from the version string and add a `-dev` suffix |
|
|
|
|
# This naming convention will be used ONLY for per-commit dev images |
|
|
|
@ -362,7 +362,7 @@ jobs:
|
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
- uses: hashicorp/actions-docker-build@v1 |
|
|
|
|
- uses: hashicorp/actions-docker-build@v2 |
|
|
|
|
with: |
|
|
|
|
version: ${{env.version}} |
|
|
|
|
target: ubi |
|
|
|
@ -397,17 +397,17 @@ jobs:
|
|
|
|
|
|
|
|
|
|
name: Verify ${{ matrix.arch }} linux binary |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
|
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
|
|
|
|
if: ${{ endsWith(github.repository, '-enterprise') || matrix.arch != 's390x' }} |
|
|
|
|
|
|
|
|
|
- name: Download ${{ matrix.arch }} zip |
|
|
|
|
if: ${{ endsWith(github.repository, '-enterprise') || matrix.arch != 's390x' }} |
|
|
|
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 |
|
|
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 |
|
|
|
|
with: |
|
|
|
|
name: ${{ env.zip_name }} |
|
|
|
|
|
|
|
|
|
- name: Set up QEMU |
|
|
|
|
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 |
|
|
|
|
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 |
|
|
|
|
if: ${{ matrix.arch == 'arm' || matrix.arch == 'arm64' }} |
|
|
|
|
with: |
|
|
|
|
# this should be a comma-separated string as opposed to an array |
|
|
|
@ -430,10 +430,10 @@ jobs:
|
|
|
|
|
|
|
|
|
|
name: Verify amd64 darwin binary |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
|
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
|
|
|
|
|
|
|
|
|
- name: Download amd64 darwin zip |
|
|
|
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 |
|
|
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 |
|
|
|
|
with: |
|
|
|
|
name: ${{ env.zip_name }} |
|
|
|
|
|
|
|
|
@ -461,7 +461,7 @@ jobs:
|
|
|
|
|
|
|
|
|
|
name: Verify ${{ matrix.arch }} debian package |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
|
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
|
|
|
|
|
|
|
|
|
- name: Set package version |
|
|
|
|
run: | |
|
|
|
@ -472,12 +472,12 @@ jobs:
|
|
|
|
|
echo "pkg_name=consul_${{ env.pkg_version }}-1_${{ matrix.arch }}.deb" >> $GITHUB_ENV |
|
|
|
|
|
|
|
|
|
- name: Download workflow artifacts |
|
|
|
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 |
|
|
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 |
|
|
|
|
with: |
|
|
|
|
name: ${{ env.pkg_name }} |
|
|
|
|
|
|
|
|
|
- name: Set up QEMU |
|
|
|
|
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 |
|
|
|
|
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 |
|
|
|
|
with: |
|
|
|
|
platforms: all |
|
|
|
|
|
|
|
|
@ -502,7 +502,7 @@ jobs:
|
|
|
|
|
|
|
|
|
|
name: Verify ${{ matrix.arch }} rpm |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
|
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
|
|
|
|
|
|
|
|
|
- name: Set package version |
|
|
|
|
run: | |
|
|
|
@ -513,12 +513,12 @@ jobs:
|
|
|
|
|
echo "pkg_name=consul-${{ env.pkg_version }}-1.${{ matrix.arch }}.rpm" >> $GITHUB_ENV |
|
|
|
|
|
|
|
|
|
- name: Download workflow artifacts |
|
|
|
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 |
|
|
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 |
|
|
|
|
with: |
|
|
|
|
name: ${{ env.pkg_name }} |
|
|
|
|
|
|
|
|
|
- name: Set up QEMU |
|
|
|
|
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 |
|
|
|
|
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 |
|
|
|
|
with: |
|
|
|
|
platforms: all |
|
|
|
|
|
|
|
|
|