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

CI: Make docker builds fast again #756

Merged
merged 12 commits into from
Oct 13, 2020
Merged

Conversation

rinx
Copy link
Contributor

@rinx rinx commented Oct 6, 2020

Description:

To make builds fast, this PR includes these changes.

  • remove build dependency between vald-base and vald-xxx images
    • remove dependency in Makefile.d/docker.mk
    • add golang stage in each image
    • add GO_VERSION build arg in each image
  • remove caches for vald-base in workflows

Also, this PR includes README updates & CHANGELOG template updates

Related Issue:

merge this PR after #752 is merged

How Has This Been Tested?:

Nothing

Environment:

  • Go Version: 1.15.2
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.12.1

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>

:whale: :tag: revise golang image tag

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Oct 6, 2020

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
@rinx rinx force-pushed the ci/docker/make-builds-faster-again branch from 021f660 to e4d2177 Compare October 6, 2020 09:28
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

LanguageTool

hack/CHANGELOG.template.md|63 col 60| Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|63 col 69| Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|69 col 51| Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|69 col 60| Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|70 col 64| Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|70 col 73| Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|76 col 50| Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|76 col 59| Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|77 col 63| Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|77 col 72| Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|83 col 50| Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|83 col 59| Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|84 col 63| Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY
hack/CHANGELOG.template.md|84 col 72| Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<tr>
<td>Agent NGT</td>
<td>
<code>docker pull vdaas/vald-agent-ngt:{{ version }}</code><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<tr>
<td>Agent NGT</td>
<td>
<code>docker pull vdaas/vald-agent-ngt:{{ version }}</code><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<td>Agent NGT</td>
<td>
<code>docker pull vdaas/vald-agent-ngt:{{ version }}</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-agent-ngt:{{ version }}</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<td>Agent NGT</td>
<td>
<code>docker pull vdaas/vald-agent-ngt:{{ version }}</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-agent-ngt:{{ version }}</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<tr>
<td>Agent sidecar</td>
<td>
<code>docker pull vdaas/vald-agent-sidecar:{{ version }}</code><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<tr>
<td>Compressor</td>
<td>
<code>docker pull vdaas/vald-manager-compressor:{{ version }}</code><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<td>Compressor</td>
<td>
<code>docker pull vdaas/vald-manager-compressor:{{ version }}</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-manager-compressor:{{ version }}</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<td>Compressor</td>
<td>
<code>docker pull vdaas/vald-manager-compressor:{{ version }}</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-manager-compressor:{{ version }}</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<tr>
<td>Meta Redis</td>
<td>
<code>docker pull vdaas/vald-meta-redis:{{ version }}</code><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<tr>
<td>Meta Redis</td>
<td>
<code>docker pull vdaas/vald-meta-redis:{{ version }}</code><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
<td>Meta Redis</td>
<td>
<code>docker pull vdaas/vald-meta-redis:{{ version }}</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-meta-redis:{{ version }}</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<td>Meta Redis</td>
<td>
<code>docker pull vdaas/vald-meta-redis:{{ version }}</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-meta-redis:{{ version }}</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<tr>
<td>Meta Cassandra</td>
<td>
<code>docker pull vdaas/vald-meta-cassandra:{{ version }}</code><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<tr>
<td>Meta Cassandra</td>
<td>
<code>docker pull vdaas/vald-meta-cassandra:{{ version }}</code><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<td>Meta Cassandra</td>
<td>
<code>docker pull vdaas/vald-meta-cassandra:{{ version }}</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-meta-cassandra:{{ version }}</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<td>Index Manager</td>
<td>
<code>docker pull vdaas/vald-manager-index:{{ version }}</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-manager-index:{{ version }}</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<tr>
<td>Helm Operator</td>
<td>
<code>docker pull vdaas/vald-helm-operator:{{ version }}</code><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<tr>
<td>Helm Operator</td>
<td>
<code>docker pull vdaas/vald-helm-operator:{{ version }}</code><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<td>Helm Operator</td>
<td>
<code>docker pull vdaas/vald-helm-operator:{{ version }}</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-helm-operator:{{ version }}</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space after the opening parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: {
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

<td>Helm Operator</td>
<td>
<code>docker pull vdaas/vald-helm-operator:{{ version }}</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-helm-operator:{{ version }}</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
Don't put a space before the closing parenthesis (COMMA_PARENTHESIS_WHITESPACE)
Suggestions: }
Rule: https://community.languagetool.org/rule/show/COMMA_PARENTHESIS_WHITESPACE?lang=en-US
Category: TYPOGRAPHY

@rinx rinx requested a review from kpango October 7, 2020 05:13
@rinx rinx marked this pull request as ready for review October 8, 2020 00:18
ARG BASE_TAG=latest
ARG DISTROLESS_IMAGE=gcr.io/distroless/static
ARG DISTROLESS_IMAGE_TAG=nonroot
ARG UPX_OPTIONS=-9

FROM golang:${GO_VERSION} AS golang

FROM vdaas/vald-base:${BASE_TAG} AS builder
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need copy GOROOT from golang image?
I think vald-base already have GOROOT/{bin,src,misc,pkg}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly we need it.

Considering a PR that updates versions/GO_VERSION file, it triggers builds of Docker images.
because GitHub Actions doesn't support dependencies between workflows, we must build vdaas/vald-base and others independently. Then, if agent/core/ngt/Dockerfile does'nt have copying stage of GOROOT, vdaas/vald-agent-ngt built using the former version of Go binaries.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thank you for describe it.
LGTM
/format
/rebase
/approve

@kpango
Copy link
Collaborator

kpango commented Oct 13, 2020

/format
/rebase
/approve

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by kpango for branch: ci/docker/make-builds-faster-again

@vdaas-ci
Copy link
Collaborator

[REBASE] Failed to rebase.

@kpango
Copy link
Collaborator

kpango commented Oct 13, 2020

/format
/approve

@vdaas-ci
Copy link
Collaborator

[FORMAT] Updating license headers and formatting go codes triggered by kpango.

Copy link
Collaborator

@vdaas-ci vdaas-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[APPROVED] This PR is approved by kpango.

@kpango kpango merged commit c81622e into master Oct 13, 2020
@kpango kpango deleted the ci/docker/make-builds-faster-again branch October 13, 2020 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants