Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add license file #1090

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
LD_FLAGS: ${{ needs.set-ld-flags.outputs.ldflags }}
run: |
mkdir dist out
cp LICENSE dist/LICENSE.txt
go build -o dist/ \
-ldflags "${{ env.LD_FLAGS }}" \
-tags "${{ env.GO_TAGS }}"
Expand All @@ -107,6 +108,13 @@ jobs:
name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
path: out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip

- name: Copy license file
env:
LICENSE_DIR: ".release/linux/package/usr/share/doc/${{ env.PKG_NAME }}"
run: |
mkdir -p "$LICENSE_DIR"
cp LICENSE "$LICENSE_DIR/LICENSE.txt"

- name: Package
if: ${{ matrix.goos == 'linux' }}
uses: hashicorp/actions-packaging-linux@v1
Expand All @@ -121,6 +129,7 @@ jobs:
binary: "dist/${{ env.PKG_NAME }}"
deb_depends: "openssl"
rpm_depends: "openssl"
config_dir: ".release/linux/package"

- name: Set Package Names
if: ${{ matrix.goos == 'linux' }}
Expand Down Expand Up @@ -169,6 +178,7 @@ jobs:
GO_TAGS: "${{ env.GO_TAGS }} netcgo"
run: |
mkdir dist out
cp LICENSE dist/LICENSE.txt
go build -o dist/ \
-ldflags "${{ env.LD_FLAGS }}" \
-tags "${{ env.GO_TAGS }}"
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ ARG PRODUCT_VERSION

LABEL maintainer="Consul Team <[email protected]>"
LABEL version=$PRODUCT_VERSION
LABEL licenses="MPL-2.0"

# Set ARGs as ENV so that they can be used in ENTRYPOINT/CMD
ENV NAME=$NAME
ENV VERSION=$PRODUCT_VERSION
ENV PRODUCT_NAME=$NAME

# TARGETARCH and TARGETOS are set automatically when --platform is provided.
ARG TARGETOS TARGETARCH
Expand All @@ -24,6 +26,7 @@ RUN apk add --no-cache dumb-init git bash openssh
RUN addgroup ${NAME} && adduser -S -G ${NAME} ${NAME}

COPY dist/$TARGETOS/$TARGETARCH/consul-terraform-sync /bin/consul-terraform-sync
COPY LICENSE /usr/share/doc/$PRODUCT_NAME/LICENSE.txt

### Added for CTS
RUN mkdir -p /consul-terraform-sync/config \
Expand Down
Loading