Skip to content

Commit 1dc464d

Browse files
authored
Bug fix: Remove non-functional "Use custom workspace" field from Freestyle project configuration form (jenkinsci#1429)
* Remove first instance of 'Use custom workspace' field for freestyle projects * Update docker-compose.yml and README.md * Fix broken docs links * Add the necessary shm_size info in docker-compose.yml * Update src/docker/docker-compose.yml
1 parent c253ae3 commit 1dc464d

File tree

4 files changed

+13
-19
lines changed

4 files changed

+13
-19
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
- [Cancel pending builds on merge request update](#cancel-pending-builds-on-merge-request-update)
3535
- [Compatibility](#compatibility)
3636
- [Contributing to the Plugin](#contributing-to-the-plugin)
37-
- [Testing With Docker](#testing-with-docker)
38-
- [Release Workflow](#release-workflow)
37+
- [Testing With Docker](src/docker/README.md#quick-test-environment-setup-using-docker-for-linuxamd64)
38+
- [Release Workflow](CONTRIBUTING.md#release-workflow)
3939
- [Changelog](#changelog)
4040

4141
## Introduction

src/docker/README.md

+7-13
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,35 @@ If they don't already exist, create the following directories and make sure the
99
* /srv/docker/gitlab/gitlab
1010
* /srv/docker/gitlab/redis
1111
* /srv/docker/jenkins
12-
To start the containers for Linux, run `docker-compose up -d` from the `docker` folder. If you have problems accessing the services in the containers, run `docker-compose up` by itself to see output from the services as they start, and the latter command is the verbose version of the former.
12+
To start the containers for Linux, run `docker-compose up -d` from the `src/docker` folder. If you have problems accessing the services in the containers, run `docker-compose up` by itself to see output from the services as they start, and the latter command is the verbose version of the former.
1313

1414
## Quick test environment setup using Docker for MacOS/arm64
1515

16-
You need to modify the example docker-compose file available at `gitlab-plugin/src/docker` to set up instances of the latest `GitLab` and `Jenkins` versions for MacOS/arm64.
16+
You need to modify the example docker-compose file available at `src/docker` to set up instances of the latest `GitLab` and `Jenkins` versions for MacOS/arm64.
1717

1818
Due to Apple's System Integrity Protection (SIP), the suggested paths cannot be simply created and accessed, so you may need to use the home directory (~) as a root for the new directories to be created.
1919

2020
In the `docker-compose.yml` file:
21+
2122
1. Change the ports to
2223
- '55580:80'
2324
- '55522:22'
24-
- '55443:443'
2525
as the browser may block the ports in original docker-compose file.
2626
2. Change the gitlab volumes to
2727
`/Users/yourusername/srv/docker/gitlab/config:/etc/gitlab`
2828
`/Users/yourusername/srv/docker/gitlab/logs:/var/log/gitlab`
2929
`/Users/yourusername/srv/docker/gitlab/data:/var/opt/gitlab`
3030
3. Change the jenkins volumes to
3131
`/Users/yourusername/srv/docker/jenkins:/var/jenkins_home`
32-
4. In your Docker-Desktop go to `Settings > General > Choose file sharing implementation for your containers` and switch to osxfs (Legacy). As `osxfs (Legacy)` utilizes more resources of the system, make sure the assigned resources are sufficient by going to `Settings > Resources` and make suitable adjustments where necessary, otherwise Docker Desktop may go on start mode forever on restarting.
33-
5. Add `shm_size: '5gb'`under gitlab services.
32+
4. In your Docker-Desktop go to `Settings > General > Choose file sharing implementation for your containers` and switch to `osxfs (Legacy)`. As `osxfs (Legacy)` utilizes more resources of the system, make sure the assigned resources are sufficient by going to `Settings > Resources` and make suitable adjustments where necessary, otherwise Docker Desktop may go on start mode forever on restarting.
3433

3534
Like the instructions for Linux, for macOS users to start the containers, run `docker-compose up -d` from the `docker` folder. If you have any problems accessing the services in the containers, run `docker-compose up` by itself to see output from the services as they start.
3635

3736
## Access GitLab
3837

39-
To access `GitLab`, you first need to create a user - `root` with some password. To do so, follow the following steps :
40-
1. In the GitLab containers terminal inside Docker Desktop, type `gitlab-rails console` and wait for at least a few minutes for the console to start.
41-
2. Once the console is started successfully, run the following commands in sequence at the console, noting that there are certain security rules to the password choice:
42-
a. `user = User.new(username: 'root', email: '[email protected]', name: 'root', password: 'setyourown', password_confirmation: 'setyourown')`
43-
b. `user.skip_confirmation!`
44-
c. `user.save!`
45-
3. Now, point your browser to `http://localhost:55580` and log in with `root` as the username and `setyourown` as the password. Then create a user for Jenkins, impersonate that user, get its API key, set up test repos, etc. When creating webhooks to trigger Jenkins jobs, use `http://jenkins:8080` as the base URL.
46-
38+
To access `GitLab`, you first need to create a user - `root` with some password. To do so, follow the following steps:
39+
1. Point your browser to `http://localhost:55580` and log in with `root` as the username and `p@ssw0rd` as the password.
40+
2. Then create a user for Jenkins, impersonate that user, get its API key, set up test repos, etc. When creating webhooks to trigger Jenkins jobs, use `http://jenkins:8080` as the base URL.
4741

4842
If you have trouble cloning a GitLab repository, it may be because you have a leftover host key from an SSH connection to a previous installation of GitLab in Docker. To troubleshoot, run `ssh -vT git@localhost -p 55522`.
4943

src/docker/docker-compose.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ services:
55
image: 'gitlab/gitlab-ce:latest'
66
restart: "no"
77
hostname: 'localhost'
8+
platform: 'linux/amd64'
89
ports:
910
- '55580:80'
1011
- '55522:22'
11-
- '55443:443'
1212
volumes:
1313
- '/srv/docker/gitlab/config:/etc/gitlab'
1414
- '/srv/docker/gitlab/logs:/var/log/gitlab'
@@ -17,7 +17,7 @@ services:
1717
GITLAB_OMNIBUS_CONFIG: |
1818
external_url 'http://localhost'
1919
gitlab_rails['gitlab_shell_ssh_port'] = 55522
20-
gitlab_rails['initial_root_password'] = 'password'
20+
gitlab_rails['initial_root_password'] = 'p@ssw0rd'
2121
shm_size: '5gb'
2222

2323
jenkins:
@@ -27,4 +27,5 @@ services:
2727
- "8080:8080"
2828
- "50000:50000"
2929
volumes:
30-
- /srv/docker/jenkins:/var/jenkins_home
30+
- '/srv/docker/jenkins:/var/jenkins_home'
31+
shm_size: '5gb'

src/main/resources/com/dabsquared/gitlabjenkins/connection/GitLabConnectionProperty/config.jelly

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?jelly escape-by-default='true'?>
22
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"
33
xmlns:c="/lib/credentials" xmlns:st="jelly:stapler">
4-
<st:include page="configure-advanced.jelly" optional="true" />
54
<f:entry title="${%GitLab Connection}" field="gitLabConnection">
65
<f:select />
76
</f:entry>

0 commit comments

Comments
 (0)