Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Migrate to monorepo for CI #220

Merged
merged 44 commits into from
Oct 26, 2023
Merged

Migrate to monorepo for CI #220

merged 44 commits into from
Oct 26, 2023

Conversation

xuebinsu
Copy link
Contributor

No description provided.

@liuxueyang
Copy link
Member

This PR should be merged after the corresponding PR in gp-extensions-ci is merged.

@higuoxing
Copy link
Member

This PR should be merged after the corresponding PR in gp-extensions-ci is merged.

+1.

sudo passwd --delete gpadmin # for `su gpadmin` in start_gpdb
echo 'alias su="sudo su"' >>"$HOME/.bashrc"
source "$HOME/.bashrc" # for `alias su`
start_gpdb
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not putting start_gpdb to pre_test.sh like others? https://github.com/pivotal/advanced-password-check/blob/gpdb/concourse/pre_test.sh

  • pre_test.sh runs with root permission, no need to hack the su/sudo anymore
  • it will add source to .bashrc, so everything will be set up when gpadmin login.
  • Ideally, things in pre_test.sh do setup things, and runs only once. So test.sh can be run again when hijack to the concourse.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I totally agree that it is good to make test.sh idempotent. Working on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

test.sh is modified to be idempotent. I tried manually and it seems to work.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Any special reason why not just follow the convention to have a pre_test.shto start gpdb there?

Copy link
Collaborator

Choose a reason for hiding this comment

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

source "$CI_REPO_DIR/common/entry_common.sh"
sudo passwd --delete gpadmin # for `su gpadmin` in start_gpdb
if [[ "$(source /etc/os-release && echo "$ID")" == "ubuntu" ]]; then
su () {
Copy link
Member

Choose a reason for hiding this comment

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

I don't like this kind of hack. 🤣

Copy link
Member

@liuxueyang liuxueyang left a comment

Choose a reason for hiding this comment

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

There are some hacks in the script which are not necessary in my opinion. But it is OK if it works well. 😆

Copy link
Collaborator

@beeender beeender left a comment

Choose a reason for hiding this comment

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

There are some hacks in the script which are not necessary in my opinion. But it is OK if it works well. 😆

Agreed.

@xuebinsu xuebinsu merged commit 48270ad into main Oct 26, 2023
6 checks passed
@xuebinsu xuebinsu deleted the ci_monorepo branch October 26, 2023 09:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants