Exporting environment variables
Exporting CI
Exporting DATABASE_URL
Exporting DISPLAY
Exporting PAGER
Exporting RAILS_ENV
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_PR_BRANCH
Exporting SEMAPHORE_GIT_PR_NAME
Exporting SEMAPHORE_GIT_PR_NUMBER
Exporting SEMAPHORE_GIT_PR_SHA
Exporting SEMAPHORE_GIT_PR_SLUG
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_COUNT
Exporting SEMAPHORE_JOB_CREATION_TIME
Exporting SEMAPHORE_JOB_ID
Exporting SEMAPHORE_JOB_INDEX
Exporting SEMAPHORE_JOB_NAME
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 SSH_PRIVATE_KEY_PATH
Exporting TB_RSPEC_OPTIONS
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.21.7/linux.tar
Tar file: linux.tar
Attempt 5
toolbox/
toolbox/README.md
toolbox/spc
toolbox/sem-service-check-params
toolbox/retry
toolbox/sem-context
toolbox/sem-semantic-release
toolbox/libcheckout
toolbox/sem-dockerize
toolbox/enetwork
toolbox/when
toolbox/sem-service
toolbox/sem-install
toolbox/ssh-session-cli
toolbox/sem-version
toolbox/libchecksum
toolbox/Dockerfile.dev
toolbox/cache
toolbox/test-results
toolbox/install-package
toolbox/toolbox
toolbox/system-metrics-collector
toolbox/install-toolbox
toolbox/artifact
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 2710
ssh-agent started
Connecting to cache
# 94.130.123.200:29920 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.7
# 94.130.123.200:29920 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.7
# 94.130.123.200:29920 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.7
# 94.130.123.200:29920 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.7
# 94.130.123.200:29920 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.7
Identity added: /home/semaphore/.ssh/semaphore_cache_key (/home/semaphore/.ssh/semaphore_cache_key)
checkout
Cloning into 'simple-server'...
Warning: Permanently added 'github.com,140.82.121.4' (ECDSA) to the list of known hosts.
remote: Enumerating objects: 2573, done.
remote: Counting objects:   0% (1/2573)
remote: Counting objects:   1% (26/2573)
remote: Counting objects:   2% (52/2573)
remote: Counting objects:   3% (78/2573)
remote: Counting objects:   4% (103/2573)
remote: Counting objects:   5% (129/2573)
remote: Counting objects:   6% (155/2573)
remote: Counting objects:   7% (181/2573)
remote: Counting objects:   8% (206/2573)
remote: Counting objects:   9% (232/2573)
remote: Counting objects:  10% (258/2573)
remote: Counting objects:  11% (284/2573)
remote: Counting objects:  12% (309/2573)
remote: Counting objects:  13% (335/2573)
remote: Counting objects:  14% (361/2573)
remote: Counting objects:  15% (386/2573)
remote: Counting objects:  16% (412/2573)
remote: Counting objects:  17% (438/2573)
remote: Counting objects:  18% (464/2573)
remote: Counting objects:  19% (489/2573)
remote: Counting objects:  20% (515/2573)
remote: Counting objects:  21% (541/2573)
remote: Counting objects:  22% (567/2573)
remote: Counting objects:  23% (592/2573)
remote: Counting objects:  24% (618/2573)
remote: Counting objects:  25% (644/2573)
remote: Counting objects:  26% (669/2573)
remote: Counting objects:  27% (695/2573)
remote: Counting objects:  28% (721/2573)
remote: Counting objects:  29% (747/2573)
remote: Counting objects:  30% (772/2573)
remote: Counting objects:  31% (798/2573)
remote: Counting objects:  32% (824/2573)
remote: Counting objects:  33% (850/2573)
remote: Counting objects:  34% (875/2573)
remote: Counting objects:  35% (901/2573)
remote: Counting objects:  36% (927/2573)
remote: Counting objects:  37% (953/2573)
remote: Counting objects:  38% (978/2573)
remote: Counting objects:  39% (1004/2573)
remote: Counting objects:  40% (1030/2573)
remote: Counting objects:  41% (1055/2573)
remote: Counting objects:  42% (1081/2573)
remote: Counting objects:  43% (1107/2573)
remote: Counting objects:  44% (1133/2573)
remote: Counting objects:  45% (1158/2573)
remote: Counting objects:  46% (1184/2573)
remote: Counting objects:  47% (1210/2573)
remote: Counting objects:  48% (1236/2573)
remote: Counting objects:  49% (1261/2573)
remote: Counting objects:  50% (1287/2573)
remote: Counting objects:  51% (1313/2573)
remote: Counting objects:  52% (1338/2573)
remote: Counting objects:  53% (1364/2573)
remote: Counting objects:  54% (1390/2573)
remote: Counting objects:  55% (1416/2573)
remote: Counting objects:  56% (1441/2573)
remote: Counting objects:  57% (1467/2573)
remote: Counting objects:  58% (1493/2573)
remote: Counting objects:  59% (1519/2573)
remote: Counting objects:  60% (1544/2573)
remote: Counting objects:  61% (1570/2573)
remote: Counting objects:  62% (1596/2573)
remote: Counting objects:  63% (1621/2573)
remote: Counting objects:  64% (1647/2573)
remote: Counting objects:  65% (1673/2573)
remote: Counting objects:  66% (1699/2573)
remote: Counting objects:  67% (1724/2573)
remote: Counting objects:  68% (1750/2573)
remote: Counting objects:  69% (1776/2573)
remote: Counting objects:  70% (1802/2573)
remote: Counting objects:  71% (1827/2573)
remote: Counting objects:  72% (1853/2573)
remote: Counting objects:  73% (1879/2573)
remote: Counting objects:  74% (1905/2573)
remote: Counting objects:  75% (1930/2573)
remote: Counting objects:  76% (1956/2573)
remote: Counting objects:  77% (1982/2573)
remote: Counting objects:  78% (2007/2573)
remote: Counting objects:  79% (2033/2573)
remote: Counting objects:  80% (2059/2573)
remote: Counting objects:  81% (2085/2573)
remote: Counting objects:  82% (2110/2573)
remote: Counting objects:  83% (2136/2573)
remote: Counting objects:  84% (2162/2573)
remote: Counting objects:  85% (2188/2573)
remote: Counting objects:  86% (2213/2573)
remote: Counting objects:  87% (2239/2573)
remote: Counting objects:  88% (2265/2573)
remote: Counting objects:  89% (2290/2573)
remote: Counting objects:  90% (2316/2573)
remote: Counting objects:  91% (2342/2573)
remote: Counting objects:  92% (2368/2573)
remote: Counting objects:  93% (2393/2573)
remote: Counting objects:  94% (2419/2573)
remote: Counting objects:  95% (2445/2573)
remote: Counting objects:  96% (2471/2573)
remote: Counting objects:  97% (2496/2573)
remote: Counting objects:  98% (2522/2573)
remote: Counting objects:  99% (2548/2573)
remote: Counting objects: 100% (2573/2573)
remote: Counting objects: 100% (2573/2573), done.
remote: Compressing objects:   0% (1/2172)
remote: Compressing objects:   1% (22/2172)
remote: Compressing objects:   2% (44/2172)
remote: Compressing objects:   3% (66/2172)
remote: Compressing objects:   4% (87/2172)
remote: Compressing objects:   5% (109/2172)
remote: Compressing objects:   6% (131/2172)
remote: Compressing objects:   7% (153/2172)
remote: Compressing objects:   8% (174/2172)
remote: Compressing objects:   9% (196/2172)
remote: Compressing objects:  10% (218/2172)
remote: Compressing objects:  11% (239/2172)
remote: Compressing objects:  12% (261/2172)
remote: Compressing objects:  13% (283/2172)
remote: Compressing objects:  14% (305/2172)
remote: Compressing objects:  15% (326/2172)
remote: Compressing objects:  16% (348/2172)
remote: Compressing objects:  17% (370/2172)
remote: Compressing objects:  18% (391/2172)
remote: Compressing objects:  19% (413/2172)
remote: Compressing objects:  20% (435/2172)
remote: Compressing objects:  21% (457/2172)
remote: Compressing objects:  22% (478/2172)
remote: Compressing objects:  23% (500/2172)
remote: Compressing objects:  24% (522/2172)
remote: Compressing objects:  25% (543/2172)
remote: Compressing objects:  26% (565/2172)
remote: Compressing objects:  27% (587/2172)
remote: Compressing objects:  28% (609/2172)
remote: Compressing objects:  29% (630/2172)
remote: Compressing objects:  30% (652/2172)
remote: Compressing objects:  31% (674/2172)
remote: Compressing objects:  32% (696/2172)
remote: Compressing objects:  33% (717/2172)
remote: Compressing objects:  34% (739/2172)
remote: Compressing objects:  35% (761/2172)
remote: Compressing objects:  36% (782/2172)
remote: Compressing objects:  37% (804/2172)
remote: Compressing objects:  38% (826/2172)
remote: Compressing objects:  39% (848/2172)
remote: Compressing objects:  40% (869/2172)
remote: Compressing objects:  41% (891/2172)
remote: Compressing objects:  42% (913/2172)
remote: Compressing objects:  43% (934/2172)
remote: Compressing objects:  44% (956/2172)
remote: Compressing objects:  45% (978/2172)
remote: Compressing objects:  46% (1000/2172)
remote: Compressing objects:  47% (1021/2172)
remote: Compressing objects:  48% (1043/2172)
remote: Compressing objects:  49% (1065/2172)
remote: Compressing objects:  50% (1086/2172)
remote: Compressing objects:  51% (1108/2172)
remote: Compressing objects:  52% (1130/2172)
remote: Compressing objects:  53% (1152/2172)
remote: Compressing objects:  54% (1173/2172)
remote: Compressing objects:  55% (1195/2172)
remote: Compressing objects:  56% (1217/2172)
remote: Compressing objects:  57% (1239/2172)
remote: Compressing objects:  58% (1260/2172)
remote: Compressing objects:  59% (1282/2172)
remote: Compressing objects:  60% (1304/2172)
remote: Compressing objects:  61% (1325/2172)
remote: Compressing objects:  62% (1347/2172)
remote: Compressing objects:  63% (1369/2172)
remote: Compressing objects:  64% (1391/2172)
remote: Compressing objects:  65% (1412/2172)
remote: Compressing objects:  66% (1434/2172)
remote: Compressing objects:  67% (1456/2172)
remote: Compressing objects:  68% (1477/2172)
remote: Compressing objects:  69% (1499/2172)
remote: Compressing objects:  70% (1521/2172)
remote: Compressing objects:  71% (1543/2172)
remote: Compressing objects:  72% (1564/2172)
remote: Compressing objects:  73% (1586/2172)
remote: Compressing objects:  74% (1608/2172)
remote: Compressing objects:  75% (1629/2172)
remote: Compressing objects:  76% (1651/2172)
remote: Compressing objects:  77% (1673/2172)
remote: Compressing objects:  78% (1695/2172)
remote: Compressing objects:  79% (1716/2172)
remote: Compressing objects:  80% (1738/2172)
remote: Compressing objects:  81% (1760/2172)
remote: Compressing objects:  82% (1782/2172)
remote: Compressing objects:  83% (1803/2172)
remote: Compressing objects:  84% (1825/2172)
remote: Compressing objects:  85% (1847/2172)
remote: Compressing objects:  86% (1868/2172)
remote: Compressing objects:  87% (1890/2172)
remote: Compressing objects:  88% (1912/2172)
remote: Compressing objects:  89% (1934/2172)
remote: Compressing objects:  90% (1955/2172)
remote: Compressing objects:  91% (1977/2172)
remote: Compressing objects:  92% (1999/2172)
remote: Compressing objects:  93% (2020/2172)
remote: Compressing objects:  94% (2042/2172)
remote: Compressing objects:  95% (2064/2172)
remote: Compressing objects:  96% (2086/2172)
remote: Compressing objects:  97% (2107/2172)
remote: Compressing objects:  98% (2129/2172)
remote: Compressing objects:  99% (2151/2172)
remote: Compressing objects: 100% (2172/2172)
remote: Compressing objects: 100% (2172/2172), done.
Receiving objects:   0% (1/2573)
Receiving objects:   1% (26/2573)
Receiving objects:   2% (52/2573)
Receiving objects:   3% (78/2573)
Receiving objects:   4% (103/2573)
Receiving objects:   5% (129/2573)
Receiving objects:   6% (155/2573)
Receiving objects:   7% (181/2573)
Receiving objects:   8% (206/2573)
Receiving objects:   9% (232/2573)
Receiving objects:  10% (258/2573)
Receiving objects:  11% (284/2573)
Receiving objects:  12% (309/2573)
Receiving objects:  13% (335/2573)
Receiving objects:  14% (361/2573)
Receiving objects:  15% (386/2573)
Receiving objects:  16% (412/2573)
Receiving objects:  17% (438/2573)
Receiving objects:  18% (464/2573)
Receiving objects:  19% (489/2573)
Receiving objects:  20% (515/2573)
Receiving objects:  21% (541/2573)
Receiving objects:  22% (567/2573)
Receiving objects:  23% (592/2573)
Receiving objects:  24% (618/2573)
Receiving objects:  25% (644/2573)
Receiving objects:  26% (669/2573)
Receiving objects:  27% (695/2573)
Receiving objects:  28% (721/2573)
Receiving objects:  29% (747/2573)
Receiving objects:  30% (772/2573)
Receiving objects:  31% (798/2573)
Receiving objects:  32% (824/2573)
Receiving objects:  33% (850/2573)
Receiving objects:  34% (875/2573)
Receiving objects:  35% (901/2573)
Receiving objects:  36% (927/2573)
Receiving objects:  37% (953/2573)
Receiving objects:  38% (978/2573)
Receiving objects:  39% (1004/2573)
Receiving objects:  40% (1030/2573)
Receiving objects:  41% (1055/2573)
Receiving objects:  42% (1081/2573)
Receiving objects:  43% (1107/2573)
Receiving objects:  44% (1133/2573)
Receiving objects:  45% (1158/2573)
Receiving objects:  46% (1184/2573)
Receiving objects:  47% (1210/2573)
Receiving objects:  48% (1236/2573)
Receiving objects:  49% (1261/2573)
Receiving objects:  50% (1287/2573)
Receiving objects:  51% (1313/2573)
Receiving objects:  52% (1338/2573)
Receiving objects:  53% (1364/2573), 1.92 MiB | 3.78 MiB/s
Receiving objects:  54% (1390/2573), 1.92 MiB | 3.78 MiB/s
Receiving objects:  55% (1416/2573), 1.92 MiB | 3.78 MiB/s
Receiving objects:  55% (1419/2573), 4.78 MiB | 4.56 MiB/s
Receiving objects:  56% (1441/2573), 4.78 MiB | 4.56 MiB/s
Receiving objects:  57% (1467/2573), 4.78 MiB | 4.56 MiB/s
Receiving objects:  58% (1493/2573), 4.78 MiB | 4.56 MiB/s
Receiving objects:  59% (1519/2573), 4.78 MiB | 4.56 MiB/s
Receiving objects:  60% (1544/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  61% (1570/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  62% (1596/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  63% (1621/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  64% (1647/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  65% (1673/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  66% (1699/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  67% (1724/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  68% (1750/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  69% (1776/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  70% (1802/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  71% (1827/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  72% (1853/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  73% (1879/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  74% (1905/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  75% (1930/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  76% (1956/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  77% (1982/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  78% (2007/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  79% (2033/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  80% (2059/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  81% (2085/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  82% (2110/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  83% (2136/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  84% (2162/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  85% (2188/2573), 8.38 MiB | 5.41 MiB/s
remote: Total 2573 (delta 625), reused 1332 (delta 307), pack-reused 0
Receiving objects:  86% (2213/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  87% (2239/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  88% (2265/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  89% (2290/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  90% (2316/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  91% (2342/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  92% (2368/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  93% (2393/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  94% (2419/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  95% (2445/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  96% (2471/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  97% (2496/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  98% (2522/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects:  99% (2548/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects: 100% (2573/2573), 8.38 MiB | 5.41 MiB/s
Receiving objects: 100% (2573/2573), 10.07 MiB | 5.42 MiB/s, done.
Resolving deltas:   0% (0/625)
Resolving deltas:   1% (7/625)
Resolving deltas:   2% (14/625)
Resolving deltas:   3% (19/625)
Resolving deltas:   4% (26/625)
Resolving deltas:   5% (33/625)
Resolving deltas:   6% (38/625)
Resolving deltas:   7% (44/625)
Resolving deltas:   8% (50/625)
Resolving deltas:   9% (57/625)
Resolving deltas:  10% (63/625)
Resolving deltas:  11% (69/625)
Resolving deltas:  12% (75/625)
Resolving deltas:  13% (82/625)
Resolving deltas:  14% (88/625)
Resolving deltas:  15% (94/625)
Resolving deltas:  16% (100/625)
Resolving deltas:  17% (107/625)
Resolving deltas:  18% (113/625)
Resolving deltas:  19% (119/625)
Resolving deltas:  20% (125/625)
Resolving deltas:  21% (132/625)
Resolving deltas:  22% (138/625)
Resolving deltas:  23% (144/625)
Resolving deltas:  24% (150/625)
Resolving deltas:  25% (157/625)
Resolving deltas:  26% (163/625)
Resolving deltas:  27% (169/625)
Resolving deltas:  28% (177/625)
Resolving deltas:  29% (182/625)
Resolving deltas:  30% (188/625)
Resolving deltas:  31% (194/625)
Resolving deltas:  32% (200/625)
Resolving deltas:  33% (208/625)
Resolving deltas:  34% (213/625)
Resolving deltas:  35% (219/625)
Resolving deltas:  36% (225/625)
Resolving deltas:  37% (232/625)
Resolving deltas:  38% (238/625)
Resolving deltas:  39% (244/625)
Resolving deltas:  40% (250/625)
Resolving deltas:  41% (258/625)
Resolving deltas:  42% (264/625)
Resolving deltas:  43% (270/625)
Resolving deltas:  44% (275/625)
Resolving deltas:  45% (282/625)
Resolving deltas:  46% (289/625)
Resolving deltas:  47% (294/625)
Resolving deltas:  48% (300/625)
Resolving deltas:  49% (307/625)
Resolving deltas:  50% (313/625)
Resolving deltas:  51% (319/625)
Resolving deltas:  52% (325/625)
Resolving deltas:  53% (332/625)
Resolving deltas:  54% (338/625)
Resolving deltas:  55% (344/625)
Resolving deltas:  56% (350/625)
Resolving deltas:  57% (357/625)
Resolving deltas:  58% (364/625)
Resolving deltas:  59% (369/625)
Resolving deltas:  60% (375/625)
Resolving deltas:  61% (382/625)
Resolving deltas:  62% (388/625)
Resolving deltas:  63% (394/625)
Resolving deltas:  64% (400/625)
Resolving deltas:  65% (407/625)
Resolving deltas:  66% (413/625)
Resolving deltas:  67% (419/625)
Resolving deltas:  68% (425/625)
Resolving deltas:  69% (432/625)
Resolving deltas:  70% (438/625)
Resolving deltas:  71% (444/625)
Resolving deltas:  72% (450/625)
Resolving deltas:  73% (457/625)
Resolving deltas:  74% (463/625)
Resolving deltas:  75% (469/625)
Resolving deltas:  76% (475/625)
Resolving deltas:  77% (482/625)
Resolving deltas:  78% (488/625)
Resolving deltas:  79% (494/625)
Resolving deltas:  80% (500/625)
Resolving deltas:  81% (507/625)
Resolving deltas:  82% (513/625)
Resolving deltas:  83% (520/625)
Resolving deltas:  84% (525/625)
Resolving deltas:  85% (532/625)
Resolving deltas:  86% (538/625)
Resolving deltas:  87% (544/625)
Resolving deltas:  88% (550/625)
Resolving deltas:  89% (557/625)
Resolving deltas:  90% (563/625)
Resolving deltas:  91% (569/625)
Resolving deltas:  92% (575/625)
Resolving deltas:  93% (582/625)
Resolving deltas:  94% (588/625)
Resolving deltas:  95% (594/625)
Resolving deltas:  96% (600/625)
Resolving deltas:  97% (607/625)
Resolving deltas:  98% (613/625)
Resolving deltas:  99% (619/625)
Resolving deltas: 100% (625/625)
Resolving deltas: 100% (625/625), done.
HEAD is now at 8359c078a68aea0a6b944661099f811b8ef519d4
script/semaphore_setup
checksum () {  DIST=$(uname);
 case $DIST in 
 Darwin)
 md5 $1 | tr -d " " | awk -F= {'print $2'}
 ;;
 Linux)
 md5sum $1 | awk '{ print $1 }'
 ;;
 *)
 echo "Unsupported distro $DIST";
 exit 1
 ;;
 esac
}
checkout () {  local use_cache=${1:-""};
 if [ -z "${SEMAPHORE_GIT_BRANCH}" ] || [ -z "${SEMAPHORE_GIT_URL}" ] || [ -z "${SEMAPHORE_GIT_DIR}" ] || [ -z "${SEMAPHORE_GIT_SHA}" ]; then
 checkout::validation_message;
 return 1;
 fi;
 rm -rf "$SEMAPHORE_GIT_DIR";
 if [ "$use_cache" = "--use-cache" ]; then
 echo "[Experimental stability] Using cached Git repository.";
 checkout::use_cache;
 else
 if [ -n "${SEMAPHORE_GIT_REF_TYPE:-}" ]; then
 checkout::refbased;
 else
 checkout::shallow;
 fi;
 exit_code=$?;
 if [ "$exit_code" -ne "0" ]; then
 checkout::metric 0;
 fi;
 return $exit_code;
 fi
}
#!/bin/bash -v
set -e

# See https://github.com/semaphoreci/toolbox for more details on the "sem-" commands
source ~/.toolbox/toolbox
source ~/.toolbox/sem-install
#!/bin/bash

install::package_url() {
  DIST=$(uname)
  [[ $(uname -m) =~ "aarch" ]] && SEMAPHORE_ARCH="arm/" || SEMAPHORE_ARCH=""
  case $DIST in
    Linux)
      echo "http://packages.semaphoreci.com/${SEMAPHORE_ARCH}$(lsb_release -cs)"
      ;;
    Darwin)
      echo "http://packagesmac.semaphoreci.com/mac"
      ;;
    *)
      echo "Unsupported distro $DIST"
      exit 1
      ;;
  esac
}

install::available() {
  response=$(curl --write-out %{http_code} --head --silent --output /dev/null $(install::package_url)/${language}/${language_version}.tar.gz)
  if [[ $response -ne 200 ]]; then
    echo 1
  else
    echo 0
  fi
}

install::download() {
  curl --silent $(install::package_url)/${language}/${language_version}.tar.gz --output ${language_version}.tar.gz
}

install::install_node() {
  NVM_NODEJS_ORG_MIRROR=http://nodejs.semaphoreci.com/dist nvm install ${language_version}
  nvm use ${language_version} && npm install -g grunt-cli
  result="$?"
  sudo ln -fs "$(which node)" /usr/bin/nodejs
  return $result
}

install::install_ruby() {
  if [[ $(install::available) -eq 1 ]] ; then
    rbenv install -s ${language_version}
    rbenv global ${language_version}
    gem update system
    gem install bundler:2.0.1 --no-document
  else
    install::download
    tar -zxf ${language_version}.tar.gz
    rm -rf ${language_version}.tar.gz
    mv ${language_version} ~/.rbenv/versions/
  fi
  rbenv rehash
  return $?
}
install::install_erlang() {
  if [[ $(install::available) -eq 1 ]] ; then
    export KERL_BUILD_BACKEND=git
    export OTP_GITHUB_URL='https://github.com/erlang/otp'
    kerl update releases
    kerl build "${language_version}" "${language_version}"
    kerl install "${language_version}" ~/.kerl/installs/"${language_version}"
    echo "${language_version} /home/semaphore/.kerl/installs/${language_version}">> ~/.kerl/otp_installations
  else
    install::download
    tar -zxf ./"${language_version}".tar.gz && rm -rf ./"${language_version}".tar.gz
    mv ./"${language_version}" ~/.kerl/installs/
    echo "${language_version} /home/semaphore/.kerl/installs/${language_version}">> ~/.kerl/otp_installations
  fi
  return $?
}

install::install_elixir() {
  response1=$(curl --write-out %{http_code} --head --silent --output /dev/null $(install::package_url)/${language}/elixirs_${language_version}.tar.gz)
  response2=$(curl --write-out %{http_code} --head --silent --output /dev/null $(install::package_url)/${language}/archives_${language_version}.tar.gz)
  case ${language_version} in
      "1.6"*)
        local erlang_version="20.3"
        ;;
      "1.7"* | "1.8"* | "1.9"* | "1.10"*)
        local erlang_version="22.3"
        ;;
      "1.11"*)
        local erlang_version="23.3"
        ;;
      "1.12"*)
        local erlang_version="24.3"
        ;;
      "1.13"*)
        local erlang_version="24.3"
        ;;
      "1.14"*)
        local erlang_version="25.3"
        ;;
      "1.15"* | "1.16"*)
        local erlang_version="26.2"
        ;;
      *)
        echo "Installation of '${language}' version '${language_version}' is not yet supported"
        return 1;
        ;;
  esac
  if [[ $(kerl list installations) != *"${erlang_version}"* ]]; then
    language_before=${language}
    language_version_before=${language_version}
    language="erlang"
    language_version=${erlang_version}
    install::install_erlang
    language=${language_before}
    language_version=${language_version_before}
  fi
  if [[ $response1 -ne 200 ]] || [[ $response2 -ne 200 ]]; then
    . ~/.kerl/installs/${erlang_version}/activate
    kiex install ${language_version}
    kiex use ${language_version}
    mix local.hex --force
  else
    curl --silent $(install::package_url)/${language}/elixirs_${language_version}.tar.gz --output elixirs_${language_version}.tar.gz
    curl --silent $(install::package_url)/${language}/archives_${language_version}.tar.gz --output archives_${language_version}.tar.gz
    tar -zxf elixirs_${language_version}.tar.gz && rm -rf elixirs_${language_version}.tar.gz
    tar -zxf archives_${language_version}.tar.gz && rm -rf archives_${language_version}.tar.gz
    mv ./elixirs/*${language_version}* ~/.kiex/elixirs/
    mv ./elixirs/.*${language_version}* ~/.kiex/elixirs/
    mv ./archives/*${language_version} ~/.kiex/mix/archives/
    rm -rf ./archives && rm -rf ./elixirs
  fi
  return $?
}

install::install_php() {
  if [[ $(install::available) -eq 1 ]] ; then
    phpbrew known -u
    phpbrew -q install -j 4 ${language_version} +default +dbs +openssl -- --with-curl=/usr/local
    phpbrew switch ${language_version}
    echo "date.timezone = UTC" >> ~/.phpbrew/php/php-${language_version}/etc/php.ini
    phpbrew ext install imap -- --with-kerberos --with-imap-ssl
    phpbrew ext install gd -- --enable-gd-native-ttf --with-freetype-dir=/usr/lib/x86_64-linux-gnu
    phpbrew ext install imagick
    phpbrew ext install intl
    wget https://getcomposer.org/composer-stable.phar -O ~/.phpbrew/php/php-${language_version}/bin/composer.phar
    echo '#!/usr/bin/env bash' >> ~/.phpbrew/php/php-${language_version}/bin/composer
    echo "~/.phpbrew/php/php-${language_version}/bin/php ~/.phpbrew/php/php-${language_version}/bin/composer.phar \$@" >> ~/.phpbrew/php/php-${language_version}/bin/composer
    chmod +x ~/.phpbrew/php/php-${language_version}/bin/composer
  else
    install::download
    tar -zxf ${language_version}.tar.gz
    rm -rf ${language_version}.tar.gz
    mv php-${language_version} ~/.phpbrew/php/
    if [ ! -d "~/.phpbrew/build/php-{$language_version}" ]; then
      output=$(phpbrew download ${language_version} | tail -n1|awk -F'/' '{print $NF}')
      if [ ! -f ~/.phpbrew/distfiles/php-${language_version}.tar.bz2 ] || [[ "$(du -sh ~/.phpbrew/distfiles/php-${language_version}.tar.bz2 | cut -f1)" == "0" ]] ; then 
        mkdir -p ~/.phpbrew/distfiles
        wget -q http://packages.semaphoreci.com/php-sources/php-${language_version}.tar.bz2 -O ~/.phpbrew/distfiles/php-${language_version}.tar.bz2
      fi
      if [ -f ~/.phpbrew/distfiles/php-${language_version}.tar.bz2 ]; then
        tar -xjf ~/.phpbrew/distfiles/php-${language_version}.tar.bz2 -C ~/.phpbrew/build/
      fi
    fi
  fi
  return $?
}

install::usage() {
  echo -e "
Usage:
  sem-install [LANGUAGE] [VERSION]"
}

install::err() {
  echo -e "\n! [$(version::date)]: $@" >&2

  return 1
}

sem-install() {
  if ! [[ $# -eq 2 ]]; then
    install::usage
    install::err "Unsupported number of arguments provided!"

    return $?
  fi

  language=$1
  language_version=$2

  case $language in
    elixir)
      install::install_elixir
      ;;
    erlang)
      install::install_erlang
      ;;
    php)
      install::install_php
      ;;
    ruby)
      install::install_ruby
      ;;
    node)
      install::install_node
      ;;
    *)
      install:err "Installation of '${language}' is not yet supported"
      return 1;
      ;;
  esac
}
source ~/.toolbox/sem-version
#!/bin/bash

# Changing language versions
VERSION="0.7"

# Misc
DATE_FORMAT='%H:%M %d/%m/%Y'
TOTAL_TIME=0

SEMAPHORE_ARCH=$(uname -m)

################################################################################
# Generic function which executes the passed 'command' to switch the version
# Globals:
#   language, language_version
# Arguments:
#   command
# Returns:
#  0, 1-127 (exit status of the language manager command)

version::metrics() {
  local cmd=( "$@" )
  local software=${1#"version::change_"}
  local start
  local end
  [ "$(uname)" == "Linux" ] && start=$(date +%s%3N)
  [ "$(uname)" == "Darwin" ] && start=$(gdate +%s%3N)
  "${cmd[@]}"
  ch_status=$?
  [ "$(uname)" == "Linux" ] && end=$(date +%s%3N)
  [ "$(uname)" == "Darwin" ] && end=$(gdate +%s%3N)
  TOTAL_TIME=$(( end - start ))
  return $ch_status
}
version::change() {
  command=$1
  version::log "Changing '${software}' to version ${software_version}"
  eval "$command" "$software_version"
  ch_status=$?
  return $ch_status
}
version::change_ruby() {
  [[ "$software_version" == "2.5" ]] && software_version="2.5.9"
  [[ "$software_version" == "2.6" ]] && software_version="2.6.10"
  [[ "$software_version" == "2.7" ]] && software_version="2.7.8"
  [[ "$software_version" == "3.0" ]] && software_version="3.0.6"
  [[ "$software_version" == "3.1" ]] && software_version="3.1.4"
  [[ "$software_version" == "3.2" ]] && software_version="3.2.3"
  [[ "$software_version" == "3.3" ]] && software_version="3.3.0"

  if ! [ -d ~/.rbenv/versions/"${software_version}" ]; then
    sem-install ruby "${software_version}"
  fi
  [ "${2:-}" = "-f" ] && change_cmd="rbenv shell" || change_cmd="rbenv global"
  version::change "$change_cmd"
  return $?
}
version::change_node() {
  version::change "sem-install node"
  return $?
}
version::change_elixir() {
  [[ "$software_version" == "1.6" ]] && software_version="1.6.6"
  [[ "$software_version" == "1.7" ]] && software_version="1.7.4"
  [[ "$software_version" == "1.8" ]] && software_version="1.8.2"
  [[ "$software_version" == "1.9" ]] && software_version="1.9.4"
  [[ "$software_version" == "1.10" ]] && software_version="1.10.4"
  [[ "$software_version" == "1.11" ]] && software_version="1.11.4"
  [[ "$software_version" == "1.12" ]] && software_version="1.12.3"
  [[ "$software_version" == "1.13" ]] && software_version="1.13.4"
  [[ "$software_version" == "1.14" ]] && software_version="1.14.5"
  [[ "$software_version" == "1.15" ]] && software_version="1.15.7"
  [[ "$software_version" == "1.16" ]] && software_version="1.16.0"

  if [[ $(kiex list) != *"${software_version}"* ]];then
    sem-install elixir "${software_version}"
  fi
  version::change "kiex use"
  return $?
}
version::change_go() {
  version::change "change-go-version"
  ret=$?

  # SC2155: we are not interested in the return value.
  # shellcheck disable=SC2155
  [[ "$ret" == "0" ]] && export PATH="$(go env GOPATH)/bin:${PATH}"

  return $ret
}
version::change_java() {
  version::change "change-java-version"
  return $?
}
version::change_php() {
  [[ "$software_version" == "7.0" ]] && software_version="7.0.33"
  [[ "$software_version" == "7.1" ]] && software_version="7.1.33"
  [[ "$software_version" == "7.2" ]] && software_version="7.2.34"
  [[ "$software_version" == "7.3" ]] && software_version="7.3.33"
  [[ "$software_version" == "7.4" ]] && software_version="7.4.33"
  [[ "$software_version" == "8" ]] && software_version="8.0.30"
  [[ "$software_version" == "8.0" ]] && software_version="8.0.30"

  if ! [ -d ~/.phpbrew/php/php-"${software_version}" ]; then
    sem-install php "${software_version}"
  fi
  software_version="php-${software_version}"
  version::change "phpbrew switch"
  return $?
}
version::change_python() {
  version::change "change-python-version"
  return $?
}
version::change_c() {
  version::change "change-gcc-version"
  return $?
}
version::change_cpp() {
  version::change "change-gcc-version"
  return $?
}
version::change_scala() {
  version::change "change-scala-version"
  return $?
}
version::change_erlang() {
  [[ "$software_version" == "20" ]] && software_version="20.3"
  [[ "$software_version" == "21" ]] && software_version="21.3"
  [[ "$software_version" == "22" ]] && software_version="22.3"
  [[ "$software_version" == "23" ]] && software_version="23.3"
  [[ "$software_version" == "24" ]] && software_version="24.3"
  [[ "$software_version" == "25" ]] && software_version="25.3"
  [[ "$software_version" == "26" ]] && software_version="26.2"

  if [[ $(kerl list installations) != *"${software_version}"* ]]; then
    sem-install erlang "${software_version}"
  fi
  version::change "change-erlang-version"
  return $?
}
version::change_firefox() {
  case $SEMAPHORE_ARCH in
    x86_64)
      version::change "change-firefox-version"
      return $?
      ;;
    *)
      echo "sem-version firefox is not supported for $SEMAPHORE_ARCH"
      ;;
  esac
}
version::change_kubectl() {
  case $SEMAPHORE_ARCH in
    x86_64)
      kubectl_arch="amd64"
      ;;
    aarch64)
      kubectl_arch="arm64"
      ;;
    *)
      echo "Unsupported architecture $SEMAPHORE_ARCH"
      exit 1
      ;;
  esac
  curl --silent -LO https://storage.googleapis.com/kubernetes-release/release/v"$software_version"/bin/linux/"$kubectl_arch"/kubectl
  if test -f "kubectl"; then
    chmod +x ./kubectl
    sudo mv -f kubectl /usr/bin/
  fi
  version::change "kubectl version --client | grep -q "
  return $?
}
version::change_flutter() {
  local local_version

  # SC2012: we don't need to handle non-alphanumeric filenames.
  # shellcheck disable=SC2012
  local_version=$(ls -1d /opt/flutter_"${software_version}"* | tail -1)
  if test -d "${local_version}"; then
    rm -f /opt/flutter && ln -s "${local_version}" /opt/flutter
    version::change "/opt/flutter/bin/flutter --version | grep "
    return $?
  else
    echo -e "
###############################################################################
    Flutter version ${software_version} not installed or not a container.
"
    return 1
  fi
}
################################################################################
# End of software manager wrappers
################################################################################


################################################################################
# Prints the usage
# Globals:
#   none
# Arguments:
#   none
# Returns:
#   none
version::usage() {
  echo -e "
################################################################################
sem-version ${VERSION} | Utility to change a selected software active version

Usage:
  sem-version software version
################################################################################"
}

################################################################################
# Helper to print date in the given format
# Globals:
#   DATE_FORMAT
# Arguments:
#   message
# Returns:
#   none
################################################################################
version::date() {
  date +"${DATE_FORMAT}"
}

################################################################################
# Helper to display info messages
# Globals:
#   none
# Arguments:
#   message
# Returns:
#   none
################################################################################
version::log() {
  echo -e "\n[$(version::date)]: $*" >&2
}

################################################################################
# Helper function to show error messages and to terminate execution on error
# Globals:
#   DATE_FORMAT
# Arguments:
#   message
# Returns:
#   1
################################################################################
version::err() {
  echo -e "\n! [$(version::date)]: $*" >&2

  return 1
}

################################################################################
# The main entrypoint to the script. Holds the switching logic.
# Arguments:
#   'software', 'version'
# Returns:
#   none
################################################################################
version::main() {
  if ! [[ $# -ge 2 ]]; then
    version::usage
    version::err "Unsupported number of arguments provided!"

    return $?
  fi

  software=$1
  software_version=$2
  force=${3:-""}
  ignore=${4:-""}
  [ "$(uname)" == "Linux" ] && os_version="$(lsb_release -rs)"
  [ "$(uname)" == "Darwin" ] && os_version="$(sw_vers -productVersion)"

  if [[ "$force" == "-i" ]] || [[ "$force" == "--ignore" ]]; then
    ignore="--ignore"
    force=""
  fi
  if [[ "$ignore" == "-i" ]]; then
    ignore="--ignore"
  fi

  fn_name="version::change_${software}"

  if ! [[ $(type -t "$fn_name") == function ]]; then
    version::err "Function '${fn_name}' not implemented. Software '${software}' might not be supported."
    return 1
  else
    version::metrics version::change_"${software}" "$software_version" "$force"
    fn_status=$?
    if [[ fn_status -ne 0 ]]; then
      version::err "Failed to switch version.\n"
      echo "semversion,software=$software,state=fail,version=$software_version,osversion=$os_version duration=$TOTAL_TIME" >> /tmp/toolbox_semversion
      [[ "$ignore" == "--ignore" ]] || exit 1
    else
      echo "semversion,software=$software,state=success,version=$software_version,osversion=$os_version duration=$TOTAL_TIME" >> /tmp/toolbox_semversion
      version::log "Switch successful."
    fi
    return 0
  fi
}

sem-version() {
  if [[ "$(uname)" == "Darwin" ]]; then
    if [[ "$1" == 'ruby' ]] || [[ "$1" == 'node' ]]; then
      version::main "$@"
    else
      echo "'sem-version' is not supported in this environment."
      echo "https://docs.semaphoreci.com/ci-cd-environment/sem-version-managing-language-versions-on-linux"
      exit 1
    fi
  else
    version::main "$@"
  fi
}
source ~/.toolbox/libcheckout
function checkout() {
  local use_cache=${1:-""}
  if [ -z "${SEMAPHORE_GIT_BRANCH}" ] || [ -z "${SEMAPHORE_GIT_URL}" ] || [ -z "${SEMAPHORE_GIT_DIR}" ] || [ -z "${SEMAPHORE_GIT_SHA}" ]; then
    checkout::validation_message
    return 1
  fi

  rm -rf "$SEMAPHORE_GIT_DIR"

  if [ "$use_cache" = "--use-cache" ]; then
    echo "[Experimental stability] Using cached Git repository."
    checkout::use_cache
  else
    if [ -n "${SEMAPHORE_GIT_REF_TYPE:-}" ]; then
      checkout::refbased
    else
      checkout::shallow
    fi

    exit_code=$?
    if [ "$exit_code" -ne "0" ]; then
      checkout::metric 0
    fi

    return $exit_code
  fi
}

function checkout::validation_message() {
  echo "[CHECKOUT ERROR] Some of these variables are unset:"
  echo "SEMAPHORE_GIT_URL=$SEMAPHORE_GIT_URL"
  echo "SEMAPHORE_GIT_DIR=$SEMAPHORE_GIT_DIR"
  echo "SEMAPHORE_GIT_BRANCH=$SEMAPHORE_GIT_BRANCH"
  echo "SEMAPHORE_GIT_SHA=$SEMAPHORE_GIT_SHA"
}

function checkout::use_cache() {
  export CACHE_FAIL_ON_ERROR="true"

  if ! cache restore git-cache-; then
    echo "Failed to restore from the cache"
    rm -rf "${SEMAPHORE_GIT_DIR}"
  fi

  if [ -d "$HOME/$SEMAPHORE_GIT_DIR" ]; then
    checkout::fetch
  else
    checkout::clone
  fi

  # SC2181: checking the last command's exit code
  # with $? simplifies the control flow of this function.
  # shellcheck disable=SC2181
  if [ "$?" -eq "0" ]; then
    checkout::cache_store
  else
    return 1
  fi
}

function checkout::fetch() {
  echo "Restored cache"
  cd "${HOME}/${SEMAPHORE_GIT_DIR}" || exit
  git remote prune origin
  retry git fetch --tags origin

  checkout::switch_revision
}

function checkout::clone() {
  retry git clone "${SEMAPHORE_GIT_URL}" "${SEMAPHORE_GIT_DIR}"
  cd "${SEMAPHORE_GIT_DIR}" || exit

  checkout::switch_revision
}

function checkout::reset_to_sha {
  if checkout::checkrevision; then
    git reset --hard "${SEMAPHORE_GIT_SHA}" 2>/dev/null
    checkout::metric "$(du -s . | awk '{ print $1 }')"
    return 0
  else
    return 1
  fi
}

function checkout::switch_revision() {
  if [ "${SEMAPHORE_GIT_REF_TYPE:-""}" = "pull-request" ]; then
    if ! retry git fetch origin +"${SEMAPHORE_GIT_REF}": 2>/dev/null; then
      echo "Reference: ${SEMAPHORE_GIT_REF} not found .... Exiting"

      return 1
    else
      checkout::reset_to_sha
    fi

  elif [ "${SEMAPHORE_GIT_REF_TYPE:-''}" = "tag" ]; then
    if ! git checkout -qf "${SEMAPHORE_GIT_TAG_NAME}"; then
      echo "Release $SEMAPHORE_GIT_TAG_NAME not found .... Exiting"

      return 1
    else
      checkout::metric "$(du -s . | awk '{ print $1 }')"
      echo "HEAD is now at ${SEMAPHORE_GIT_SHA} Release ${SEMAPHORE_GIT_TAG_NAME}"

      return 0
    fi

  else
    local branch_origin="origin/$SEMAPHORE_GIT_BRANCH"

    if [[ -n $(git show-ref "${SEMAPHORE_GIT_REF}") ]]; then
      git checkout "${SEMAPHORE_GIT_BRANCH}"
    else
      git checkout -b "${SEMAPHORE_GIT_BRANCH}" -t "${branch_origin}";
    fi

    checkout::reset_to_sha
  fi
}

function checkout::cache_store() {
  # update cache if older then 72h -> 25920s
  SEMAPHORE_GIT_CACHE_AGE="${SEMAPHORE_GIT_CACHE_AGE:-259200}"

  local cache_key
  local cache_age
  cache_key=$(cache list 2>&1 | grep git-cache- | awk '{ print $1 }' | head -1)
  cache_age=$(echo "${cache_key}" | cut -d'-' -f8)

  if [[ -n "$cache_age" ]] && [[ $cache_age =~ ^[0-9]+$ ]]; then
    local diff=$(($(date +%s) - cache_age))
    echo "diff: $diff"

    if (( diff > SEMAPHORE_GIT_CACHE_AGE )); then
      echo "Git cache outdated, refreshing..."
      cd ..
      checkout::cleanupcache
      cache store "git-cache-$SEMAPHORE_JOB_ID-$(date +%s)" "${SEMAPHORE_GIT_DIR}"
      cd "${SEMAPHORE_GIT_DIR}" || exit
    else
      echo "Git cache up-to-data."
    fi

  else
    echo "No git cache... caching"
    cd ..
    cache store "git-cache-${SEMAPHORE_JOB_ID}-$(date +%s)" "${SEMAPHORE_GIT_DIR}"
    cd "${SEMAPHORE_GIT_DIR}" || exit
  fi
}

function checkout::cleanupcache {
  if [ -z "${SEMAPHORE_GIT_CACHE_KEEP:-""}" ]; then
    SEMAPHORE_GIT_CACHE_KEEP=0
  fi
  local k=$SEMAPHORE_GIT_CACHE_KEEP

  local list=()
  while IFS='' read -r line; do list+=("$line"); done < <(cache list 2>&1 | grep git-cache- | awk '{ print $1 }')

  for i in "${list[@]:$k}"; do
    cache delete "${i}"
  done

}

function checkout::checkrevision {
  if ! git rev-list HEAD.."${SEMAPHORE_GIT_SHA}" 2>/dev/null; then
    echo "Revision: ${SEMAPHORE_GIT_SHA} not found .... Exiting"
    return 1
  fi
}

function checkout::branch_checkout {
  if ! git checkout -f "$SEMAPHORE_GIT_BRANCH"; then
    echo "Branch: ${SEMAPHORE_GIT_BRANCH} not found .... Exiting"
    return 1
  fi
}

function checkout::shallow() {
  if [ -z "${SEMAPHORE_GIT_DEPTH:-""}" ]; then
    SEMAPHORE_GIT_DEPTH=50
  fi
  echo "Performing shallow clone with depth: $SEMAPHORE_GIT_DEPTH"

  if ! retry git clone --depth "${SEMAPHORE_GIT_DEPTH}" -b "${SEMAPHORE_GIT_BRANCH}" "${SEMAPHORE_GIT_URL}" "${SEMAPHORE_GIT_DIR}"; then
    echo "Branch not found performing full clone"
    retry git clone "${SEMAPHORE_GIT_URL}" "${SEMAPHORE_GIT_DIR}"
    cd "$SEMAPHORE_GIT_DIR" || exit

    if ! checkout::branch_checkout; then
      return 1
    fi

    if checkout::checkrevision; then
      git reset --hard "${SEMAPHORE_GIT_SHA}" 2>/dev/null
    else
      return 1
    fi
  else
    cd "${SEMAPHORE_GIT_DIR}" || exit

    if ! git reset --hard "${SEMAPHORE_GIT_SHA}" 2>/dev/null; then
      echo "SHA: $SEMAPHORE_GIT_SHA not found performing full clone"
      retry git fetch --unshallow

      if checkout::checkrevision; then
        git reset --hard "${SEMAPHORE_GIT_SHA}" 2>/dev/null
      else
        return 1
      fi
    fi
  fi

  checkout::metric "$(du -s . | awk '{ print $1 }')"
}

function checkout::refbased() {
  if [ -z "${SEMAPHORE_GIT_DEPTH:-""}" ]; then
    SEMAPHORE_GIT_DEPTH=50
  fi

  if [ "${SEMAPHORE_GIT_REF_TYPE:-""}" = "pull-request" ]; then
    retry git clone --depth "${SEMAPHORE_GIT_DEPTH}" "${SEMAPHORE_GIT_URL}" "${SEMAPHORE_GIT_DIR}"
    cd "${SEMAPHORE_GIT_DIR}" || exit

    if ! retry git fetch origin +"${SEMAPHORE_GIT_REF}": 2>/dev/null; then
      echo "Revision: ${SEMAPHORE_GIT_SHA} not found .... Exiting"
      return 1
    else
      git checkout -qf FETCH_HEAD
      echo "HEAD is now at ${SEMAPHORE_GIT_SHA}"

      return 0
    fi
  fi

  if [ "${SEMAPHORE_GIT_REF_TYPE:-""}" = "tag" ]; then
    if ! retry git clone --depth "${SEMAPHORE_GIT_DEPTH}" -b "${SEMAPHORE_GIT_TAG_NAME}" "${SEMAPHORE_GIT_URL}" "${SEMAPHORE_GIT_DIR}"; then
      echo "Release $SEMAPHORE_GIT_TAG_NAME not found .... Exiting"
      return 1
    else
      cd "${SEMAPHORE_GIT_DIR}" || exit
      git checkout -qf "${SEMAPHORE_GIT_TAG_NAME}"
      echo "HEAD is now at ${SEMAPHORE_GIT_SHA} Release ${SEMAPHORE_GIT_TAG_NAME}"

      return 0
    fi
  fi

  checkout::shallow
}

function checkout::metric() {
  if [[ "${SEMAPHORE_TOOLBOX_METRICS_ENABLED:-''}" == "true" ]]; then
    ref_type=${SEMAPHORE_GIT_REF_TYPE:-""}
    size=${1:-"0"}
    [[ $size -gt 0 ]] && status='success' || status='fail'
    echo "libcheckout,provider='$SEMAPHORE_GIT_PROVIDER',reftype='$ref_type',status=$status size=$1" >> /tmp/toolbox_checkout
  fi
}

export -f checkout
source ~/.toolbox/libchecksum
function checksum() {
DIST=$(uname)

case $DIST in
  Darwin)
    md5 $1 | tr -d " " | awk -F= {'print $2'}
    ;;
  Linux)
    md5sum $1 | awk '{ print $1 }'
   ;;
  *)
    echo "Unsupported distro $DIST"
    exit 1
  ;;
esac
}

export -f checksum

# Temporarily turn on cache clear if Semaphore has weird bundling issues
cache clear
Deleted all caches.

export DD_PROFILING_NO_EXTENSION=true
sem-version ruby 2.7.4

[07:50 28/02/2024]: Changing 'ruby' to version 2.7.4
rbenv global 2.7.4

[07:50 28/02/2024]: Switch successful.
sem-service start postgres 14
Starting postgres...done.
PostgreSQL 14 is running at 0.0.0.0:5432
To access it use username 'postgres' and blank password.
sem-service start redis 5
Starting redis...done.
Redis 5 is running at 0.0.0.0:6379

# wkhtmltoimage-binary gem dependencies
sudo add-apt-repository ppa:linuxuprising/libpng12 -y

0% [Working]
            
Hit:1 http://mirror.init7.net/ubuntu focal InRelease

0% [Waiting for headers] [Waiting for headers]
                                              
Get:2 http://mirror.init7.net/ubuntu focal-updates InRelease [114 kB]

0% [Waiting for headers] [2 InRelease 14.2 kB/114 kB 12%] [Waiting for headers]
                                                                               
Hit:3 http://de.archive.ubuntu.com/ubuntu focal InRelease

                                                                               
0% [2 InRelease 14.2 kB/114 kB 12%] [Waiting for headers]
                                                         
Get:4 http://ppa.launchpad.net/linuxuprising/libpng12/ubuntu focal InRelease [15.9 kB]

0% [Waiting for headers] [2 InRelease 14.2 kB/114 kB 12%] [4 InRelease 14.2 kB/
                                                                               
Get:5 http://de.archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]

0% [5 InRelease 13.4 kB/114 kB 12%] [2 InRelease 98.2 kB/114 kB 86%] [4 InRelea
                                                                               
0% [5 InRelease 13.4 kB/114 kB 12%] [2 InRelease 98.2 kB/114 kB 86%]
                                                                    
0% [5 InRelease 13.4 kB/114 kB 12%]
                                   
Hit:6 http://mirror.init7.net/ubuntu focal-backports InRelease

0% [5 InRelease 40.8 kB/114 kB 36%]
                                   
Get:7 http://mirror.init7.net/ubuntu focal-security InRelease [114 kB]

0% [5 InRelease 40.8 kB/114 kB 36%] [7 InRelease 16.4 kB/114 kB 14%]
                                                                    
0% [5 InRelease 40.8 kB/114 kB 36%]
                                   
0% [Working]
0% [Waiting for headers]
                        
Get:8 http://de.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]

                        
0% [Working]
0% [Working]
0% [Working]
            
Get:9 http://ppa.launchpad.net/linuxuprising/libpng12/ubuntu focal/main amd64 Packages [996 B]

0% [9 Packages 996 B/996 B 100%]
                                
0% [Working]
0% [9 Packages store 0 B] [Waiting for headers]
                                               
0% [Waiting for headers]
                        
Get:10 http://ppa.launchpad.net/linuxuprising/libpng12/ubuntu focal/main Translation-en [532 B]

0% [10 Translation-en 532 B/532 B 100%]
                                       
0% [Working]
0% [10 Translation-en store 0 B]
                                
0% [Working]
0% [Working]
            
Get:11 http://mirror.init7.net/ubuntu focal-updates/main i386 Packages [939 kB]

0% [11 Packages 33.3 kB/939 kB 4%]
                                  
0% [Working]
0% [11 Packages store 0 B]
                          
Get:12 http://mirror.init7.net/ubuntu focal-updates/main amd64 Packages [3,125 kB]

0% [11 Packages store 0 B] [12 Packages 12.0 kB/3,125 kB 0%]
0% [11 Packages store 0 B] [12 Packages 692 kB/3,125 kB 22%]
                                                            
0% [11 Packages store 0 B] [Waiting for headers]
                                                
Get:13 http://mirror.init7.net/ubuntu focal-updates/main Translation-en [500 kB]

0% [11 Packages store 0 B] [13 Translation-en 32.2 kB/500 kB 6%]
                                                                
0% [11 Packages store 0 B] [Waiting for headers]
                                                
Get:14 http://mirror.init7.net/ubuntu focal-updates/restricted i386 Packages [37.3 kB]

0% [11 Packages store 0 B] [14 Packages 37.3 kB/37.3 kB 100%]
                                                             
0% [11 Packages store 0 B] [Waiting for headers]
                                                
Get:15 http://mirror.init7.net/ubuntu focal-updates/restricted amd64 Packages [2,717 kB]

0% [11 Packages store 0 B] [15 Packages 18.8 kB/2,717 kB 1%]
                                                            
Get:16 http://mirror.init7.net/ubuntu focal-updates/restricted Translation-en [377 kB]

0% [11 Packages store 0 B] [16 Translation-en 119 kB/377 kB 32%]
                                                                
0% [11 Packages store 0 B] [Waiting for headers]
                                                
Get:17 http://mirror.init7.net/ubuntu focal-updates/universe amd64 Packages [1,167 kB]

0% [11 Packages store 0 B] [17 Packages 65.5 kB/1,167 kB 6%]
                                                            
0% [11 Packages store 0 B] [Waiting for headers]
                                                
Get:18 http://mirror.init7.net/ubuntu focal-updates/universe i386 Packages [774 kB]

0% [11 Packages store 0 B] [18 Packages 16.0 kB/774 kB 2%]
0% [11 Packages store 0 B] [18 Packages 774 kB/774 kB 100%]
                                                           
Get:19 http://mirror.init7.net/ubuntu focal-updates/universe Translation-en [280 kB]

0% [11 Packages store 0 B] [19 Translation-en 65.5 kB/280 kB 23%]
                                                                 
0% [11 Packages store 0 B] [Waiting for headers]
                                                
Get:20 http://mirror.init7.net/ubuntu focal-updates/multiverse amd64 Packages [26.1 kB]

0% [11 Packages store 0 B] [20 Packages 9,796 B/26.1 kB 38%]
                                                            
0% [11 Packages store 0 B] [Waiting for headers]
                                                
Get:21 http://mirror.init7.net/ubuntu focal-updates/multiverse i386 Packages [8,444 B]

0% [11 Packages store 0 B] [21 Packages 8,444 B/8,444 B 100%]
                                                             
0% [11 Packages store 0 B]
                          
0% [Waiting for headers]
0% [12 Packages store 0 B] [Waiting for headers]
                                                
Get:22 http://mirror.init7.net/ubuntu focal-security/main i386 Packages [714 kB]

0% [12 Packages store 0 B] [22 Packages 32.8 kB/714 kB 5%]
                                                          
0% [12 Packages store 0 B] [Waiting for headers]
                                                
Get:23 http://mirror.init7.net/ubuntu focal-security/main amd64 Packages [2,748 kB]

0% [12 Packages store 0 B] [23 Packages 46.9 kB/2,748 kB 2%]
                                                            
0% [12 Packages store 0 B] [Waiting for headers]
                                                
Get:24 http://mirror.init7.net/ubuntu focal-security/main Translation-en [417 kB]

0% [12 Packages store 0 B] [24 Translation-en 51.7 kB/417 kB 12%]
                                                                 
0% [12 Packages store 0 B] [24 Translation-en 252 kB/417 kB 60%]
0% [12 Packages store 0 B] [Waiting for headers] [Waiting for headers]
                                                                      
Get:25 http://mirror.init7.net/ubuntu focal-security/restricted i386 Packages [36.0 kB]

0% [12 Packages store 0 B] [Waiting for headers] [25 Packages 27.4 kB/36.0 kB 7
                                                                               
0% [12 Packages store 0 B] [Waiting for headers] [Waiting for headers]
                                                                      
Get:26 http://mirror.init7.net/ubuntu focal-security/restricted amd64 Packages [2,599 kB]

0% [12 Packages store 0 B] [Waiting for headers] [26 Packages 36.9 kB/2,599 kB 
                                                                               
Get:27 http://de.archive.ubuntu.com/ubuntu focal-security/main i386 Packages [714 kB]

0% [12 Packages store 0 B] [27 Packages 1,137 B/714 kB 0%] [26 Packages 904 kB/
0% [12 Packages store 0 B] [27 Packages 172 kB/714 kB 24%] [Waiting for headers
                                                                               
Get:28 http://mirror.init7.net/ubuntu focal-security/restricted Translation-en [362 kB]

0% [12 Packages store 0 B] [27 Packages 172 kB/714 kB 24%] [28 Translation-en 1
0% [12 Packages store 0 B] [27 Packages 402 kB/714 kB 56%] [Waiting for headers
                                                                               
Get:29 http://mirror.init7.net/ubuntu focal-security/universe amd64 Packages [943 kB]

0% [12 Packages store 0 B] [27 Packages 402 kB/714 kB 56%] [29 Packages 43.8 kB
                                                                               
0% [12 Packages store 0 B] [29 Packages 930 kB/943 kB 99%]
                                                          
0% [12 Packages store 0 B] [Waiting for headers]
                                                
Get:30 http://mirror.init7.net/ubuntu focal-security/universe i386 Packages [649 kB]

0% [12 Packages store 0 B] [30 Packages 17.9 kB/649 kB 3%]
58% [12 Packages store 0 B] [Waiting for headers] [30 Packages 518 kB/649 kB 80
                                                                               
58% [12 Packages store 0 B] [Waiting for headers] [Waiting for headers]
                                                                       
Get:31 http://mirror.init7.net/ubuntu focal-security/universe Translation-en [198 kB]

58% [12 Packages store 0 B] [Waiting for headers] [31 Translation-en 24.2 kB/19
                                                                               
58% [12 Packages store 0 B] [Waiting for headers] [Waiting for headers]
                                                                       
Get:32 http://mirror.init7.net/ubuntu focal-security/multiverse i386 Packages [7,200 B]

58% [12 Packages store 0 B] [Waiting for headers] [32 Packages 7,200 B/7,200 B 
                                                                               
58% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:33 http://mirror.init7.net/ubuntu focal-security/multiverse amd64 Packages [23.9 kB]

58% [12 Packages store 0 B] [Waiting for headers] [33 Packages 14.9 kB/23.9 kB 
                                                                               
58% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:34 http://de.archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [2,748 kB]

58% [12 Packages store 0 B] [34 Packages 1,135 B/2,748 kB 0%]
                                                             
64% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:35 http://de.archive.ubuntu.com/ubuntu focal-security/main Translation-en [417 kB]

64% [12 Packages store 0 B] [35 Translation-en 45.1 kB/417 kB 11%]
                                                                  
65% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:36 http://de.archive.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [2,599 kB]

65% [12 Packages store 0 B] [36 Packages 28.7 kB/2,599 kB 1%]
                                                             
71% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:37 http://de.archive.ubuntu.com/ubuntu focal-security/restricted i386 Packages [36.0 kB]

71% [12 Packages store 0 B] [37 Packages 23.3 kB/36.0 kB 65%]
                                                             
71% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:38 http://de.archive.ubuntu.com/ubuntu focal-security/restricted Translation-en [362 kB]

71% [12 Packages store 0 B] [38 Translation-en 13.1 kB/362 kB 4%]
                                                                 
72% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:39 http://de.archive.ubuntu.com/ubuntu focal-security/universe i386 Packages [649 kB]

72% [12 Packages store 0 B] [39 Packages 37.4 kB/649 kB 6%]
                                                           
73% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:40 http://de.archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages [943 kB]

73% [12 Packages store 0 B] [40 Packages 43.7 kB/943 kB 5%]
                                                           
75% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:41 http://de.archive.ubuntu.com/ubuntu focal-security/universe Translation-en [198 kB]

75% [12 Packages store 0 B] [41 Translation-en 3,290 B/198 kB 2%]
                                                                 
75% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:42 http://de.archive.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [23.9 kB]

75% [12 Packages store 0 B] [42 Packages 23.9 kB/23.9 kB 100%]
                                                              
75% [12 Packages store 0 B]
                           
Get:43 http://de.archive.ubuntu.com/ubuntu focal-security/multiverse i386 Packages [7,200 B]

75% [12 Packages store 0 B] [43 Packages 2,349 B/7,200 B 33%]
                                                             
75% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:44 http://de.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [939 kB]

75% [12 Packages store 0 B] [44 Packages 38.7 kB/939 kB 4%]
                                                           
77% [12 Packages store 0 B] [Waiting for headers]
                                                 
Get:45 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [3,125 kB]

77% [12 Packages store 0 B] [45 Packages 20.6 kB/3,125 kB 1%]
                                                             
83% [45 Packages 2,713 kB/3,125 kB 87%]
83% [13 Translation-en store 0 B] [45 Packages 2,713 kB/3,125 kB 87%]
                                                                     
84% [13 Translation-en store 0 B] [Waiting for headers]
                                                       
Get:46 http://de.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [500 kB]

84% [13 Translation-en store 0 B] [46 Translation-en 48.8 kB/500 kB 10%]
                                                                        
85% [13 Translation-en store 0 B] [Waiting for headers]
                                                       
Get:47 http://de.archive.ubuntu.com/ubuntu focal-updates/restricted i386 Packages [37.3 kB]

85% [13 Translation-en store 0 B] [47 Packages 37.3 kB/37.3 kB 100%]
                                                                    
85% [13 Translation-en store 0 B]
                                 
Get:48 http://de.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [2,717 kB]

85% [13 Translation-en store 0 B] [48 Packages 0 B/2,717 kB 0%]
                                                               
91% [13 Translation-en store 0 B] [Waiting for headers]
                                                       
Get:49 http://de.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [377 kB]

91% [13 Translation-en store 0 B] [49 Translation-en 65.5 kB/377 kB 17%]
                                                                        
92% [13 Translation-en store 0 B] [Waiting for headers]
                                                       
Get:50 http://de.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [774 kB]

92% [13 Translation-en store 0 B] [50 Packages 0 B/774 kB 0%]
                                                             
93% [13 Translation-en store 0 B] [Waiting for headers]
                                                       
Get:51 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,167 kB]

93% [13 Translation-en store 0 B] [51 Packages 24.6 kB/1,167 kB 2%]
                                                                   
96% [13 Translation-en store 0 B] [Waiting for headers]
                                                       
Get:52 http://de.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [280 kB]

96% [13 Translation-en store 0 B] [52 Translation-en 44.5 kB/280 kB 16%]
                                                                        
96% [13 Translation-en store 0 B] [Waiting for headers]
                                                       
Get:53 http://de.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [26.1 kB]

97% [13 Translation-en store 0 B] [53 Packages 26.1 kB/26.1 kB 100%]
                                                                    
97% [13 Translation-en store 0 B] [Waiting for headers]
                                                       
Get:54 http://de.archive.ubuntu.com/ubuntu focal-updates/multiverse i386 Packages [8,444 B]

97% [13 Translation-en store 0 B] [54 Packages 8,444 B/8,444 B 100%]
                                                                    
97% [13 Translation-en store 0 B]
                                 
97% [Working]
97% [14 Packages store 0 B]
                           
97% [Working]
97% [15 Packages store 0 B]
                           
97% [Working]
97% [16 Translation-en store 0 B]
                                 
97% [Working]
97% [17 Packages store 0 B]
                           
97% [Working]
97% [18 Packages store 0 B]
                           
97% [Working]
97% [19 Translation-en store 0 B]
                                 
97% [Working]
97% [20 Packages store 0 B]
                           
97% [Working]
97% [21 Packages store 0 B]
                           
97% [Working]
97% [22 Packages store 0 B]
                           
97% [Working]
97% [23 Packages store 0 B]
                           
97% [Working]
97% [24 Translation-en store 0 B]
                                 
98% [Working]
98% [25 Packages store 0 B]
                           
98% [Working]
98% [26 Packages store 0 B]
                           
98% [Working]
98% [28 Translation-en store 0 B]
                                 
98% [Working]
98% [27 Packages store 0 B]
                           
98% [Working]
98% [29 Packages store 0 B]
                           
98% [Working]
98% [30 Packages store 0 B]
                           
98% [Working]
98% [31 Translation-en store 0 B]
                                 
98% [Working]
98% [32 Packages store 0 B]
                           
98% [Working]
98% [33 Packages store 0 B]
                           
98% [Working]
98% [34 Packages store 0 B]
                           
98% [Working]
98% [35 Translation-en store 0 B]
                                 
98% [Working]
98% [36 Packages store 0 B]
                           
99% [Working]
99% [37 Packages store 0 B]
                           
99% [Working]
99% [38 Translation-en store 0 B]
                                 
99% [Working]
99% [39 Packages store 0 B]
                           
99% [Working]
99% [40 Packages store 0 B]
                           
99% [Working]
99% [41 Translation-en store 0 B]
                                 
99% [Working]
99% [42 Packages store 0 B]
                           
99% [Working]
99% [43 Packages store 0 B]
                           
99% [Working]
99% [44 Packages store 0 B]
                           
99% [Working]
99% [45 Packages store 0 B]
                           
99% [Working]
99% [46 Translation-en store 0 B]
                                 
99% [Working]
99% [47 Packages store 0 B]
                           
99% [Working]
99% [48 Packages store 0 B]
                           
100% [Working]
100% [49 Translation-en store 0 B]
                                  
100% [Working]
100% [50 Packages store 0 B]
                            
100% [Working]
100% [51 Packages store 0 B]
                            
100% [Working]
100% [52 Translation-en store 0 B]
                                  
100% [Working]
100% [53 Packages store 0 B]
                            
100% [Working]
100% [54 Packages store 0 B]
                            
100% [Working]
              
Fetched 37.8 MB in 5s (7,845 kB/s)

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 1%

Reading package lists... 1%

Reading package lists... 1%

Reading package lists... 1%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 12%

Reading package lists... 12%

Reading package lists... 17%

Reading package lists... 17%

Reading package lists... 22%

Reading package lists... 22%

Reading package lists... 23%

Reading package lists... 23%

Reading package lists... 23%

Reading package lists... 23%

Reading package lists... 23%

Reading package lists... 23%

Reading package lists... 26%

Reading package lists... 26%

Reading package lists... 26%

Reading package lists... 26%

Reading package lists... 29%

Reading package lists... 29%

Reading package lists... 32%

Reading package lists... 32%

Reading package lists... 32%

Reading package lists... 32%

Reading package lists... 33%

Reading package lists... 33%

Reading package lists... 34%

Reading package lists... 34%

Reading package lists... 34%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 39%

Reading package lists... 39%

Reading package lists... 40%

Reading package lists... 40%

Reading package lists... 42%

Reading package lists... 42%

Reading package lists... 45%

Reading package lists... 45%

Reading package lists... 45%

Reading package lists... 45%

Reading package lists... 47%

Reading package lists... 47%

Reading package lists... 48%

Reading package lists... 48%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 50%

Reading package lists... 50%

Reading package lists... 51%

Reading package lists... 51%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 62%

Reading package lists... 62%

Reading package lists... 67%

Reading package lists... 67%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 73%

Reading package lists... 73%

Reading package lists... 76%

Reading package lists... 76%

Reading package lists... 77%

Reading package lists... 77%

Reading package lists... 79%

Reading package lists... 79%

Reading package lists... 82%

Reading package lists... 82%

Reading package lists... 82%

Reading package lists... 82%

Reading package lists... 84%

Reading package lists... 84%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 86%

Reading package lists... 86%

Reading package lists... 86%

Reading package lists... 86%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 90%

Reading package lists... 90%

Reading package lists... 90%

Reading package lists... 90%

Reading package lists... 93%

Reading package lists... 93%

Reading package lists... 96%

Reading package lists... 96%

Reading package lists... 96%

Reading package lists... 96%

Reading package lists... 97%

Reading package lists... 97%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... Done
sudo apt update

0% [Working]
            
Hit:1 http://mirror.init7.net/ubuntu focal InRelease

0% [Waiting for headers] [Connecting to ppa.launchpad.net (185.125.190.80)]
                                                                           
Hit:2 http://de.archive.ubuntu.com/ubuntu focal InRelease

                                                                           
0% [Waiting for headers] [Waiting for headers]
                                              
Hit:3 http://mirror.init7.net/ubuntu focal-updates InRelease

0% [Waiting for headers] [Waiting for headers]
                                              
Hit:4 http://ppa.launchpad.net/linuxuprising/libpng12/ubuntu focal InRelease

0% [Waiting for headers] [Waiting for headers]
                                              
Hit:5 http://mirror.init7.net/ubuntu focal-backports InRelease

                                              
0% [Waiting for headers]
                        
Hit:6 http://de.archive.ubuntu.com/ubuntu focal-security InRelease

0% [Waiting for headers]
                        
Hit:7 http://mirror.init7.net/ubuntu focal-security InRelease

0% [Waiting for headers]
                        
Hit:8 http://de.archive.ubuntu.com/ubuntu focal-updates InRelease

                        
0% [Working]
0% [Working]
0% [Working]
0% [Working]
0% [Working]
0% [Working]
0% [Working]
0% [Working]
20% [Working]
             

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 1%

Reading package lists... 1%

Reading package lists... 1%

Reading package lists... 1%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 2%

Reading package lists... 12%

Reading package lists... 12%

Reading package lists... 17%

Reading package lists... 17%

Reading package lists... 22%

Reading package lists... 22%

Reading package lists... 23%

Reading package lists... 23%

Reading package lists... 23%

Reading package lists... 23%

Reading package lists... 23%

Reading package lists... 23%

Reading package lists... 26%

Reading package lists... 26%

Reading package lists... 26%

Reading package lists... 26%

Reading package lists... 29%

Reading package lists... 29%

Reading package lists... 32%

Reading package lists... 32%

Reading package lists... 32%

Reading package lists... 32%

Reading package lists... 33%

Reading package lists... 33%

Reading package lists... 33%

Reading package lists... 34%

Reading package lists... 34%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 35%

Reading package lists... 39%

Reading package lists... 39%

Reading package lists... 40%

Reading package lists... 40%

Reading package lists... 42%

Reading package lists... 42%

Reading package lists... 45%

Reading package lists... 45%

Reading package lists... 45%

Reading package lists... 45%

Reading package lists... 47%

Reading package lists... 47%

Reading package lists... 48%

Reading package lists... 48%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 50%

Reading package lists... 50%

Reading package lists... 51%

Reading package lists... 51%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 52%

Reading package lists... 62%

Reading package lists... 62%

Reading package lists... 67%

Reading package lists... 67%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 73%

Reading package lists... 73%

Reading package lists... 76%

Reading package lists... 76%

Reading package lists... 77%

Reading package lists... 77%

Reading package lists... 79%

Reading package lists... 79%

Reading package lists... 82%

Reading package lists... 82%

Reading package lists... 82%

Reading package lists... 82%

Reading package lists... 84%

Reading package lists... 84%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 86%

Reading package lists... 86%

Reading package lists... 86%

Reading package lists... 86%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 90%

Reading package lists... 90%

Reading package lists... 90%

Reading package lists... 90%

Reading package lists... 93%

Reading package lists... 93%

Reading package lists... 96%

Reading package lists... 96%

Reading package lists... 96%

Reading package lists... 96%

Reading package lists... 97%

Reading package lists... 97%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... Done

Building dependency tree... 0%

Building dependency tree... 0%

Building dependency tree... 0%

Building dependency tree... 50%

Building dependency tree... 50%

Building dependency tree       

Reading state information... 0%

Reading state information... 0%

Reading state information... Done
56 packages can be upgraded. Run 'apt list --upgradable' to see them.
sudo apt install libpng12-0 -y

Reading package lists... 0%

Reading package lists... 100%

Reading package lists... Done

Building dependency tree... 0%

Building dependency tree... 0%

Building dependency tree... 50%

Building dependency tree... 50%

Building dependency tree       

Reading state information... 0%

Reading state information... 0%

Reading state information... Done
The following NEW packages will be installed:
  libpng12-0
0 upgraded, 1 newly installed, 0 to remove and 56 not upgraded.
Need to get 173 kB of archives.
After this operation, 290 kB of additional disk space will be used.

0% [Working]
            
Get:1 http://ppa.launchpad.net/linuxuprising/libpng12/ubuntu focal/main amd64 libpng12-0 amd64 1.2.54-1ubuntu1.1+1~ppa0~focal [173 kB]

7% [1 libpng12-0 14.2 kB/173 kB 8%]
                                   
100% [Working]
              
Fetched 173 kB in 0s (1,611 kB/s)
Selecting previously unselected package libpng12-0:amd64.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 209578 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1.1+1~ppa0~focal_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1.1+1~ppa0~focal) ...
Setting up libpng12-0:amd64 (1.2.54-1ubuntu1.1+1~ppa0~focal) ...
Processing triggers for libc-bin (2.31-0ubuntu9.14) ...
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2_amd64.deb
--2024-02-28 07:50:44--  http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2_amd64.deb
Resolving nz2.archive.ubuntu.com (nz2.archive.ubuntu.com)... 185.125.190.36, 91.189.91.81, 185.125.190.39, ...
Connecting to nz2.archive.ubuntu.com (nz2.archive.ubuntu.com)|185.125.190.36|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 825446 (806K) [application/x-debian-package]
Saving to: ‘libssl1.0.0_1.0.1f-1ubuntu2_amd64.deb’


          libssl1.0   0%[                    ]       0  --.-KB/s               
libssl1.0.0_1.0.1f- 100%[===================>] 806.10K  --.-KB/s    in 0.1s    

2024-02-28 07:50:44 (6.09 MB/s) - ‘libssl1.0.0_1.0.1f-1ubuntu2_amd64.deb’ saved [825446/825446]

sudo dpkg -i libssl1.0.0_1.0.1f-1ubuntu2_amd64.deb
Selecting previously unselected package libssl1.0.0:amd64.
dpkg: regarding libssl1.0.0_1.0.1f-1ubuntu2_amd64.deb containing libssl1.0.0:amd64, pre-dependency problem:
 libssl1.0.0 pre-depends on multiarch-support
  multiarch-support is not installed.

dpkg: error processing archive libssl1.0.0_1.0.1f-1ubuntu2_amd64.deb (--install):
 pre-dependency problem - not installing libssl1.0.0:amd64
Errors were encountered while processing:
 libssl1.0.0_1.0.1f-1ubuntu2_amd64.deb
Exporting environment variables
Exporting SEMAPHORE_JOB_RESULT
[[ -f junit.xml ]] && test-results publish junit.xml