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

Gha Refactoring #1738

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 11 additions & 27 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
# GitHub Actions Workflow

The workflow in the [build.yaml](build.yaml) file replaces the existing [Jenkins.ci](../../Jenkinsfile.ci) build process.

The `lint` job replaces the `Static code validation` stage of the Jenkins pipeline, while the remainder of the jobs replace the `Build / Test` stage.

The `Build result notification` stage was not moved to GHA, as build failures will be reports via GHA.

Many of the other stages are replaced merely by the fact we're using Github Actions, we use prebuild Docker containers so we don't have to replicate the steps for building containers.

The build process for `Jenkins.nightly` was not ported to GHA.

Support for Windows continues as a `ToDo` item.


## Configuring actions

If you are cloning or forking this repo you will need to configure two secrets for Actions to run correctly.

Secrets can be set via Settings -> Secrets -> New repository secret:

`CR_USER`: is your GH username. It must be lowercase.
`CR_PAT`: can be created by following the [Creating a personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) documentation.

When you create your token, the only permission you need to select is `write:packages` **Upload packages to GitHub package registry**, all other necessary permissions will be selected by default.

You may also need to enable [Improved container support](https://docs.github.com/en/packages/guides/enabling-improved-container-support) in order to allow the images to be written to your repository. You'll see an error to this affect if this is the case.

Once you have run the build once with those secrets, you have to make the images public. Access the packages at https://ghcr.io/USER/indy-node/node-build and https://ghcr.io/USER/indy-node/node-lint and change the visibility in 'Package Settings' to 'Public' then re-run the build. Alternatively, if you would prefer to keep the images private, you can manage access to the package and select only the user account associated with the token you setup above.
The workflow in the [push_pr.yaml](push_pr.yaml) file runs on push and pull requests to the ubuntu-20-04-upgrade branch.
It uses the following reusable workflows in this folder.

+ [buildimage.yaml](buildimage.yaml)
This workflow builds the dockerimages and pushes them to the GHCR.
+ [test.yaml](test.yaml)
This workflow runs the tests inside the uploaded docker images.
+ [buildpackages.yaml](buildpackages.yaml)
This workflows builds the python and debian packages. It also uploads them to the workflow.
+ [publish_artifacts.yaml](publish_artifacts.yaml)
This workflow uploads the packages to PYPI and Artifactory.
Loading