-
Notifications
You must be signed in to change notification settings - Fork 15
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
Pr environment, open/updated pr workflow #1640
Conversation
7977d2e
to
e113562
Compare
f6baf7d
to
8fed068
Compare
The pr is stale, waiting for ansible playbook to be updated. Missing pieces
|
f165a1a
to
550c962
Compare
After dns issues are solved, add the photofinish step, we need to make sure that the docker image is always pulled and container restarted with the newest image for the provided tag |
74cd3a6
to
fb06422
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good in general.
I have just written down some nit-pick comments.
I will do other round when the PR is put as ready to be reviewed
- labeled | ||
|
||
env: | ||
MANTAINERS: "[\"cdimonaco\", \"dottorblaster\", \"fabriziosestito\", \"rtorrero\", \"nelsonkopliku\", \"arbulu89\",\"jagabomb\",\"emaksy\",\"jamie-suse\"]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use some already predefined group instead of individual names?
We have the Developers
groups for example.
Or Admins
, or something like that.
Plain users don't look like the best option
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_REPOSITORY: ghcr.io/${{ github.repository_owner }}/trento-web | ||
IMAGE_TAG: ${{ github.event.pull_request.number }}-env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should put PR_NUMBER
here, or remove the declaration above if we are not going to use it.
|
||
env: | ||
MANTAINERS: "[\"cdimonaco\", \"dottorblaster\", \"fabriziosestito\", \"rtorrero\", \"nelsonkopliku\", \"arbulu89\",\"jagabomb\",\"emaksy\",\"jamie-suse\"]" | ||
PR_ENV_LABEL: env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would need to document this label
usage
# cache-to: type=gha,mode=max | ||
|
||
create_pr_environment: | ||
name: Create or update the pr environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should put pr
as capital letters (PR
) in the texts?
To highlight that it is an acronym
needs: build-and-push-pr-image | ||
env: | ||
PR_BASE_URL: ${{ github.event.pull_request.number }}.prenv.trento.suse.com | ||
PR_NUMBER: ${{ github.event.pull_request.number }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to re-declare this PR_NUMBER
again?
server: | ||
ansible_host: ${{ secrets.PR_ENV_MACHINE_IP }} | ||
options: | | ||
--extra-vars "web_postgres_db='${{ env.PR_NUMBER}}db' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put an extra space after env.PR_NUMBER
-> {{ env.PR_NUMBER }}
force_recreate_web_container='true' \ | ||
force_pull_images='true' \ | ||
trento_server_url='http://${{ env.PR_BASE_URL}}'" | ||
run-photofinish-demo-env: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a new line before this job?
runs-on: ubuntu-20.04 | ||
needs: create_pr_environment | ||
env: | ||
TRENTO_PR_ENV_URL: "${{ github.event.pull_request.number }}.prenv.trento.suse.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could declare this on top of the file, to avoid re-declaring for each job
rabbitmq_vhost='${{ env.PR_NUMBER}}' \ | ||
rabbitmq_password='trento' \ | ||
prometheus_url='http://localhost' \ | ||
web_admin_password='adminpassword' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should put this web_admin_password
in our secrets just in case
4983189
to
7101d8c
Compare
CLOSED IN FAVOR OF #1704 |
Description
This pr aims to create the github workflow for creating and updating an ephimeral pull request environment.
How was this tested?
Act locally and manual triggering