-   Notifications  You must be signed in to change notification settings 
- Fork 128
[CI] Add some more steps to test on Macos ARM #2030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
   Merged  
     Merged  
 Changes from all commits
 Commits 
  Show all changes 
  7 commits   Select commit Hold shift + click to select a range 
 f9fe8ab  Test build zip step in macos arm 
  mrodm 2307d81  Add safeguards 
  mrodm 0d7f5d9  Skip actions in cleanup if not installing packages 
  mrodm 6dd4b2f  Restore integration tests 
  mrodm 735c1aa  Add TODO message 
  mrodm 27b79be  Create new script file 
  mrodm 2e7220d  Skip install docker and docker-compose 
  mrodm File filter
Filter by extension
Conversations
 Failed to load comments.  
    Loading  
 Jump to
  Jump to file  
  Failed to load files.  
    Loading  
 Diff view
Diff view
There are no files selected for viewing
   This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters   
        This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters   
        This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters   
        This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters   
        This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters   
     | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| #!/bin/bash | ||
|  | ||
| set -euxo pipefail | ||
|  | ||
| cleanup() { | ||
| r=$? | ||
|  | ||
| # Clean used resources | ||
| for d in test/packages/*/*/; do | ||
| elastic-package clean -C "$d" -v | ||
| done | ||
|  | ||
| exit $r | ||
| } | ||
|  | ||
| testype() { | ||
| basename "$(dirname "$1")" | ||
| } | ||
|  | ||
| trap cleanup EXIT | ||
|  | ||
| OLDPWD=$PWD | ||
| # Build packages | ||
| export ELASTIC_PACKAGE_SIGNER_PRIVATE_KEYFILE="$OLDPWD/scripts/gpg-private.asc" | ||
| ELASTIC_PACKAGE_SIGNER_PASSPHRASE=$(cat "$OLDPWD/scripts/gpg-pass.txt") | ||
| export ELASTIC_PACKAGE_SIGNER_PASSPHRASE | ||
| ELASTIC_PACKAGE_LINKS_FILE_PATH="$(pwd)/scripts/links_table.yml" | ||
| export ELASTIC_PACKAGE_LINKS_FILE_PATH | ||
|  | ||
| go run ./scripts/gpgkey | ||
|  | ||
| for d in test/packages/*/*/; do | ||
| # Packages in false_positives can have issues. | ||
| if [ "$(testype $d)" == "false_positives" ]; then | ||
| continue | ||
| fi | ||
| elastic-package build -C "$d" --zip --sign -v | ||
| done | ||
|  | ||
| # Remove unzipped built packages, leave .zip files | ||
| rm -r build/packages/*/ | 
 Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.    
 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this apart of just building the zip? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script builds the packages and then installs them (without the zip file). It would be briefly like:
elastic-package stack up -v -d # for each package elastic-package build -v --zip --sign elastic-package install -v elastic-package stack down -vThen, there is another script that builds the packages and installs them using the zip file (
scripts/test-install-zip.sh):And there is another script file, that just builds the zip file. Used specially for testing in Macos ARM:
elastic-package stack up -v -d # for each package elastic-package build -v --zip --sign elastic-package stack down -vProbably, they could be renamed so it is clear what they do. What about rename them as this? @jsoriano
scripts/test-build.zip.sh:scripts/test-build-install.shscripts/test-install.zip.sh:scripts/test-build-install-zip-file.shscripts/test-just-build-zip.sh:scripts/test-build.zip.shIf so, I could create a follow-up PR to rename those files as well as Makefile and buildkite scripts accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, these scripts are a bit confusing. Let's rename them in a follow up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created PR to rename test scripts: #2072