eclipse-tractusx / .eclipsefdn

Repository to host configurations related to the Eclipse Foundation.
https://eclipse-tractusx.github.io/.eclipsefdn/
1 stars 15 forks source link

chore: enable gh-pages for data-exchange-test-service #5

Closed almadigabor closed 1 year ago

almadigabor commented 1 year ago

name: Enable GitHub Pages for data-exchange-test-service about: 'Currently branch does not exist and GH Pages are disabled so helm repository is not available and helm chart is not released properly' title: 'chore: enable gh-pages for data-exchange-test-service'

Description

Thanks for opening this contribution! What does this PR introduce? Does it fix a bug? Does it add a new feature? Is it enhancing documentation?

Currently branch does not exist and GH Pages are disabled so helm repository is not available and helm chart is not released properly

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

Additional information

github-actions[bot] commented 1 year ago
Diff for eb2d2d7e8f2f20d85063c4041f31b326c30b8582: ```diff Printing local diff for configuration at '/home/runner/work/.eclipsefdn/.eclipsefdn/otterdog-configs/otterdog.json' Actions are indicated with the following symbols: + create ! modify ! forced update - delete Organization eclipse-tractusx[id=eclipse-tractusx] there have been 12 validation infos, enable verbose output with '-v' to to display them. + add environment[name="github-pages", repository="data-exchange-test-service"] { + branch_policies = ['gh-pages'] + deployment_branch_policy = "selected" + name = "github-pages" + reviewers = [] + wait_timer = "0" } Plan: 1 to add, 0 to change, 0 to delete. ``` ```diff Showing diff to a canonical version of the configuration at '/home/runner/work/.eclipsefdn/.eclipsefdn/otterdog-configs/otterdog.json' Organization eclipse-tractusx[id=eclipse-tractusx] ```
netomi commented 1 year ago

Ty for the PR. Enabling github pages via adding a corresponding environment has not been tested yet. I will see if this already sufficient or more work is needed (see https://gitlab.eclipse.org/eclipsefdn/security/otterdog/-/issues/59).

I will merge your PR and apply. If some additional config is needed to enable GH Pages I will do it manually via the UI for the time being.

netomi commented 1 year ago

The change has been applied and the environment has been created. GitHub Pages configuration for the repo is still set to Deploy from branch with None selected atm.

Please let me know how you plan to deploy to GitHub Pages so that we can enable the missing things.

netomi commented 1 year ago

@almadigabor It looks like you use this action to deploy to GitHub Pages:

https://github.com/eclipse-tractusx/data-exchange-test-service/actions/runs/5420899136/jobs/9855635432

From there I see that the https://github.com/helm/chart-releaser-action is being use to commit the charts to a gh-pages branch from which it shall be deployed. This is also listed in the prerequisites of the action.

Can you please create an empty gh-pages branch in the project as explained here:

https://jiafulow.github.io/blog/2020/07/09/create-gh-pages-branch-in-existing-repo/

After that I can setup that GitHub Pages is deployed from the gh-pages branch, support for that is missing in otterdog atm, but will work on adding that via the configuration.

netomi commented 1 year ago

Looking at repo https://github.com/eclipse-tractusx/item-relationship-service, I can see that the gh-pages branch seems to be based on main, so creating an empty branch is maybe not necessary, just creating a gh-pages branch will probably suffice.

almadigabor commented 1 year ago

Hi @netomi! Thanks for the help! I created the gh-pages branch based on the main branch and rerun the failed GH Action. To test it in action we need the team to make some changes to the helm chart in their repository because rerunning the workflow currently succeeds but does not do anything at all as changes are not detected on the chart. I'll keep on checking and let you know if it still won't work.

netomi commented 1 year ago

Ok thanks, I have configured the data-exchange-test-service now manually such that GitHub Pages are deployed from the gh-pages branch. That was missing and you can only set it in the UI once the branch exists. This is something that should also be configurable using otterdog.

netomi commented 1 year ago

deployment seems to work fine: https://eclipse-tractusx.github.io/data-exchange-test-service/