mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
5c8ff928ba
#15596 set things up with the intent that the docker image build process would be handled by the automated build system on dockerhub, but after merging we found that it's impossible to change the source git repository for an existing dockerhub repository. To get away from the limitations of dockerhub, we intend to eventually automate these builds in a separate CI system. Here we add some scripts that would drive such an automated process. It's split into multiple steps to allow for situations where the new version should not be tagged as the latest, and to make it easier and safer to test the build script while doing development on it. Since this automated process doesn't yet exist, a wrapper script release.sh is included to help run a local, manual build and deploy process in the mean time. The README.md in the docker-release dir here contains details on the intended usage.
21 lines
570 B
Bash
Executable File
21 lines
570 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# This script pushes the docker images for the given version of Terraform,
|
|
# along with the "light", "full" and "latest" tags, up to docker hub.
|
|
#
|
|
# You must already be logged in to docker using "docker login" before running
|
|
# this script.
|
|
|
|
set -eu
|
|
|
|
VERSION="$1"
|
|
VERSION_SLUG="${VERSION#v}"
|
|
|
|
echo "-- Pushing tags $VERSION_SLUG, light, full and latest up to dockerhub --"
|
|
echo ""
|
|
|
|
docker push "hashicorp/terraform:$VERSION_SLUG"
|
|
docker push "hashicorp/terraform:light"
|
|
docker push "hashicorp/terraform:full"
|
|
docker push "hashicorp/terraform:latest"
|