mirror of
https://github.com/opentofu/opentofu.git
synced 2026-06-08 16:12:24 -04:00
Fix GitHub actions (#5)
* Change PKG_NAME Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix rpm and deb packaging. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix e2e test step. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix e2e test step. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix e2e test step. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix docker build. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix exec tests. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix e2e tests. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix docker build. Signed-off-by: Jakub Martin <kubam@spacelift.io> --------- Signed-off-by: Jakub Martin <kubam@spacelift.io>
This commit is contained in:
parent
ebcf7455eb
commit
5bb46d0f65
5 changed files with 15 additions and 15 deletions
6
.github/scripts/e2e_test_linux_darwin.sh
vendored
6
.github/scripts/e2e_test_linux_darwin.sh
vendored
|
|
@ -8,11 +8,11 @@ if [[ $arch == 'arm' || $arch == 'arm64' ]]
|
|||
then
|
||||
export DIR=$(mktemp -d)
|
||||
unzip -d $DIR "${e2e_cache_path}/terraform-e2etest_${os}_${arch}.zip"
|
||||
unzip -d $DIR "./terraform_${version}_${os}_${arch}.zip"
|
||||
unzip -d $DIR "./opentf_${version}_${os}_${arch}.zip"
|
||||
sudo chmod +x $DIR/e2etest
|
||||
docker run --platform=linux/arm64 -v $DIR:/src -w /src arm64v8/alpine ./e2etest -test.v
|
||||
else
|
||||
unzip "${e2e_cache_path}/terraform-e2etest_${os}_${arch}.zip"
|
||||
unzip "./terraform_${version}_${os}_${arch}.zip"
|
||||
unzip "./opentf_${version}_${os}_${arch}.zip"
|
||||
TF_ACC=1 ./e2etest -test.v
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
4
.github/workflows/build-Dockerfile
vendored
4
.github/workflows/build-Dockerfile
vendored
|
|
@ -36,6 +36,6 @@ RUN apk add --no-cache git openssh
|
|||
# directory before running "docker build", which we'll then copy into the
|
||||
# Docker image to make sure that we use an identical binary as all of the
|
||||
# other official release channels.
|
||||
COPY ["dist/linux/${TARGETARCH}/terraform", "/bin/terraform"]
|
||||
COPY ["dist/linux/${TARGETARCH}/opentf", "/bin/opentf"]
|
||||
|
||||
ENTRYPOINT ["/bin/terraform"]
|
||||
ENTRYPOINT ["/bin/opentf"]
|
||||
|
|
|
|||
2
.github/workflows/build-terraform-oss.yml
vendored
2
.github/workflows/build-terraform-oss.yml
vendored
|
|
@ -79,7 +79,7 @@ jobs:
|
|||
maintainer: "HashiCorp"
|
||||
homepage: "https://terraform.io/"
|
||||
license: "MPL-2.0"
|
||||
binary: "dist/terraform"
|
||||
binary: "dist/opentf"
|
||||
deb_depends: "git"
|
||||
rpm_depends: "git"
|
||||
- if: ${{ inputs.goos == 'linux' }}
|
||||
|
|
|
|||
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
|
|
@ -16,7 +16,7 @@ on:
|
|||
- 'v[0-9]+.[0-9]+.[0-9]+*'
|
||||
|
||||
env:
|
||||
PKG_NAME: "terraform"
|
||||
PKG_NAME: "opentf"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
@ -141,9 +141,9 @@ jobs:
|
|||
- name: Build Docker images
|
||||
uses: hashicorp/actions-docker-build@v1
|
||||
with:
|
||||
pkg_name: "terraform_${{env.version}}"
|
||||
pkg_name: "opentf_${{env.version}}"
|
||||
version: ${{env.version}}
|
||||
bin_name: terraform
|
||||
bin_name: opentf
|
||||
target: default
|
||||
arch: ${{matrix.arch}}
|
||||
dockerfile: .github/workflows/build-Dockerfile
|
||||
|
|
@ -256,13 +256,13 @@ jobs:
|
|||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
||||
id: clipkg
|
||||
with:
|
||||
name: terraform_${{env.version}}_${{ env.os }}_${{ env.arch }}.zip
|
||||
name: opentf_${{env.version}}_${{ env.os }}_${{ env.arch }}.zip
|
||||
path: .
|
||||
- name: Extract packages
|
||||
if: ${{ matrix.goos == 'windows' }}
|
||||
run: |
|
||||
unzip "${{ needs.e2etest-build.outputs.e2e-cache-path }}/terraform-e2etest_${{ env.os }}_${{ env.arch }}.zip"
|
||||
unzip "./terraform_${{env.version}}_${{ env.os }}_${{ env.arch }}.zip"
|
||||
unzip "./opentf_${{env.version}}_${{ env.os }}_${{ env.arch }}.zip"
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
|
||||
if: ${{ contains(matrix.goarch, 'arm') }}
|
||||
|
|
@ -305,7 +305,7 @@ jobs:
|
|||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
||||
id: clipkg
|
||||
with:
|
||||
name: terraform_${{ env.version }}_linux_amd64.zip
|
||||
name: opentf_${{ env.version }}_linux_amd64.zip
|
||||
path: .
|
||||
- name: Checkout terraform-exec repo
|
||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
|
|
@ -315,7 +315,7 @@ jobs:
|
|||
- name: Run terraform-exec end-to-end tests
|
||||
run: |
|
||||
FULL_RELEASE_VERSION="${{ env.version }}"
|
||||
unzip terraform_${FULL_RELEASE_VERSION}_linux_amd64.zip
|
||||
export TFEXEC_E2ETEST_TERRAFORM_PATH="$(pwd)/terraform"
|
||||
unzip opentf_${FULL_RELEASE_VERSION}_linux_amd64.zip
|
||||
export TFEXEC_E2ETEST_TERRAFORM_PATH="$(pwd)/opentf"
|
||||
cd terraform-exec
|
||||
go test -race -timeout=30m -v ./tfexec/internal/e2etest
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ GOEXE="$(go env GOEXE)"
|
|||
OUTDIR="build/${GOOS}_${GOARCH}"
|
||||
OUTFILE="terraform-e2etest_${GOOS}_${GOARCH}.zip"
|
||||
|
||||
LDFLAGS="-X github.com/placeholderplaceholderplaceholder/opentf/internal/command/e2etest.terraformBin=./terraform$GOEXE"
|
||||
LDFLAGS="-X github.com/placeholderplaceholderplaceholder/opentf/internal/command/e2etest.terraformBin=./opentf$GOEXE"
|
||||
# Caller may pass in the environment variable GO_LDFLAGS with additional
|
||||
# flags we'll use when building.
|
||||
if [ -n "${GO_LDFLAGS+set}" ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue