-
Notifications
You must be signed in to change notification settings - Fork 319
test DIY install.sh script #3015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+155
−65
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # build diy image based on debian bullseye and bookworm | ||
| # test install.sh script as-it | ||
| name: Test DIY install.sh | ||
|
|
||
| # only trigger when last commit or PR modify install/** | ||
| on: | ||
| # only trigger CI when pull request on following branches and path | ||
| pull_request: | ||
| branches: | ||
| - 'alpha' | ||
| paths: | ||
| - install/** | ||
| # this is to manually trigger the worklow | ||
| workflow_dispatch: | ||
| inputs: | ||
| logLevel: | ||
| description: 'Reason' | ||
| default: 'Manual launch' | ||
|
|
||
| env: | ||
| GITHUB_REPOSITORY: jeedom/core | ||
|
|
||
| jobs: | ||
| InstallationDIY: | ||
| # This step build the same image on different runners / platforms | ||
| strategy: | ||
| # continue all jobs even if some fail | ||
| fail-fast: false | ||
| matrix: | ||
| debian: [bullseye, bookworm ] | ||
| targetRunner: [ ubuntu-latest] # [ ubuntu-latest, ARM, ARM64] | ||
| database: [ 1] # [1, 0] | ||
|
|
||
| runs-on: ${{ matrix.targetRunner }} | ||
| steps: | ||
|
|
||
| - name: Check Out Repo | ||
| # Check out the repo, using current branch | ||
| # https://github.com/marketplace/actions/checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: install jeedom:${{ matrix.debian }} | ||
| # run current installation | ||
| run: | | ||
| echo "Running DIY install of ${GITHUB_REPOSITORY} / ${GITHUB_REF_NAME}" into ${{ matrix.debian }} >> ${GITHUB_STEP_SUMMARY} | ||
| docker build -t jeedom:${{ matrix.debian }} -f tests/Dockerfile \ | ||
| --build-arg DEBIAN=${{ matrix.debian }} \ | ||
| --build-arg DATABASE=${{ matrix.database }} \ | ||
| --build-arg WEBSERVER_HOME=/var/www/html \ | ||
| --build-arg MARIADB_NAME=jeedom . | ||
| docker run -p 80:80 -d --rm --name jeedom_${{ matrix.debian }} jeedom:${{ matrix.debian }} | ||
| sleep 10 | ||
| docker exec jeedom_${{ matrix.debian }} php sick.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| ARG DEBIAN=bookworm-slim | ||
|
|
||
| FROM debian:${DEBIAN} | ||
|
|
||
| ARG WEBSERVER_HOME=/var/www/html | ||
| ENV WEBSERVER_HOME=${WEBSERVER_HOME} | ||
| ARG VERSION=alpha | ||
| ARG DATABASE=1 | ||
| ARG MARIADB_NAME=jeedom | ||
| ENV MARIADB_NAME=${MARIADB_NAME} | ||
| WORKDIR ${WEBSERVER_HOME} | ||
|
|
||
| COPY --chown=root:root --chmod=550 install/install.sh /install.sh | ||
| RUN /install.sh -v ${VERSION} -w ${WEBSERVER_HOME} -d ${DATABASE} | ||
|
|
||
| # créer le script d'init | ||
| COPY --chown=root:root --chmod=550 <<EOF /root/init.sh | ||
| #!/bin/bash | ||
| # démarrer mariadb | ||
| service mariadb start | ||
| # démarrer atd | ||
| service atd start | ||
| # démarrer apache2 | ||
| service apache2 start | ||
| # démarrer cron | ||
| service cron start | ||
| # attendre à l'infini | ||
| while :; do echo "$((COUNT++)) DAYS"; sleep 86400; done | ||
| EOF | ||
|
|
||
| # définir le script d'init comme commande par défaut | ||
| CMD ["/root/init.sh"] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.