feat(docker): add terraform

This commit is contained in:
fiftin 2024-06-14 16:40:12 +05:00
parent 89bd28e9ff
commit 40b8f659a7
No known key found for this signature in database
GPG Key ID: 044381366A5D4731
3 changed files with 13 additions and 11 deletions

View File

@ -25,17 +25,17 @@ RUN --mount=type=cache,target=/go/pkg \
ENV OPENTOFU_VERSION="1.7.0"
#ENV TERRAFORM_VERSION="1.8.2"
ENV TERRAFORM_VERSION="1.8.2"
#ENV PULUMI_VERSION="3.116.1"
RUN wget https://github.com/opentofu/opentofu/releases/download/v${OPENTOFU_VERSION}/tofu_${OPENTOFU_VERSION}_linux_${TARGETARCH}.tar.gz && \
tar xf tofu_${OPENTOFU_VERSION}_linux_${TARGETARCH}.tar.gz -C /tmp && \
rm tofu_${OPENTOFU_VERSION}_linux_${TARGETARCH}.tar.gz
#RUN curl -O https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip && \
# unzip terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip -d /tmp && \
# rm terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip
#
RUN curl -O https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip && \
unzip terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip -d /tmp && \
rm terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip
#RUN if [ "$TARGETARCH" = "amd64" ]; then \
# export PULUMI_ARCH="x64"; \
# else \
@ -67,6 +67,7 @@ COPY --chown=1001:0 ./deployment/docker/runner/ansible.cfg /tmp/semaphore/ansibl
COPY --from=builder /go/src/semaphore/deployment/docker/runner/runner-wrapper /usr/local/bin/
COPY --from=builder /go/src/semaphore/bin/semaphore /usr/local/bin/
COPY --from=builder /tmp/tofu /usr/local/bin/
COPY --from=builder /tmp/terraform /usr/local/bin/
RUN chown -R semaphore:0 /usr/local/bin/runner-wrapper && \
chmod +x /usr/local/bin/runner-wrapper && \

View File

@ -25,17 +25,17 @@ RUN --mount=type=cache,target=/go/pkg \
ENV OPENTOFU_VERSION="1.7.0"
#ENV TERRAFORM_VERSION="1.8.2"
ENV TERRAFORM_VERSION="1.8.2"
#ENV PULUMI_VERSION="3.116.1"
RUN wget https://github.com/opentofu/opentofu/releases/download/v${OPENTOFU_VERSION}/tofu_${OPENTOFU_VERSION}_linux_${TARGETARCH}.tar.gz && \
tar xf tofu_${OPENTOFU_VERSION}_linux_${TARGETARCH}.tar.gz -C /tmp && \
rm tofu_${OPENTOFU_VERSION}_linux_${TARGETARCH}.tar.gz
#RUN curl -O https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip && \
# unzip terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip -d /tmp && \
# rm terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip
#
RUN curl -O https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip && \
unzip terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip -d /tmp && \
rm terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip
#RUN if [ "$TARGETARCH" = "amd64" ]; then \
# export PULUMI_ARCH="x64"; \
# else \
@ -70,6 +70,7 @@ COPY --chown=1001:0 ./deployment/docker/server/ansible.cfg /tmp/semaphore/ansibl
COPY --from=builder /go/src/semaphore/deployment/docker/server/server-wrapper /usr/local/bin/
COPY --from=builder /go/src/semaphore/bin/semaphore /usr/local/bin/
COPY --from=builder /tmp/tofu /usr/local/bin/
COPY --from=builder /tmp/terraform /usr/local/bin/
RUN chown -R semaphore:0 /usr/local/bin/server-wrapper && \
chmod +x /usr/local/bin/server-wrapper && \

View File

@ -300,7 +300,7 @@ export default {
viewTab: null,
templateApps: [
'', // Ansible
// 'terraform',
'terraform',
'tofu',
'bash',
// 'pulumi',