-
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1672 from GhostWriters/apk
feat: ✨ add apk for alpine support
- Loading branch information
Showing
16 changed files
with
126 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
enable_docker_service() { | ||
DOCKER_SERVICE_ENABLE="" | ||
DOCKER_SERVICE_START="" | ||
if [[ -n "$(command -v systemctl)" ]]; then | ||
info "Systemd detected." | ||
DOCKER_SERVICE_ENABLE="systemctl enable docker" | ||
DOCKER_SERVICE_START="systemctl start docker" | ||
elif [[ -n "$(command -v rc-update)" ]]; then | ||
info "OpenRC detected." | ||
DOCKER_SERVICE_ENABLE="rc-update add docker boot" | ||
DOCKER_SERVICE_START="service docker start" | ||
fi | ||
if [[ -n ${DOCKER_SERVICE_ENABLE} ]]; then | ||
info "Enabling docker service." | ||
eval "sudo ${DOCKER_SERVICE_ENABLE}" > /dev/null 2>&1 || fatal "Failed to enable docker service.\nFailing command: ${F[C]}${DOCKER_SERVICE_ENABLE}" | ||
info "Starting docker service." | ||
eval "sudo ${DOCKER_SERVICE_START}" > /dev/null 2>&1 || fatal "Failed to start docker service.\nFailing command: ${F[C]}${DOCKER_SERVICE_START}" | ||
fi | ||
} | ||
|
||
test_enable_docker_service() { | ||
run_script 'require_docker' | ||
run_script 'enable_docker_service' | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
pm_apk_clean() { | ||
info "apk does not require cleanup." | ||
} | ||
|
||
test_pm_apk_clean() { | ||
# run_script 'pm_apk_clean' | ||
warn "CI does not test pm_apk_clean." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
pm_apk_install() { | ||
notice "Installing dependencies. Please be patient, this can take a while." | ||
local REDIRECT="> /dev/null 2>&1" | ||
if [[ -n ${VERBOSE-} ]] || run_script 'question_prompt' "${PROMPT:-CLI}" N "Would you like to display the command output?"; then | ||
REDIRECT="" | ||
fi | ||
eval "sudo apk add coreutils curl git grep newt openrc sed ${REDIRECT}" || fatal "Failed to install dependencies from apk.\nFailing command: ${F[C]}sudo apk add coreutils curl git grep newt sed" | ||
} | ||
|
||
test_pm_apk_install() { | ||
# run_script 'pm_apk_repos' | ||
# run_script 'pm_apk_install' | ||
warn "CI does not test pm_apk_install." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
pm_apk_install_docker() { | ||
notice "Installing docker. Please be patient, this can take a while." | ||
local REDIRECT="> /dev/null 2>&1" | ||
if [[ -n ${VERBOSE-} ]] || run_script 'question_prompt' "${PROMPT:-CLI}" N "Would you like to display the command output?"; then | ||
REDIRECT="" | ||
fi | ||
eval "sudo apk add docker docker-cli-compose ${REDIRECT}" || fatal "Failed to install docker and docker-compose using pacman.\nFailing command: ${F[C]}sudo apk add docker docker-cli-compose" | ||
|
||
} | ||
|
||
test_pm_apk_install_docker() { | ||
# run_script 'pm_apk_repos' | ||
# run_script 'pm_apk_install_docker' | ||
warn "CI does not test pm_apk_install_docker." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
pm_apk_repos() { | ||
info "apk does not require additional repositories." | ||
} | ||
|
||
test_pm_apk_repos() { | ||
# run_script 'pm_apk_repos' | ||
warn "CI does not test pm_apk_repos." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
pm_apk_upgrade() { | ||
if [[ ${CI-} != true ]]; then | ||
notice "Upgrading packages. Please be patient, this can take a while." | ||
local REDIRECT="> /dev/null 2>&1" | ||
if [[ -n ${VERBOSE-} ]] || run_script 'question_prompt' "${PROMPT:-CLI}" N "Would you like to display the command output?"; then | ||
REDIRECT="" | ||
fi | ||
eval "sudo apk upgrade ${REDIRECT}" || fatal "Failed to upgrade packages from apk.\nFailing command: ${F[C]}sudo apk upgrade" | ||
fi | ||
} | ||
|
||
test_pm_apk_upgrade() { | ||
# run_script 'pm_apk_upgrade' | ||
warn "CI does not test pm_apk_upgrade." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters