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

Validation of eiffel-intelligence-frontend periodic builds setup on Nordix Infrastructure #292

Open
fdegir opened this issue Oct 8, 2020 · 7 comments

Comments

@fdegir
Copy link
Member

fdegir commented Oct 8, 2020

Description

Periodic builds are setup for this project on Nordix Infrastructure as part of Eiffel Infrastructure and CI/CD establishment work Phase 1.

It is important the builds are reviewed by the project to ensure the build process is correct.
It would also be good if the artifact is fetched from Nordix Registry and verify it works.

Here are more details.

  • The job created for this project on Nordix Jenkins runs against the master branch of the project and attempts building container image using podman
  • The job regularly polls the repo for commits and gets triggered if one or more commits are found. Please note that this can be adjusted depending on the project needs and trigger can be updated such as to trigger based on new PRs.
  • Upon completion of the build, the container image is pushed to eiffel project on Nordix Container Image Registry (Please reach out to @fdegir if you need account on the registry.)

Build process.

  • When the job gets triggered, project repo is cloned and the last commit on the tip of master branch is checked out
  • Once the clone is ready, job proceed with maven build
    mvn --quiet --batch-mode package -DskipTests
  • Upon completion of maven build, the job proceeds with the command to start the container image build using the war file produced in previous step. The command used for the build is
    podman build --build-arg URL=target/eiffel-intelligence-frontend-3.0.1-SNAPSHOT.war --file src/main/docker/Dockerfile --log-level error --tag registry.nordix.org/eiffel/eiffel-intelligence-frontend:latest .
  • Image tag is set to latest since this is a build against the tip of master branch
  • The complete build script is available on Nordix CICD Repository.
  • Upon completion of the build, the container image is pushed to eiffel project on Nordix Container Image Registry
  • The image is available for anonymous users and can be pulled using either one of the commands below
    podman pull registry.nordix.org/eiffel/eiffel-intelligence-frontend:latest
    docker pull registry.nordix.org/eiffel/eiffel-intelligence-frontend:latest

What we need from you is

  • Look at the build log and let us know if you notice anything that looks strange
  • Correct the build process or the command used for the project build if they are incorrect
  • Confirm if right versions of openjdk and maven are used. openjdk version 8u265-b01-0ubuntu2~20.04 and maven version 3.6.3-1. If they are not correct, please pass the correct ones.
  • If possible, pull the image and verify it works
    podman pull registry.nordix.org/eiffel/eiffel-intelligence-frontend:latest
    docker pull registry.nordix.org/eiffel/eiffel-intelligence-frontend:latest
  • Java build artifact is not stored anywhere but it can be done and uploaded to Nordix Artifactory. Please let us know if it is desired so we fix this as well.
  • Provide your opinion about what type of builds your project needs - PR validation before merge, builds after merge, builds after release, periodic builds

and anything else you may think if.

Please note that upcoming phases will enable testing as well and we will reach out to you when the time comes.

Motivation

Setup builds for the project

Exemplification

N/A

Benefits

Project will have builds available

Possible Drawbacks

N/A

@fdegir
Copy link
Member Author

fdegir commented Oct 9, 2020

/cc @eiffel-community/eiffel-intelligence-maintainers

@m-linner-ericsson
Copy link
Member

As pointed out by @tobiasake this repo is dependent on https://github.com/eiffel-community/eiffel-intelligence and thus we might need some dependency handling. I have started a discussion with eiffel-community/community#74.

@fdegir
Copy link
Member Author

fdegir commented Oct 21, 2020

@m-linner-ericsson @tobiasake I suppose we can update the logic of eiffel-intelligence-frontend job to trigger upon completion of eiffel-intelligence job in addition to triggering it based on git polling so when eiffel-intelligence changes, we rebuild eiffel-intelligence-frontend image as well.

do you think this would satisfy the need?

@m-linner-ericsson
Copy link
Member

We are more interested that the code contributions in eiffel-intelligence are merged before we build the frontend. The two services are independent services so the build order doesn't matter but the code contributions do.

Did this make it more clear what we are after?

@fdegir
Copy link
Member Author

fdegir commented Oct 21, 2020

Let's see if I understood it correctly. ;)

You are interested in commits and builds for eiffel-intelligence should be done after code is merged - which is the current setup by using polling the repo and running the build if there is any new commit since the last time repo was polled. (This can and will be switched to post merge so we build the image whenever code gets merged.)

When it comes to eiffel-intelligence-frontend; the image for this one should also be built whenever a commit is merged either in eiffel-intelligence or eiffel-intelligence-frontend so builds are driven by commits rather than images. Build order of eiffel-intelligence or eiffel-intelligence-frontend images are not important since they can be built independently whenever a commit lands in the repo.

Is my understanding correct?

@m-linner-ericsson
Copy link
Member

I guess this discussion is also done in eiffel-community/community#74 (comment).

If we just build things on the latest commit and have them as dev containers without any guarantee of them working it would be fine. Because when the release builds comes we will just use them.

Does this clear things up?

@fdegir
Copy link
Member Author

fdegir commented Oct 23, 2020

Yes.

The other benefit of :dev containers is that they will be useful when cutting the release since we will have already built and tested the commit to be released in advance so making a GitHub release and getting image built/tagged for that commit will hopefully be straightforward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants