Skip to content

Commit

Permalink
Add dependencies license for release binary (#610)
Browse files Browse the repository at this point in the history
The files that in the `docs/release` will be pack into binary release
zip.

- [x] put all the dependency licenses into `docs/release/licenses`.
- [x] add LICENSE for release binary. (We need to check this format
whether meet the requirements or not.)
- [x] add NOTICE for release binary.

---------

Co-authored-by: tison <[email protected]>
Co-authored-by: shuai <[email protected]>
  • Loading branch information
3 people authored Nov 15, 2023
1 parent fa3255a commit a72ebc5
Show file tree
Hide file tree
Showing 81 changed files with 3,206 additions and 201 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

name: "Goreleaser"
name: Build Binary For Release

on:
push:
Expand All @@ -26,7 +26,7 @@ permissions:

jobs:
build-goreleaser:
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest

steps:
- name: Checkout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

name: Build DockerHub Image
name: Build Docker Image For Release

on:
push:
Expand All @@ -29,7 +29,7 @@ on:

jobs:
build:
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -38,7 +38,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: answerdev/answer
images: apache/answer
tags: |
type=raw,value=latest
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,15 @@
# specific language governing permissions and limitations
# under the License.

name: Manual Build DockerHub Image
name: Build Docker Image For Test

on:
workflow_dispatch:
inputs:
tag_name:
type: string
required: true
description: 'DockerHub img tag name'
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
tags:
description: 'Test scenario tags'
required: false
type: boolean


push:
branches: [ "test" ]

jobs:
build:
name: Build and Push
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -51,10 +33,9 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: answerdev/answer
images: apache/answer
tags: |
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
type=semver,pattern={{version}}
type=raw,value=test
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -72,10 +53,8 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
file: ./Dockerfile
tags: answerdev/answer:${{ inputs.tag_name }}
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


79 changes: 0 additions & 79 deletions .github/workflows/build_dev_img.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/build_test.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check license header
uses: korandoru/hawkeye@v3
15 changes: 10 additions & 5 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,16 @@ builds:

archives:
- name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
apache-answer-{{ .Version }}-incubating-{{ .Os }}-{{ .Arch }}
files:
- src: "docs/release/LICENSE"
dst: LICENSE
- src: "docs/release/NOTICE"
dst: NOTICE
- src: "docs/release/licenses/*"
dst: licenses/
- src: "DISCLAIMER"
dst: DISCLAIMER
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
19 changes: 18 additions & 1 deletion charts/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
{{/*
Expand the name of the chart.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/}}
{{- define "answer.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
Expand Down
Loading

0 comments on commit a72ebc5

Please sign in to comment.