gitlab-qa 2.10.1 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a981ec97a4a08163435c08feb00b34fb32c787774f57b9ef1f720e7de88545ee
4
- data.tar.gz: 4f6d6779f9a5bf70848861f65b1f2be6389a6ef0778089174876796726c11b17
3
+ metadata.gz: fbdc07d475c334682d19f722cc53a23ecc9e701e0faf1e44d17d6177649ea97a
4
+ data.tar.gz: 3d6dd8396cae8b7ed3ebe0a54143b024651baf8eb2e9c3664607933a33bf9299
5
5
  SHA512:
6
- metadata.gz: '0239d4c312308f526e6b2e34267c4170350cb59e7f3b830576b7860bbe904bccb57249b6531fc7df9a1eb7fd73687b0b84c54895413636d01a578533fbeb1f26'
7
- data.tar.gz: 6430539d6ec3f6cbcbbba26bd33ac56bddc894defe7fbbd6d5f20a76b1c6037824de639a0a764a2c6a9b9706d72e3429c2aee3f1475b933635750416f64ef687
6
+ metadata.gz: b3f1b8e302f00c3f01d7d0aa98d8b2ede1e35205b3e7ee30db30defbe5d2dee8f9e43d1123a0bf8a54300ddfc14ab5f260ae7e0354dbf309ff94ccc90b4bf108
7
+ data.tar.gz: 578b24ccbc63f39637a7b00d26ba05bd5de70bc48516253d9e195bfa43c1d6b1be1e913b3aa2f67d6b7bf63168b8c67a3e669e681875ca450c73a523f48ab6c1
data/.gitlab-ci.yml CHANGED
@@ -272,3 +272,20 @@ notify_upstream_commit:failure:
272
272
  script:
273
273
  - bin/notify_upstream_commit failure
274
274
  when: on_failure
275
+
276
+ .notify_slack: &notify_slack
277
+ image: alpine
278
+ stage: notify
279
+ dependencies: []
280
+ cache: {}
281
+ before_script:
282
+ - apk update && apk add git curl bash
283
+ only:
284
+ variables:
285
+ - $TOP_UPSTREAM_SOURCE_JOB
286
+
287
+ notify_slack:
288
+ <<: *notify_slack
289
+ script:
290
+ - bin/slack quality-alerts "☠️ Pipeline on \`$CI_BUILD_REF_NAME\` failed! ☠️ Commit \`$(git log -1 --oneline | sed 's|\"|\\\\\"|g')\` See $CI_PIPELINE_URL (triggered from $TOP_UPSTREAM_SOURCE_JOB)" ci_failing
291
+ when: on_failure
data/bin/slack ADDED
@@ -0,0 +1,14 @@
1
+ #!/bin/bash
2
+ # Sends Slack notification MSG to CI_SLACK_WEBHOOK_URL (which needs to be set).
3
+ # ICON_EMOJI needs to be set to an icon emoji name (without the `:` around it).
4
+
5
+ CHANNEL=$1
6
+ MSG=$2
7
+ ICON_EMOJI=$3
8
+
9
+ if [ -z "$CHANNEL" ] || [ -z "$CI_SLACK_WEBHOOK_URL" ] || [ -z "$MSG" ] || [ -z "$ICON_EMOJI" ]; then
10
+ echo "Missing argument(s) - Use: $0 channel message icon_emoji"
11
+ echo "and set CI_SLACK_WEBHOOK_URL environment variable."
12
+ else
13
+ curl -X POST --data-urlencode 'payload={"channel": "#'"$CHANNEL"'", "username": "GitLab QA Bot", "text": "'"$MSG"'", "icon_emoji": "'":$ICON_EMOJI:"'"}' "$CI_SLACK_WEBHOOK_URL"
14
+ fi
@@ -11,7 +11,7 @@ make a few changes to your `gdk/gitlab/config/gitlab.yml` file.
11
11
  1. Enable the `sshd` service by uncommenting the relevant line in your
12
12
  `Procfile`.
13
13
  1. Edit `openssh/sshd_config` and
14
- - set `ListenAddress` to `192.168.0.12`
14
+ - set `ListenAddress` to `192.168.0.12:2222`
15
15
  - add `AcceptEnv GIT_PROTOCOL` to allow use of [Git protocol v2][Git protocol]
16
16
  1. Restart your GDK
17
17
  1. Run the QA scenario as follows:
@@ -0,0 +1,27 @@
1
+ # Run QA tests against a remote Selenium grid
2
+
3
+ The QA tests have the ability to be run against a local or remote grid.
4
+
5
+ I.e, if you have a Selenium server set up at http://localhost:4444 or if you have a SauceLabs / BrowserStack account.
6
+
7
+ ## Variables
8
+
9
+ | Variable | Description | Default | Example(s) |
10
+ |---------------------------|----------------------------------------------------------------|----------|--------------------------------|
11
+ | QA_BROWSER | Browser to run against | "chrome" | "chrome" "firefox" |
12
+ | QA_REMOTE_GRID_PROTOCOL | Protocol to use | "http" | "http" "https" |
13
+ | QA_REMOTE_GRID | Remote grid to run tests against | | "localhost:3000" "provider:80" |
14
+ | QA_REMOTE_GRID_USERNAME | Username to specify in the remote grid. "USERNAME@provider:80" | | |
15
+ | QA_REMOTE_GRID_ACCESS_KEY | Key/Token paired with `QA_REMOTE_GRID_USERNAME` | | |
16
+
17
+ ## Examples
18
+
19
+ *Run QA Smoke Tests against firefox on SauceLabs*
20
+
21
+ ```bash
22
+ $ QA_BROWSER=firefox \
23
+ QA_REMOTE_GRID=ondemand.saucelabs.com:80 \
24
+ QA_REMOTE_GRID_USERNAME=user \
25
+ QA_REMOTE_GRID_ACCESS_KEY=privatetoken \
26
+ gitlab-qa Test::Instance::All --tags smoke
27
+ ```
@@ -26,7 +26,7 @@ our Omnibus package works, can be updated / upgraded to EE etc.).
26
26
  For more details on the internals, please read the
27
27
  [How it works](./how_it_works.md) documentation.
28
28
 
29
- ## Supported environment variables
29
+ ## Supported GitLab environment variables
30
30
 
31
31
  * `GITLAB_USERNAME` - username to use when signing into GitLab
32
32
  * `GITLAB_PASSWORD` - password to use when signing into GitLab
@@ -51,6 +51,10 @@ For more details on the internals, please read the
51
51
  * `QA_LOG_PATH` - path to output debug logging to. If not set logging will be output to STDOUT
52
52
  * `QA_CAN_TEST_GIT_PROTOCOL_V2` - set to `false` to skip tests that require Git protocol v2 if your environment doesn't support it.
53
53
 
54
+ ## [Supported Remote Grid environment variables](./running_against_remote_grid.md)
55
+
56
+ ## Examples
57
+
54
58
  ### `Test::Instance::Image CE|EE|<full image address>`
55
59
 
56
60
  This tests that a GitLab Docker container works as expected by running
@@ -7,6 +7,11 @@ module Gitlab
7
7
  extend self
8
8
 
9
9
  ENV_VARIABLES = {
10
+ 'QA_REMOTE_GRID' => :remote_grid,
11
+ 'QA_REMOTE_GRID_USERNAME' => :remote_grid_username,
12
+ 'QA_REMOTE_GRID_ACCESS_KEY' => :remote_grid_access_key,
13
+ 'QA_REMOTE_GRID_PROTOCOL' => :remote_grid_protocol,
14
+ 'QA_BROWSER' => :browser,
10
15
  'GITLAB_ADMIN_USERNAME' => :admin_username,
11
16
  'GITLAB_ADMIN_PASSWORD' => :admin_password,
12
17
  'GITLAB_USERNAME' => :user_username,
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '2.10.1'.freeze
3
+ VERSION = '2.11.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-qa
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.1
4
+ version: 2.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grzegorz Bizon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-11 00:00:00.000000000 Z
11
+ date: 2019-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -133,10 +133,12 @@ files:
133
133
  - bin/notify_upstream_commit
134
134
  - bin/qa
135
135
  - bin/setup
136
+ - bin/slack
136
137
  - docs/README.md
137
138
  - docs/architecture.md
138
139
  - docs/how_it_works.md
139
140
  - docs/run_qa_against_gdk.md
141
+ - docs/running_against_remote_grid.md
140
142
  - docs/trainings.md
141
143
  - docs/waits.md
142
144
  - docs/what_tests_can_be_run.md