Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Replacing Gerrit with GitLab #298

Conversation

lykabernardo
Copy link
Contributor

No description provided.

nickdgriffin and others added 30 commits April 20, 2016 17:14
Added LDAP-LTB, LDAP-PHPADMIN and updated version of ADOP-NGINX to 0.2.0
Clean up of both docker-machine existing test and create command itself.
Updating Jenkins image version number to 0.1.4
Added check to make sure INITIAL_ADMIN_USER is not set to 'admin'
Feature: Added  --without-pull option to init function.
Adding ADOP_PLATFORM_MANAGEMENT_VERSION to Jenkins
Adding a mechanism to provide Jenkins with AWS parameters in override file
Bug fix by removing unneccesary double quotes in quickstart
@lykabernardo lykabernardo force-pushed the feature/replace-gerrit-with-gitlab branch 5 times, most recently from 834d9eb to 1d35bf2 Compare November 14, 2018 13:57
@lykabernardo lykabernardo force-pushed the feature/replace-gerrit-with-gitlab branch 2 times, most recently from 8fdcf9d to 9b927f9 Compare November 16, 2018 08:39
@lykabernardo lykabernardo force-pushed the feature/replace-gerrit-with-gitlab branch from 9b927f9 to 11c95ad Compare November 20, 2018 04:51
@davidjeddy
Copy link

Looks reasonable, Travis not being able to build the project indicates a configuration error though. Could we get that corrected please.

As a side note; I am personally not a fan of force-pushes. It re-writes the branch history on the repo. This makes it impossible for anyone else to contribute during the dev. cycle.

Copy link

@davidjeddy davidjeddy left a comment

Choose a reason for hiding this comment

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

Excellent update to ADOP.

.travis.yml Outdated Show resolved Hide resolved
cmd/project Outdated
@@ -49,7 +49,7 @@ load_help() {
printf " %-3s %s\n" "" "-r <ENABLE_CODE_REVIEW> : This is to control whether to enable code review or not for the repositories loaded by cartridge. (Optional) (Default: false)"
printf " %-3s %s\n" "" "-h : Print this help."
echo
echo "HINT: Run '${CMD_NAME} ${SUB_CMD_NAME} -p <PROJECT_NAME> -w <WORKSPACE_NAME> load -u ssh://jenkins@gerrit:29418/cartridges/adop-cartridge-java.git' to load java reference catridge in adop jenkins instance under existing workspace/project."
echo "HINT: Run '${CMD_NAME} ${SUB_CMD_NAME} -p <PROJECT_NAME> -w <WORKSPACE_NAME> load -u https://github.com/Accenture/adop-cartridge-java.git' to load java reference catridge in adop jenkins instance under existing workspace/project."

Choose a reason for hiding this comment

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

Any way we can continue to use SSH w/ GitHub?

@@ -31,13 +31,13 @@ High-level guidelines for writing Jenkins jobs in Job DSL:
* Ensure that you are using the preBuildCleanup() wrapper in your Job DSL to make sure that your Jenkins workspace is cleared before every build.
* Do not make any credentials visible anywhere in your job i.e. do not echo passwords in your shell script or store credentials as plain-text build parameters. Ensure you are always using the maskPasswords() and injectPasswords() wrappers in your Job DSL.
* Credentials can also be added manually to the Jenkins credential store and then referenced in your job.
* It is highly recommended that the sshAgent() wrapper be used with the Jenkins credentials specified in order to allow Jenkins to clone all local git repositories from Gerrit over SSH.
* It is highly recommended that the sshAgent() wrapper be used with the Jenkins credentials specified in order to allow Jenkins to clone all local git repositories from Gitlab over SSH.

Choose a reason for hiding this comment

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

Above in cmd/project HTTPS is used to clone.

@@ -18,6 +18,6 @@ Once you [generate a project](/adop-docker-compose/docs/operating/projects), you
- `CARTRIDGE_FOLDER` - The folder name within the project namespace where your cartridge will be loaded into.
- `FOLDER_DISPLAY_NAME` - Display name of the folder where the cartridge is loaded.
- `FOLDER_DESCRIPTION` - Description of the folder where the cartridge is loaded.
- `ENABLE_CODE_REVIEW` - Enables Gerrit Code Reviewing for the selected cartridge.
- `ENABLE_CODE_REVIEW` - Enables Code Reviewing for the selected cartridge (only supports Gerrit).

Choose a reason for hiding this comment

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

Gitlab is being added as the code review option, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

This feature can be implemented in Gitlab as well I think, however currently this is implemented only for Gerrit, this is about "thumbs up" feature when on success build Jenkins sends signal to Gerrit API and increasing "score" of changeset in Gerrit.

Random example from the internet :)

pipeline {
    agent any
    stages {
        stage('Example') {
            steps {
                echo 'Hello World'
            }
        }
    }
    post {
        success { gerritReview score:1 }
        failure { gerritReview score:-1 }
    }
}

Choose a reason for hiding this comment

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

Ah, ok. That helps clarify it.

* `./adop project -p <PROJECT_NAME> -w <WORKSPACE_NAME> load -u https://github.com/Accenture/adop-cartridge-java.git` - loads Java reference catridge in ADOP Jenkins instance under existing workspace/project.
Copy link

@davidjeddy davidjeddy Dec 10, 2018

Choose a reason for hiding this comment

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

Same comment as above regarding ssh vs https.

davidjeddy
davidjeddy previously approved these changes Dec 11, 2018
@davidjeddy
Copy link

I am still concerned the build is failing.

Copy link
Contributor

@RobertNorthard RobertNorthard left a comment

Choose a reason for hiding this comment

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

This is awesome great work - Added a few additional comments.

Do we want the ADOP CLI to support Gerrit and Gitlab? @anton-kasperovich / @dsingh07

env.config.sh Outdated
# Gerrit MySQL
# Gitlab Postgresql
export GITLAB_POSTGRES_USER="gitlab"
export GITLAB_POSTGRES_PASSWORD="gitlab"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please can we generate the postgres password? I'm not to keen on static credentials.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated PR to include generation or postgres password.

gitlab_rails['db_database'] = "${GITLAB_POSTGRES_DB}"
gitlab_rails['db_adapter'] = 'postgresql'
gitlab_rails['db_encoding'] = 'utf8'
gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '172.0.0.0/8']
Copy link
Contributor

Choose a reason for hiding this comment

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

The docker network (local_network) is created with 172.19.0.0/16 address space, but this does not stop CUSTOM_NETWORK_NAME been overridden and a user using a pre-defined one.

I feel we have 3 options here:

  • Whitelist the whole private IP address space and loopbacks
  • Pass the docker network subnet CIDR in as a parameter
  • Whitelist all and rely on the proxy / Docker SDN

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed with @marisbahtins, updated PR with the second option: Pass the docker network subnet CIDR in as a parameter

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

Successfully merging this pull request may close these issues.

None yet