Skip to content

Commit

Permalink
add license (MPL) to release artifacts (#498)
Browse files Browse the repository at this point in the history
* LICENSE.txt in .zip file
* /usr/share/doc/nomad-pack/LICENSE.txt
  * in linux package
  * in docker image
* docker image label
  • Loading branch information
gulducat authored Apr 22, 2024
1 parent 83e9e01 commit 2dde414
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ jobs:
with:
name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
path: ${{ 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
uses: hashicorp/actions-packaging-linux@v1
with:
Expand All @@ -116,6 +122,7 @@ jobs:
binary: pkg/${{ matrix.goos }}_${{ matrix.goarch }}/${{ env.PKG_NAME }}
deb_depends: "openssl,git"
rpm_depends: "openssl,git"
config_dir: ".release/linux/package/"
- name: Set Package Names
if: ${{ !env.ACT }}
run: |
Expand Down
19 changes: 16 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,22 @@ ARG PRODUCT_REVISION
# TARGETARCH and TARGETOS are set automatically when --platform is provided.
ARG TARGETOS TARGETARCH

LABEL maintainer="Nomad Team <nomad@hashicorp.com>"
LABEL version=${PRODUCT_VERSION}
LABEL revision=${PRODUCT_REVISION}
LABEL maintainer="Nomad Team <nomad@hashicorp.com>" \
version=${PRODUCT_VERSION} \
revision=${PRODUCT_REVISION} \
org.opencontainers.image.title="nomad-pack" \
org.opencontainers.image.description="Nomad Pack is a templating and packaging tool used with HashiCorp Nomad" \
org.opencontainers.image.authors="Nomad Team <nomad@hashicorp.com>" \
org.opencontainers.image.url="https://github.com/hashicorp/nomad-pack" \
org.opencontainers.image.documentation="https://github.com/hashicorp/nomad-pack/tree/main/docs" \
org.opencontainers.image.source="https://github.com/hashicorp/nomad-pack" \
org.opencontainers.image.version=${PRODUCT_VERSION} \
org.opencontainers.image.revision=${PRODUCT_REVISION} \
org.opencontainers.image.vendor="HashiCorp" \
org.opencontainers.image.licenses="MPL-2.0"

RUN mkdir -p /usr/share/doc/nomad-pack
COPY LICENSE /usr/share/doc/nomad-pack/LICENSE.txt

RUN apk add --no-cache git libc6-compat

Expand Down
1 change: 1 addition & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ pkg/%/nomad-pack: ## Build Nomad Pack for GOOS_GOARCH, e.g. pkg/linux_amd64/noma
.PRECIOUS: pkg/%/nomad-pack
pkg/%.zip: pkg/%/nomad-pack ## Build and zip Nomad Pack for GOOS_GOARCH, e.g. pkg/linux_amd64.zip
@echo "==> Packaging for $@..."
@cp LICENSE $(dir $<)LICENSE.txt
zip -j $@ $(dir $<)*

mtlsCerts = fixtures/mtls/global-client-nomad-0-key.pem fixtures/mtls/global-client-nomad-0.pem fixtures/mtls/global-server-nomad-0-key.pem fixtures/mtls/global-server-nomad-0.pem fixtures/mtls/nomad-agent-ca-key.pem fixtures/mtls/nomad-agent-ca.pem
Expand Down

0 comments on commit 2dde414

Please sign in to comment.