forked from Evild67/docker-compose-wordpress
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
102 additions
and
0 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,48 @@ | ||
stages: | ||
- test | ||
- cleanup | ||
- tweet | ||
- deploy | ||
|
||
test_job: | ||
stage: test | ||
script: | ||
- ci/wordpress_test | ||
|
||
cleanup: | ||
stage: cleanup | ||
script: | ||
- ci/wordpress_cleanup | ||
when: always | ||
|
||
tweet_succeed_job: | ||
variables: | ||
PASSED: "true" | ||
stage: tweet | ||
only: | ||
- tags | ||
- triggers | ||
- master | ||
script: | ||
- ci/wordpress_tweet | ||
|
||
tweet_failed_job: | ||
variables: | ||
PASSED: "false" | ||
stage: tweet | ||
only: | ||
- tags | ||
- triggers | ||
- master | ||
script: | ||
- ci/wordpress_tweet | ||
when: on_failure | ||
|
||
deploy_job: | ||
stage: deploy | ||
only: | ||
- tags | ||
- triggers | ||
- master | ||
script: | ||
- ci/wordpress_deploy |
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,5 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
docker-compose down |
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,6 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
git checkout master | ||
git push --mirror https://$GITHUB_TOKEN@github.com/Evild67/docker-compose-wordpress.git |
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,29 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
docker-compose up -d | ||
if docker ps | grep -q wordpress_nginx; then | ||
echo Docker nginx found | ||
else | ||
echo Docker nginx found | ||
exit | ||
fi | ||
|
||
if docker ps | grep -q wordpress_php; then | ||
echo Docker php found | ||
else | ||
echo Docker php found | ||
exit | ||
fi | ||
|
||
if docker ps | grep -q wordpress_mariadb; then | ||
echo Docker mariadb found | ||
else | ||
echo Docker mariadb found | ||
exit | ||
fi | ||
|
||
|
||
sleep 30 | ||
curl -I 127.0.0.1 |
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,14 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
default_text="Gitlab Job $CI_BUILD_ID :" | ||
|
||
tweet_text="$default_text #Docker lemp_stack $CI_BUILD_REF_NAME build" | ||
|
||
if [ $PASSED = true ]; then | ||
tweet_text="$tweet_text succeed" | ||
else | ||
tweet_text="$tweet_text failed" | ||
fi | ||
|
||
docker run --rm -e TWITTER_ACCESS_TOKEN_SECRET=$TWITTER_ACCESS_TOKEN_SECRET -e TWITTER_ACCESS_TOKEN_KEY=$TWITTER_ACCESS_TOKEN_KEY -e TWITTER_CONSUMER_SECRET=$TWITTER_CONSUMER_SECRET -e TWITTER_CONSUMER_KEY=$TWITTER_CONSUMER_KEY evild/twitter_build_bot:latest "$tweet_text" |