Exporting environment variables Exporting CI Exporting DISPLAY Exporting PAGER Exporting SEMAPHORE Exporting SEMAPHORE_AGENT_MACHINE_ENVIRONMENT_TYPE Exporting SEMAPHORE_AGENT_MACHINE_OS_IMAGE Exporting SEMAPHORE_AGENT_MACHINE_TYPE Exporting SEMAPHORE_ARTIFACT_TOKEN Exporting SEMAPHORE_CACHE_ARCHIVE_METHOD Exporting SEMAPHORE_CACHE_BACKEND Exporting SEMAPHORE_CACHE_PRIVATE_KEY_PATH Exporting SEMAPHORE_CACHE_URL Exporting SEMAPHORE_CACHE_USERNAME Exporting SEMAPHORE_GIT_BRANCH Exporting SEMAPHORE_GIT_COMMITTER Exporting SEMAPHORE_GIT_COMMIT_AUTHOR Exporting SEMAPHORE_GIT_COMMIT_RANGE Exporting SEMAPHORE_GIT_DIR Exporting SEMAPHORE_GIT_PROVIDER Exporting SEMAPHORE_GIT_REF Exporting SEMAPHORE_GIT_REF_TYPE Exporting SEMAPHORE_GIT_REPO_NAME Exporting SEMAPHORE_GIT_REPO_SLUG Exporting SEMAPHORE_GIT_SHA Exporting SEMAPHORE_GIT_URL Exporting SEMAPHORE_GIT_WORKING_BRANCH Exporting SEMAPHORE_JOB_CREATION_TIME Exporting SEMAPHORE_JOB_ID Exporting SEMAPHORE_JOB_NAME Exporting SEMAPHORE_JOB_TYPE Exporting SEMAPHORE_ORGANIZATION_URL Exporting SEMAPHORE_PIPELINE_0_ARTEFACT_ID Exporting SEMAPHORE_PIPELINE_ARTEFACT_ID Exporting SEMAPHORE_PIPELINE_ID Exporting SEMAPHORE_PIPELINE_PROMOTED_BY Exporting SEMAPHORE_PIPELINE_PROMOTION Exporting SEMAPHORE_PIPELINE_RERUN Exporting SEMAPHORE_PROJECT_ID Exporting SEMAPHORE_PROJECT_NAME Exporting SEMAPHORE_TOOLBOX_METRICS_ENABLED Exporting SEMAPHORE_WORKFLOW_HOOK_SOURCE Exporting SEMAPHORE_WORKFLOW_ID Exporting SEMAPHORE_WORKFLOW_NUMBER Exporting SEMAPHORE_WORKFLOW_RERUN Exporting SEMAPHORE_WORKFLOW_TRIGGERED_BY Exporting SEMAPHORE_WORKFLOW_TRIGGERED_BY_API Exporting SEMAPHORE_WORKFLOW_TRIGGERED_BY_HOOK Exporting SEMAPHORE_WORKFLOW_TRIGGERED_BY_MANUAL_RUN Exporting SEMAPHORE_WORKFLOW_TRIGGERED_BY_SCHEDULE Exporting SEMAPHORE_YAML_FILE_PATH Exporting SSH_PRIVATE_KEY_PATH Exporting TERM Injecting Files Injecting /home/semaphore/.ssh/semaphore_cache_key with file mode 0600 Injecting /home/semaphore/.ssh/id_rsa with file mode 0600 Running the pre-job hook configured in the agent Running: source /opt/semaphoreci/prejob/pre_job.sh Warning: The agent is configured to fail the job if the pre-job hook fails. Installing toolbox in pre-job-hook Toolbox download URL: http://packages.semaphoreci.com/toolbox/releases/download/v1.22.10/linux.tar Tar file: linux.tar Attempt 5 toolbox/ toolbox/sem-dockerize toolbox/toolbox toolbox/retry toolbox/enetwork toolbox/artifact toolbox/install-toolbox toolbox/system-metrics-collector toolbox/libcheckout toolbox/cache toolbox/when_otp_24 toolbox/spc toolbox/libchecksum toolbox/when_otp_26 toolbox/when_otp_25 toolbox/install-package toolbox/README.md toolbox/sem-context toolbox/test-results toolbox/sem-version toolbox/ssh-session-cli toolbox/sem-service toolbox/sem-install toolbox/sem-service-check-params toolbox/Dockerfile.dev toolbox/sem-semantic-release retry installed ssh-session-cli installed cache installed sem-context installed sem-service installed sem-dockerize installed sem-service-check-params installed sem-semantic-release installed Installing the artifacts CLI artifacts installed Installing the test results CLI test-results installed Installing the install-package for linux install-package installed Installing the SPC CLI spc installed Installing the when CLI when installed Installing the enetwork CLI enetwork installed Starting to collect System Metrics in /tmp/system-metrics Starting virtual X frame buffer: Xvfb. Toolbox installed Starting ssh-agent Agent pid 6329 ssh-agent started Connecting to cache # 116.202.32.43:29920 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11 # 116.202.32.43:29920 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11 # 116.202.32.43:29920 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11 # 116.202.32.43:29920 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11 # 116.202.32.43:29920 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11 Identity added: /home/semaphore/.ssh/semaphore_cache_key (/home/semaphore/.ssh/semaphore_cache_key) export GIT_LFS_SKIP_SMUDGE=1 checkout Performing shallow clone with depth: 50 Cloning into 'DevOps-Bash-tools'... Warning: Permanently added 'github.com,140.82.121.3' (ECDSA) to the list of known hosts. remote: Enumerating objects: 2015, done. remote: Counting objects: 0% (1/2015) remote: Counting objects: 1% (21/2015) remote: Counting objects: 2% (41/2015) remote: Counting objects: 3% (61/2015) remote: Counting objects: 4% (81/2015) remote: Counting objects: 5% (101/2015) remote: Counting objects: 6% (121/2015) remote: Counting objects: 7% (142/2015) remote: Counting objects: 8% (162/2015) remote: Counting objects: 9% (182/2015) remote: Counting objects: 10% (202/2015) remote: Counting objects: 11% (222/2015) remote: Counting objects: 12% (242/2015) remote: Counting objects: 13% (262/2015) remote: Counting objects: 14% (283/2015) remote: Counting objects: 15% (303/2015) remote: Counting objects: 16% (323/2015) remote: Counting objects: 17% (343/2015) remote: Counting objects: 18% (363/2015) remote: Counting objects: 19% (383/2015) remote: Counting objects: 20% (403/2015) remote: Counting objects: 21% (424/2015) remote: Counting objects: 22% (444/2015) remote: Counting objects: 23% (464/2015) remote: Counting objects: 24% (484/2015) remote: Counting objects: 25% (504/2015) remote: Counting objects: 26% (524/2015) remote: Counting objects: 27% (545/2015) remote: Counting objects: 28% (565/2015) remote: Counting objects: 29% (585/2015) remote: Counting objects: 30% (605/2015) remote: Counting objects: 31% (625/2015) remote: Counting objects: 32% (645/2015) remote: Counting objects: 33% (665/2015) remote: Counting objects: 34% (686/2015) remote: Counting objects: 35% (706/2015) remote: Counting objects: 36% (726/2015) remote: Counting objects: 37% (746/2015) remote: Counting objects: 38% (766/2015) remote: Counting objects: 39% (786/2015) remote: Counting objects: 40% (806/2015) remote: Counting objects: 41% (827/2015) remote: Counting objects: 42% (847/2015) remote: Counting objects: 43% (867/2015) remote: Counting objects: 44% (887/2015) remote: Counting objects: 45% (907/2015) remote: Counting objects: 46% (927/2015) remote: Counting objects: 47% (948/2015) remote: Counting objects: 48% (968/2015) remote: Counting objects: 49% (988/2015) remote: Counting objects: 50% (1008/2015) remote: Counting objects: 51% (1028/2015) remote: Counting objects: 52% (1048/2015) remote: Counting objects: 53% (1068/2015) remote: Counting objects: 54% (1089/2015) remote: Counting objects: 55% (1109/2015) remote: Counting objects: 56% (1129/2015) remote: Counting objects: 57% (1149/2015) remote: Counting objects: 58% (1169/2015) remote: Counting objects: 59% (1189/2015) remote: Counting objects: 60% (1209/2015) remote: Counting objects: 61% (1230/2015) remote: Counting objects: 62% (1250/2015) remote: Counting objects: 63% (1270/2015) remote: Counting objects: 64% (1290/2015) remote: Counting objects: 65% (1310/2015) remote: Counting objects: 66% (1330/2015) remote: Counting objects: 67% (1351/2015) remote: Counting objects: 68% (1371/2015) remote: Counting objects: 69% (1391/2015) remote: Counting objects: 70% (1411/2015) remote: Counting objects: 71% (1431/2015) remote: Counting objects: 72% (1451/2015) remote: Counting objects: 73% (1471/2015) remote: Counting objects: 74% (1492/2015) remote: Counting objects: 75% (1512/2015) remote: Counting objects: 76% (1532/2015) remote: Counting objects: 77% (1552/2015) remote: Counting objects: 78% (1572/2015) remote: Counting objects: 79% (1592/2015) remote: Counting objects: 80% (1612/2015) remote: Counting objects: 81% (1633/2015) remote: Counting objects: 82% (1653/2015) remote: Counting objects: 83% (1673/2015) remote: Counting objects: 84% (1693/2015) remote: Counting objects: 85% (1713/2015) remote: Counting objects: 86% (1733/2015) remote: Counting objects: 87% (1754/2015) remote: Counting objects: 88% (1774/2015) remote: Counting objects: 89% (1794/2015) remote: Counting objects: 90% (1814/2015) remote: Counting objects: 91% (1834/2015) remote: Counting objects: 92% (1854/2015) remote: Counting objects: 93% (1874/2015) remote: Counting objects: 94% (1895/2015) remote: Counting objects: 95% (1915/2015) remote: Counting objects: 96% (1935/2015) remote: Counting objects: 97% (1955/2015) remote: Counting objects: 98% (1975/2015) remote: Counting objects: 99% (1995/2015) remote: Counting objects: 100% (2015/2015) remote: Counting objects: 100% (2015/2015), done. remote: Compressing objects: 0% (1/1529) remote: Compressing objects: 1% (16/1529) remote: Compressing objects: 2% (31/1529) remote: Compressing objects: 3% (46/1529) remote: Compressing objects: 4% (62/1529) remote: Compressing objects: 5% (77/1529) remote: Compressing objects: 6% (92/1529) remote: Compressing objects: 7% (108/1529) remote: Compressing objects: 8% (123/1529) remote: Compressing objects: 9% (138/1529) remote: Compressing objects: 10% (153/1529) remote: Compressing objects: 11% (169/1529) remote: Compressing objects: 12% (184/1529) remote: Compressing objects: 13% (199/1529) remote: Compressing objects: 14% (215/1529) remote: Compressing objects: 15% (230/1529) remote: Compressing objects: 16% (245/1529) remote: Compressing objects: 17% (260/1529) remote: Compressing objects: 18% (276/1529) remote: Compressing objects: 19% (291/1529) remote: Compressing objects: 20% (306/1529) remote: Compressing objects: 21% (322/1529) remote: Compressing objects: 22% (337/1529) remote: Compressing objects: 23% (352/1529) remote: Compressing objects: 24% (367/1529) remote: Compressing objects: 25% (383/1529) remote: Compressing objects: 26% (398/1529) remote: Compressing objects: 27% (413/1529) remote: Compressing objects: 28% (429/1529) remote: Compressing objects: 29% (444/1529) remote: Compressing objects: 30% (459/1529) remote: Compressing objects: 31% (474/1529) remote: Compressing objects: 32% (490/1529) remote: Compressing objects: 33% (505/1529) remote: Compressing objects: 34% (520/1529) remote: Compressing objects: 35% (536/1529) remote: Compressing objects: 36% (551/1529) remote: Compressing objects: 37% (566/1529) remote: Compressing objects: 38% (582/1529) remote: Compressing objects: 39% (597/1529) remote: Compressing objects: 40% (612/1529) remote: Compressing objects: 41% (627/1529) remote: Compressing objects: 42% (643/1529) remote: Compressing objects: 43% (658/1529) remote: Compressing objects: 44% (673/1529) remote: Compressing objects: 45% (689/1529) remote: Compressing objects: 46% (704/1529) remote: Compressing objects: 47% (719/1529) remote: Compressing objects: 48% (734/1529) remote: Compressing objects: 49% (750/1529) remote: Compressing objects: 50% (765/1529) remote: Compressing objects: 51% (780/1529) remote: Compressing objects: 52% (796/1529) remote: Compressing objects: 53% (811/1529) remote: Compressing objects: 54% (826/1529) remote: Compressing objects: 55% (841/1529) remote: Compressing objects: 56% (857/1529) remote: Compressing objects: 57% (872/1529) remote: Compressing objects: 58% (887/1529) remote: Compressing objects: 59% (903/1529) remote: Compressing objects: 60% (918/1529) remote: Compressing objects: 61% (933/1529) remote: Compressing objects: 62% (948/1529) remote: Compressing objects: 63% (964/1529) remote: Compressing objects: 64% (979/1529) remote: Compressing objects: 65% (994/1529) remote: Compressing objects: 66% (1010/1529) remote: Compressing objects: 67% (1025/1529) remote: Compressing objects: 68% (1040/1529) remote: Compressing objects: 69% (1056/1529) remote: Compressing objects: 70% (1071/1529) remote: Compressing objects: 71% (1086/1529) remote: Compressing objects: 72% (1101/1529) remote: Compressing objects: 73% (1117/1529) remote: Compressing objects: 74% (1132/1529) remote: Compressing objects: 75% (1147/1529) remote: Compressing objects: 76% (1163/1529) remote: Compressing objects: 77% (1178/1529) remote: Compressing objects: 78% (1193/1529) remote: Compressing objects: 79% (1208/1529) remote: Compressing objects: 80% (1224/1529) remote: Compressing objects: 81% (1239/1529) remote: Compressing objects: 82% (1254/1529) remote: Compressing objects: 83% (1270/1529) remote: Compressing objects: 84% (1285/1529) remote: Compressing objects: 85% (1300/1529) remote: Compressing objects: 86% (1315/1529) remote: Compressing objects: 87% (1331/1529) remote: Compressing objects: 88% (1346/1529) remote: Compressing objects: 89% (1361/1529) remote: Compressing objects: 90% (1377/1529) remote: Compressing objects: 91% (1392/1529) remote: Compressing objects: 92% (1407/1529) remote: Compressing objects: 93% (1422/1529) remote: Compressing objects: 94% (1438/1529) remote: Compressing objects: 95% (1453/1529) remote: Compressing objects: 96% (1468/1529) remote: Compressing objects: 97% (1484/1529) remote: Compressing objects: 98% (1499/1529) remote: Compressing objects: 99% (1514/1529) remote: Compressing objects: 100% (1529/1529) remote: Compressing objects: 100% (1529/1529), done. Receiving objects: 0% (1/2015) Receiving objects: 1% (21/2015) Receiving objects: 2% (41/2015) Receiving objects: 3% (61/2015) Receiving objects: 4% (81/2015) Receiving objects: 5% (101/2015) Receiving objects: 6% (121/2015) Receiving objects: 7% (142/2015) Receiving objects: 8% (162/2015) Receiving objects: 9% (182/2015) Receiving objects: 10% (202/2015) Receiving objects: 11% (222/2015) Receiving objects: 12% (242/2015) Receiving objects: 13% (262/2015) Receiving objects: 14% (283/2015) Receiving objects: 15% (303/2015) Receiving objects: 16% (323/2015) Receiving objects: 17% (343/2015) Receiving objects: 18% (363/2015) Receiving objects: 19% (383/2015) Receiving objects: 20% (403/2015) Receiving objects: 21% (424/2015) Receiving objects: 22% (444/2015) Receiving objects: 23% (464/2015) Receiving objects: 24% (484/2015) Receiving objects: 25% (504/2015) Receiving objects: 26% (524/2015) Receiving objects: 27% (545/2015) Receiving objects: 28% (565/2015) Receiving objects: 29% (585/2015) Receiving objects: 30% (605/2015) Receiving objects: 31% (625/2015) Receiving objects: 32% (645/2015) Receiving objects: 33% (665/2015) Receiving objects: 34% (686/2015) Receiving objects: 35% (706/2015) Receiving objects: 36% (726/2015) Receiving objects: 37% (746/2015) Receiving objects: 38% (766/2015) Receiving objects: 39% (786/2015) Receiving objects: 40% (806/2015) Receiving objects: 41% (827/2015) Receiving objects: 42% (847/2015) Receiving objects: 43% (867/2015) Receiving objects: 44% (887/2015) Receiving objects: 45% (907/2015) Receiving objects: 46% (927/2015) Receiving objects: 47% (948/2015) Receiving objects: 48% (968/2015) Receiving objects: 49% (988/2015) Receiving objects: 50% (1008/2015) Receiving objects: 51% (1028/2015) Receiving objects: 52% (1048/2015) Receiving objects: 53% (1068/2015) Receiving objects: 54% (1089/2015) Receiving objects: 55% (1109/2015) Receiving objects: 56% (1129/2015) Receiving objects: 57% (1149/2015) Receiving objects: 58% (1169/2015) Receiving objects: 59% (1189/2015) Receiving objects: 60% (1209/2015) Receiving objects: 61% (1230/2015) Receiving objects: 62% (1250/2015) Receiving objects: 63% (1270/2015) Receiving objects: 64% (1290/2015) Receiving objects: 65% (1310/2015) Receiving objects: 66% (1330/2015) Receiving objects: 67% (1351/2015) Receiving objects: 68% (1371/2015) Receiving objects: 69% (1391/2015) Receiving objects: 70% (1411/2015) Receiving objects: 71% (1431/2015) Receiving objects: 72% (1451/2015) Receiving objects: 73% (1471/2015) Receiving objects: 74% (1492/2015) Receiving objects: 75% (1512/2015) Receiving objects: 76% (1532/2015) Receiving objects: 77% (1552/2015) Receiving objects: 78% (1572/2015) Receiving objects: 79% (1592/2015) Receiving objects: 80% (1612/2015) Receiving objects: 81% (1633/2015) Receiving objects: 82% (1653/2015) Receiving objects: 83% (1673/2015) Receiving objects: 84% (1693/2015) Receiving objects: 85% (1713/2015) Receiving objects: 86% (1733/2015) Receiving objects: 87% (1754/2015) Receiving objects: 88% (1774/2015) Receiving objects: 89% (1794/2015) Receiving objects: 90% (1814/2015) Receiving objects: 91% (1834/2015) Receiving objects: 92% (1854/2015) Receiving objects: 93% (1874/2015) Receiving objects: 94% (1895/2015) remote: Total 2015 (delta 815), reused 816 (delta 441), pack-reused 0 (from 0) Receiving objects: 95% (1915/2015) Receiving objects: 96% (1935/2015) Receiving objects: 97% (1955/2015) Receiving objects: 98% (1975/2015) Receiving objects: 99% (1995/2015) Receiving objects: 100% (2015/2015) Receiving objects: 100% (2015/2015), 1.64 MiB | 4.08 MiB/s, done. Resolving deltas: 0% (0/815) Resolving deltas: 1% (9/815) Resolving deltas: 2% (17/815) Resolving deltas: 3% (25/815) Resolving deltas: 4% (33/815) Resolving deltas: 5% (41/815) Resolving deltas: 6% (49/815) Resolving deltas: 7% (58/815) Resolving deltas: 8% (66/815) Resolving deltas: 9% (74/815) Resolving deltas: 10% (82/815) Resolving deltas: 11% (90/815) Resolving deltas: 12% (98/815) Resolving deltas: 13% (106/815) Resolving deltas: 14% (115/815) Resolving deltas: 15% (123/815) Resolving deltas: 16% (131/815) Resolving deltas: 17% (139/815) Resolving deltas: 18% (147/815) Resolving deltas: 19% (155/815) Resolving deltas: 20% (163/815) Resolving deltas: 21% (172/815) Resolving deltas: 22% (180/815) Resolving deltas: 23% (188/815) Resolving deltas: 24% (196/815) Resolving deltas: 25% (204/815) Resolving deltas: 26% (212/815) Resolving deltas: 27% (221/815) Resolving deltas: 28% (229/815) Resolving deltas: 29% (237/815) Resolving deltas: 30% (245/815) Resolving deltas: 31% (253/815) Resolving deltas: 32% (261/815) Resolving deltas: 33% (269/815) Resolving deltas: 34% (278/815) Resolving deltas: 35% (286/815) Resolving deltas: 36% (294/815) Resolving deltas: 37% (302/815) Resolving deltas: 38% (310/815) Resolving deltas: 39% (318/815) Resolving deltas: 40% (326/815) Resolving deltas: 41% (335/815) Resolving deltas: 42% (343/815) Resolving deltas: 43% (351/815) Resolving deltas: 44% (359/815) Resolving deltas: 45% (367/815) Resolving deltas: 46% (375/815) Resolving deltas: 47% (384/815) Resolving deltas: 48% (392/815) Resolving deltas: 49% (400/815) Resolving deltas: 50% (408/815) Resolving deltas: 51% (416/815) Resolving deltas: 52% (424/815) Resolving deltas: 53% (432/815) Resolving deltas: 54% (441/815) Resolving deltas: 55% (449/815) Resolving deltas: 56% (457/815) Resolving deltas: 57% (465/815) Resolving deltas: 58% (473/815) Resolving deltas: 59% (481/815) Resolving deltas: 60% (489/815) Resolving deltas: 61% (498/815) Resolving deltas: 62% (506/815) Resolving deltas: 63% (514/815) Resolving deltas: 64% (522/815) Resolving deltas: 65% (530/815) Resolving deltas: 66% (538/815) Resolving deltas: 67% (547/815) Resolving deltas: 68% (555/815) Resolving deltas: 69% (563/815) Resolving deltas: 70% (571/815) Resolving deltas: 71% (579/815) Resolving deltas: 72% (587/815) Resolving deltas: 73% (595/815) Resolving deltas: 74% (604/815) Resolving deltas: 75% (612/815) Resolving deltas: 76% (620/815) Resolving deltas: 77% (628/815) Resolving deltas: 78% (636/815) Resolving deltas: 79% (644/815) Resolving deltas: 80% (652/815) Resolving deltas: 81% (661/815) Resolving deltas: 82% (669/815) Resolving deltas: 83% (677/815) Resolving deltas: 84% (685/815) Resolving deltas: 85% (693/815) Resolving deltas: 86% (701/815) Resolving deltas: 87% (710/815) Resolving deltas: 88% (718/815) Resolving deltas: 89% (726/815) Resolving deltas: 90% (734/815) Resolving deltas: 91% (742/815) Resolving deltas: 92% (750/815) Resolving deltas: 93% (758/815) Resolving deltas: 94% (767/815) Resolving deltas: 95% (775/815) Resolving deltas: 96% (783/815) Resolving deltas: 97% (791/815) Resolving deltas: 98% (799/815) Resolving deltas: 99% (807/815) Resolving deltas: 100% (815/815) Resolving deltas: 100% (815/815), done. HEAD is now at 669a546 updated git_push_stats.sh export INPUT_FILE="$SEMAPHORE_YAML_FILE_PATH" export OUTPUT_FILE="${SEMAPHORE_YAML_FILE_PATH}.output.yml" export LOGS_FILE="${SEMAPHORE_YAML_FILE_PATH}.logs.jsonl" cat $INPUT_FILE # # Author: Hari Sekhon # Date: 2020-03-16 14:02:53 +0000 (Mon, 16 Mar 2020) # # vim:ts=2:sts=2:sw=2:et # # https://github.com/HariSekhon/DevOps-Bash-tools # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish # # https://www.linkedin.com/in/HariSekhon # # ============================================================================ # # S e m a p h o r e C I # ============================================================================ # # https://docs.semaphoreci.com/reference/pipeline-yaml-reference/ version: v1.0 name: DevOps-Bash-tools agent: # https://docs.semaphoreci.com/reference/machine-types#linux machine: type: e1-standard-2 os_image: ubuntu2004 execution_time_limit: hours: 3 blocks: - name: Linux build run: when: "branch = 'master' AND change_in('/', {exclude: ['**/*.md']})" #execution_time_limit: # hours: 2 task: #env_vars: # $PATH selects /usr/bin/python and /usr/local/bin/pip which are mismatched versions of Python #- name: PYTHON # value: python3 #- name: PIP # value: pip3 prologue: commands: - cache restore # prevents it getting stuck on config merge prompt on installing openssh-client pulling in openssh-server # # causes error: # # Not replacing deleted config file /etc/ssh/sshd_config # #- sudo rm -f /etc/ssh/sshd_config - export DEBIAN_FRONTEND=noninteractive - sudo -E apt-get update - sudo -E apt-get upgrade -y -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confnew" - sudo dpkg --configure -a --force-confmiss --force-confnew #- echo "openssh-server openssh-server/conffile-diff select keep" | sudo debconf-set-selections #- sudo dpkg --configure -a --force-confdef --force-confold #- sudo apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" - sudo apt-get install -y openssh-server # each job is separate and could be run on a separate machine so all steps must be together jobs: - name: build commands: - checkout - setup/ci_bootstrap.sh - make init - make ci - make test epilogue: commands: - cache store - name: Mac build run: when: "branch = 'master'" task: # because otherwise on Mac it uses /usr/bin/python (2.7) but /usr/local/bin/pip (python 3.8) #env_vars: # to match /usr/local/bin/pip version from $PATH #- name: PYTHON # value: python3 # must be quoted to force string, otherwise pipeline fails to run with this parsing error: # Error: [{"Type mismatch. Expected String but got Integer.", "#/blocks/1/task/env_vars/1/value"}] #- name: DEBUG # value: "1" agent: # https://docs.semaphoreci.com/reference/machine-types#macos machine: type: a1-standard-4 os_image: macos-xcode15 prologue: commands: - cache restore # fix for: # pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. - brew install openssl - brew reinstall python - brew reinstall wget # avoid Mac SSL errors: # # ERROR: Loading command: install (LoadError) # dlopen(/Users/semaphore/.rbenv/versions/2.5.1/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib # Referenced from: /Users/semaphore/.rbenv/versions/2.5.1/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle # Reason: image not found - /Users/semaphore/.rbenv/versions/2.5.1/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle # ERROR: While executing gem ... (NoMethodError) # undefined method `invoke_with_build_args' for nil:NilClass# # - rbenv global system # also considered this: # - for version in $(rbenv versions | grep -v system | sed 's/^\*//'); do yes | rbenv uninstall "$version"; rbenv install "$version"; done # # fix for python vs pip version mismatch - ln -svf -- /usr/local/bin/python3 /usr/local/bin/python jobs: - name: build commands: - checkout - make init - make ci - make test epilogue: commands: - cache store echo "Compiling $INPUT_FILE into $OUTPUT_FILE and storring logs to $LOGS_FILE" Compiling .semaphore/semaphore.yml into .semaphore/semaphore.yml.output.yml and storring logs to .semaphore/semaphore.yml.logs.jsonl spc compile --input $INPUT_FILE --output $OUTPUT_FILE --logs $LOGS_FILE Extracting commands from commands_files in .semaphore/semaphore.yml. Found commands_file fields at 0 locations. Extracting commands from commands_files. Evaluating template expressions in .semaphore/semaphore.yml. Found template expressions at 0 locations. Substituting templates with their values. Evaluating change_in expressions in .semaphore/semaphore.yml. Found when expressions at 2 locations. 001 | Location: [blocks 0 run when] | File: .semaphore/semaphore.yml | Expression: branch = 'master' AND change_in('/', {exclude: ['**/*.md']}) 002 | Location: [blocks 1 run when] | File: .semaphore/semaphore.yml | Expression: branch = 'master' Evaluating when expressions. 001 | When Expression: branch = 'master' AND change_in('/', {exclude: ['**/*.md']}) | | change_in(["/",{"exclude":["**/*.md"]}]) | Running git diff --shortstat acc56a7e4ab5faf64ac73952978ab00804621ece...669a546882b8b4cbb7ef8767c87d445f25da7f3d | Running git diff --name-only acc56a7e4ab5faf64ac73952978ab00804621ece...669a546882b8b4cbb7ef8767c87d445f25da7f3d | | Comparing change_in with git diff | (match) git/git_push_stats.sh | | Result: true 002 | When Expression: branch = 'master' Exporting environment variables Exporting SEMAPHORE_JOB_RESULT export BASE_NAME=$SEMAPHORE_PIPELINE_ID-$(basename $INPUT_FILE) export ARTIFACT_LOG_DESTINATION="compilation/$BASE_NAME.logs" echo "Uploading $LOGS_FILE into $ARTIFACT_LOG_DESTINATION" Uploading .semaphore/semaphore.yml.logs.jsonl into compilation/3206b8d0-545f-4c6a-ba15-3b3988058644-semaphore.yml.logs artifact push workflow $LOGS_FILE -d $ARTIFACT_LOG_DESTINATION [Mar 15 13:07:00.991] Successfully pushed artifact for current workflow. [Mar 15 13:07:00.991] * Local source: .semaphore/semaphore.yml.logs.jsonl. [Mar 15 13:07:00.992] * Remote destination: artifacts/workflows/8b1958fe-3520-4ba6-a9b7-d4631183f57d/compilation/3206b8d0-545f-4c6a-ba15-3b3988058644-semaphore.yml.logs. export ARTIFACT_YAML_DESTINATION="compilation/$BASE_NAME" echo "Uploading $OUTPUT_FILE into $ARTIFACT_YAML_DESTINATION" Uploading .semaphore/semaphore.yml.output.yml into compilation/3206b8d0-545f-4c6a-ba15-3b3988058644-semaphore.yml artifact push workflow $OUTPUT_FILE -d $ARTIFACT_YAML_DESTINATION [Mar 15 13:07:01.588] Successfully pushed artifact for current workflow. [Mar 15 13:07:01.589] * Local source: .semaphore/semaphore.yml.output.yml. [Mar 15 13:07:01.589] * Remote destination: artifacts/workflows/8b1958fe-3520-4ba6-a9b7-d4631183f57d/compilation/3206b8d0-545f-4c6a-ba15-3b3988058644-semaphore.yml.