From df2de087ecb598df223af6e091e0222a0620ee54 Mon Sep 17 00:00:00 2001 From: Michele Degges Date: Tue, 21 Jun 2022 16:32:27 -0700 Subject: [PATCH 1/2] Dev tags --- .github/workflows/build.yml | 13 +++++++++++-- .release/ci.hcl | 1 + version/version.go | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4c38efc3d24..e1ca42af1f36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,7 @@ on: branches: # Push events on the main branch - main + - dev-tags-main env: PKG_NAME: consul @@ -232,6 +233,14 @@ jobs: steps: - uses: actions/checkout@v2 + + # 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 + - name: Set docker dev tag + run: | + version="${{ env.version }}" + echo "dev_tag=${version%.*}-dev" >> $GITHUB_ENV + - name: Docker Build (Action) uses: hashicorp/actions-docker-build@v1 with: @@ -242,8 +251,8 @@ jobs: docker.io/hashicorp/${{env.repo}}:${{env.version}} public.ecr.aws/hashicorp/${{env.repo}}:${{env.version}} dev_tags: | - docker.io/hashicorppreview/${{ env.repo }}:${{ env.version }} - docker.io/hashicorppreview/${{ env.repo }}:${{ env.version }}-${{ github.sha }} + docker.io/hashicorppreview/${{ env.repo }}:${{ env.dev_tag }} + docker.io/hashicorppreview/${{ env.repo }}:${{ env.dev_tag }}-${{ github.sha }} smoke_test: .github/scripts/verify_docker.sh v${{ env.version }} build-docker-redhat: diff --git a/.release/ci.hcl b/.release/ci.hcl index e422a9ce292b..61d5dc4b068b 100644 --- a/.release/ci.hcl +++ b/.release/ci.hcl @@ -15,6 +15,7 @@ project "consul" { "release/1.10.x", "release/1.11.x", "release/1.12.x", + "dev-tags-main" ] } } diff --git a/version/version.go b/version/version.go index 8930b48224fe..edcdca85b34a 100644 --- a/version/version.go +++ b/version/version.go @@ -10,7 +10,7 @@ var ( // compiler. GitCommit string - // The main version number that is being run at the moment. + // The next version number that will be released. This will be updated after every release. // // Version must conform to the format expected by github.com/hashicorp/go-version // for tests to work. From 98f64ca0cddcbcdac8931c490964c81a3bef992b Mon Sep 17 00:00:00 2001 From: Michele Degges Date: Tue, 21 Jun 2022 17:50:01 -0700 Subject: [PATCH 2/2] Remove test trigger --- .github/workflows/build.yml | 1 - .release/ci.hcl | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1ca42af1f36..3a2ec423bfcd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,6 @@ on: branches: # Push events on the main branch - main - - dev-tags-main env: PKG_NAME: consul diff --git a/.release/ci.hcl b/.release/ci.hcl index 61d5dc4b068b..e422a9ce292b 100644 --- a/.release/ci.hcl +++ b/.release/ci.hcl @@ -15,7 +15,6 @@ project "consul" { "release/1.10.x", "release/1.11.x", "release/1.12.x", - "dev-tags-main" ] } }