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

Added Label To DockerFile #56

Merged
merged 1 commit into from
Nov 5, 2021
Merged

Conversation

j0nimost
Copy link

@j0nimost j0nimost commented Oct 22, 2021

Description

To allow for easy update of the Build Status I have added a LABEL tag which will infer openfaas/faas

Motivation and Context

  • I have raised an issue to propose this change (required)

How Has This Been Tested?

I did a docker build to test the image build

  • docker build -t ingress-op .
    Inspect out is as shown below
    image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Impact to existing users

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Dockerfile Outdated
@@ -41,6 +41,10 @@ RUN go build -mod=vendor -ldflags "-s -w \

FROM scratch

ARG REPO_URL
Copy link
Member

Choose a reason for hiding this comment

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

What made you make this REPO_URL?

Where is REPO_URL getting populated from?

Copy link
Member

Choose a reason for hiding this comment

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

I guess the other way of asking this question is: have you tested this change? (My hunch is that you haven't, but that is part of the PR template that we ask you to fill out)

Copy link
Author

@j0nimost j0nimost Oct 22, 2021

Choose a reason for hiding this comment

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

I did a local docker build, I'll run as the setup suggests, should all the Labels: this values org.opencontainers.image.source=https://github.com/openfaas/faas ?

  • Applying fix
  • Running local tests

Copy link
Author

Choose a reason for hiding this comment

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

I have applied the change as expected. Does it full fill the requirement?

Copy link
Member

@alexellis alexellis Oct 22, 2021

Choose a reason for hiding this comment

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

It looks good.

REPO_URL could be useful, but we need to make sure it's determined and then injected in via the GitHub Action that publishes the image.

Please update the section "How Has This Been Tested?" with the specific steps you took, even the command lines.

Copy link
Author

@j0nimost j0nimost Oct 23, 2021

Choose a reason for hiding this comment

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

I have added a docker build test and inspection output. Is there a specific way could test this change? any pointers would really help. @alexellis

@derek derek bot added the no-dco label Oct 22, 2021
@derek
Copy link

derek bot commented Oct 22, 2021

Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project.

Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken.

💡 Shall we fix this?

This will only take a few moments.

First, clone your fork and checkout this branch using the git CLI.

Next, set up your real name and email address:

git config --global user.name "Your Full Name"
git config --global user.email "you@domain.com"

Finally, run one of these commands to add the "Signed-off-by" line to your commits.

If you only have one commit so far then run: git commit --amend --signoff and then git push --force.
If you have multiple commits, watch this video.

Check that the message has been added properly by running "git log".

Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

Approved

@alexellis
Copy link
Member

We ended up with two commits (the first attempt, then the second attempt), but only want one for the history in git.

Feel up to trying to squash them down into one?

https://www.youtube.com/watch?v=8j0H6urZ-bU

@j0nimost
Copy link
Author

Rebase Completed

Dockerfile Outdated
@@ -41,6 +41,8 @@ RUN go build -mod=vendor -ldflags "-s -w \

FROM scratch

LABEL org.opencontainers.image.source=https://github.com/openfaas/faas
Copy link
Member

Choose a reason for hiding this comment

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

This is the wrong label. It should match the repository building the code, i.e. this one.

Copy link
Author

Choose a reason for hiding this comment

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

Suggested change
LABEL org.opencontainers.image.source=https://github.com/openfaas/faas
LABEL org.opencontainers.image.source=https://github.com/openfaas/ingress-operator

I have updated the URL

Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

See comment please

Signed-off-by: John Nyingi <john.nyingi@live.com>
@j0nimost
Copy link
Author

Kindly review

Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

LGTM!

@alexellis alexellis merged commit 88f3bf3 into openfaas:master Nov 5, 2021
@alexellis
Copy link
Member

That is perfect, thank you :)

Just for future reference rather than "Added label" in the commit message, perhaps we could be more instructive for future folks who are reading history?

"Added open containers label to Dockerfile" for instance.

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.

2 participants