Skip to content

Commit 0168b90

Browse files
authored
Offline GitHub workflow (#733)
* Adds the offline workflow to the GitHub Actions pipeline * Uses the branch name from the pull request or the branch name from the commit * Allow traffic between u1 and u2 * Blocks all outbound traffic from u2 except for SSH * Prepares offline resources on u1 before copying the tarball to u2 * Finds the offline tarball on u1 before copying it to u2 * Build the u2 Azure instance at the same time as the u1 instance * Don't clean up azure resources in offline workflow * Add wait for SSH to be ready to offline workflow * Wait for outbound connectivity to be blocked in u2 * Run LME installer on u2 in offline workflow * Runs LME installer on u2 in offline workflow with non-interactive mode * Brings the u2 server back online to run the tests * Runs apt-get on the u2 server before installing the test requirements * Installs python to run the tests on the u2 server * Removes the servers at the end of the workflow * Stop cleanup of Azure resources for debugging * Installs python3-venv on the u2 server * Put the servers both in the same VNet and subnet and block all outbound traffic from the offline server. * Fixes the password generator to output 12 characters. * Prepares and runs the tests with the server that is online * Sets up the Windows server to be used for the offline tests. * Disown the HTTP server process to avoid hanging the workflow. * Allows inbound traffic from VNet to u1 (for HTTP server on port 8080) * Uses SCP to copy the tarball from u1 to w1. * Generates an SSH key with no passphrase on w1 * Uses the SSH key generated on w1 to copy the tarball from u1 to w1 * Using a different method to generate the SSH key on w1 * Moves the key generation step to earlier in the workflow * Escapes the empty passphrase in the PowerShell script * Escapes the empty passphrase in the PowerShell script * Installs the Elastic Agent on w1 * Run the end to end tests on the offline VM * Uncommented pull_request triggers for all workflows
1 parent 3778515 commit 0168b90

File tree

4 files changed

+708
-12
lines changed

4 files changed

+708
-12
lines changed

.github/workflows/cluster.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: Cluster Run - Minimega
22

33
on:
4-
# pull_request:
5-
# branches:
6-
# - '*'
4+
pull_request:
5+
branches:
6+
- 'develop'
7+
- 'main'
78
workflow_dispatch:
89
inputs:
910
azure_region:
@@ -306,7 +307,7 @@ jobs:
306307
-H \"kbn-xsrf: true\" \
307308
-H \"Content-Type: application/json\" \
308309
-d \"{\\\"policy_id\\\":\\\"$POLICY_ID\\\"}\" |
309-
jq -r .item.api_key
310+
jq -r '.item.api_key'
310311
'
311312
")
312313
echo "Retrieved enrollment token: $ENROLLMENT_TOKEN"

.github/workflows/cluster_redhat.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ on:
2828
- westeurope
2929
pull_request:
3030
branches:
31-
- '*'
31+
- 'develop'
32+
- 'main'
3233

3334
jobs:
3435
build-and-test-cluster-redhat:

0 commit comments

Comments
 (0)