Skip to content
This repository was archived by the owner on Oct 18, 2022. It is now read-only.

Commit 1f7eae7

Browse files
committed
pin composer to v1, add image move notice
1 parent e246323 commit 1f7eae7

17 files changed

Lines changed: 348 additions & 34 deletions

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
## Readme
2525

2626
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
27-
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-pixapop/edit/master/readme-vars.yml).
27+
Instead edit the [readme-vars.yml](https://github.com/lsiocommunity/docker-pixapop/edit/master/readme-vars.yml).
2828

2929
These variables are used in a template for our [Jenkins Builder](https://github.com/lsiocommunity/docker-jenkins-builder) as part of an ansible play.
3030
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-pixapop)
@@ -87,7 +87,7 @@ opt_param_volumes:
8787
8888
### Testing template changes
8989
90-
After you make any changes to the templates, you can use our [Jenkins Builder](https://github.com/lsiocommunity/docker-jenkins-builder) to have the files updated from the modified templates. Please use the command found under `Running Locally` [on this page](https://github.com/linuxserver/docker-jenkins-builder/blob/master/README.md) to generate them prior to submitting a PR.
90+
After you make any changes to the templates, you can use our [Jenkins Builder](https://github.com/lsiocommunity/docker-jenkins-builder) to have the files updated from the modified templates. Please use the command found under `Running Locally` [on this page](https://github.com/lsiocommunity/docker-jenkins-builder/blob/master/README.md) to generate them prior to submitting a PR.
9191

9292
## Dockerfiles
9393

@@ -114,7 +114,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
114114
115115
## Update the chagelog
116116
117-
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-pixapop/tree/master/root), add an entry to the changelog
117+
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/lsiocommunity/docker-pixapop/tree/master/root), add an entry to the changelog
118118
119119
```yml
120120
changelogs:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Discord chat support
4+
url: https://discord.gg/YWrKVTn
5+
about: Realtime support / chat with the community and the team.
6+
7+
- name: Discourse discussion forum
8+
url: https://discourse.linuxserver.io
9+
about: Post on our community forum.
10+
11+
- name: Documentation
12+
url: https://docs.linuxserver.io/images/docker-pixapop
13+
about: Documentation - information about all of our containers.
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
16
[linuxserverurl]: https://linuxserver.io
27
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
38

49
<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. --->
510

6-
<!--- If this acts as a feature request please ask yourself if this modification is something the whole userbase will benefit from --->
7-
<!--- If this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
8-
9-
<!--- Provide a general summary of the issue in the Title above -->
11+
<!--- Provide a general summary of the bug in the Title above -->
1012

1113
------------------------------
1214

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
[linuxserverurl]: https://linuxserver.io
7+
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
8+
9+
<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. --->
10+
11+
<!--- If this acts as a feature request please ask yourself if this modification is something the whole userbase will benefit from --->
12+
<!--- If this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
13+
14+
<!--- Provide a general summary of the request in the Title above -->
15+
16+
------------------------------
17+
18+
## Desired Behavior
19+
<!--- Tell us what should happen -->
20+
21+
## Current Behavior
22+
<!--- Tell us what happens instead of the expected behavior -->
23+
24+
## Alternatives Considered
25+
<!--- Tell us what other options you have tried or considered -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
------------------------------
2323

24-
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-pixapop/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
24+
- [ ] I have read the [contributing](https://github.com/lsiocommunity/docker-pixapop/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
2525

2626
------------------------------
2727

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: External Trigger Main
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
external-trigger-master:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2.3.3
11+
12+
- name: External Trigger
13+
if: github.ref == 'refs/heads/master'
14+
run: |
15+
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_PIXAPOP_MASTER }}" ]; then
16+
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_PIXAPOP_MASTER is set; skipping trigger. ****"
17+
exit 0
18+
fi
19+
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_PIXAPOP_MASTER\". ****"
20+
echo "**** Retrieving external version ****"
21+
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/bierdok/pixapop/releases/latest" | jq -r '. | .tag_name')
22+
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
23+
echo "**** Can't retrieve external version, exiting ****"
24+
FAILURE_REASON="Can't retrieve external version for pixapop branch master"
25+
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
26+
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
27+
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
28+
exit 1
29+
fi
30+
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
31+
echo "**** External version: ${EXT_RELEASE} ****"
32+
echo "**** Retrieving last pushed version ****"
33+
image="linuxserver/pixapop"
34+
tag="latest"
35+
token=$(curl -sX GET \
36+
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fpixapop%3Apull" \
37+
| jq -r '.token')
38+
multidigest=$(curl -s \
39+
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
40+
--header "Authorization: Bearer ${token}" \
41+
"https://ghcr.io/v2/${image}/manifests/${tag}" \
42+
| jq -r 'first(.manifests[].digest)')
43+
digest=$(curl -s \
44+
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
45+
--header "Authorization: Bearer ${token}" \
46+
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
47+
| jq -r '.config.digest')
48+
image_info=$(curl -sL \
49+
--header "Authorization: Bearer ${token}" \
50+
"https://ghcr.io/v2/${image}/blobs/${digest}" \
51+
| jq -r '.container_config')
52+
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
53+
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
54+
if [ -z "${IMAGE_VERSION}" ]; then
55+
echo "**** Can't retrieve last pushed version, exiting ****"
56+
FAILURE_REASON="Can't retrieve last pushed version for pixapop tag latest"
57+
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
58+
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
59+
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
60+
exit 1
61+
fi
62+
echo "**** Last pushed version: ${IMAGE_VERSION} ****"
63+
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
64+
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
65+
exit 0
66+
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-pixapop/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
67+
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
68+
exit 0
69+
else
70+
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
71+
response=$(curl -iX POST \
72+
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-pixapop/job/master/buildWithParameters?PACKAGE_CHECK=false \
73+
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
74+
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
75+
echo "**** Sleeping 10 seconds until job starts ****"
76+
sleep 10
77+
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
78+
buildurl="${buildurl%$'\r'}"
79+
echo "**** Jenkins job build url: ${buildurl} ****"
80+
echo "**** Attempting to change the Jenkins job description ****"
81+
curl -iX POST \
82+
"${buildurl}submitDescription" \
83+
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
84+
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
85+
--data-urlencode "Submit=Submit"
86+
echo "**** Notifying Discord ****"
87+
TRIGGER_REASON="A version change was detected for pixapop tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
88+
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
89+
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
90+
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
91+
fi
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: External Trigger Scheduler
2+
3+
on:
4+
schedule:
5+
- cron: '01 * * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
external-trigger-scheduler:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2.3.3
13+
with:
14+
fetch-depth: '0'
15+
16+
- name: External Trigger Scheduler
17+
run: |
18+
echo "**** Branches found: ****"
19+
git for-each-ref --format='%(refname:short)' refs/remotes
20+
echo "**** Pulling the yq docker image ****"
21+
docker pull ghcr.io/linuxserver/yq
22+
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
23+
do
24+
br=$(echo "$br" | sed 's|origin/||g')
25+
echo "**** Evaluating branch ${br} ****"
26+
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-pixapop/${br}/jenkins-vars.yml \
27+
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
28+
if [ "$br" == "$ls_branch" ]; then
29+
echo "**** Branch ${br} appears to be live; checking workflow. ****"
30+
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-pixapop/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
31+
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
32+
curl -iX POST \
33+
-H "Authorization: token ${{ secrets.CR_PAT }}" \
34+
-H "Accept: application/vnd.github.v3+json" \
35+
-d "{\"ref\":\"refs/heads/${br}\"}" \
36+
https://api.github.com/repos/linuxserver/docker-pixapop/actions/workflows/external_trigger.yml/dispatches
37+
else
38+
echo "**** Workflow doesn't exist; skipping trigger. ****"
39+
fi
40+
else
41+
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
42+
fi
43+
done

.github/workflows/greetings.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ jobs:
88
steps:
99
- uses: actions/first-interaction@v1
1010
with:
11-
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [issue template](https://github.com/linuxserver/docker-pixapop/blob/master/.github/ISSUE_TEMPLATE.md)!'
12-
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-pixapop/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
11+
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [issue template](https://github.com/lsiocommunity/docker-pixapop/blob/master/.github/ISSUE_TEMPLATE.md)!'
12+
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/lsiocommunity/docker-pixapop/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Package Trigger Main
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
package-trigger-master:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2.3.3
11+
12+
- name: Package Trigger
13+
if: github.ref == 'refs/heads/master'
14+
run: |
15+
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_PIXAPOP_MASTER }}" ]; then
16+
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_PIXAPOP_MASTER is set; skipping trigger. ****"
17+
exit 0
18+
fi
19+
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-pixapop/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
20+
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
21+
exit 0
22+
fi
23+
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_PIXAPOP_MASTER\". ****"
24+
response=$(curl -iX POST \
25+
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-pixapop/job/master/buildWithParameters?PACKAGE_CHECK=true \
26+
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
27+
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
28+
echo "**** Sleeping 10 seconds until job starts ****"
29+
sleep 10
30+
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
31+
buildurl="${buildurl%$'\r'}"
32+
echo "**** Jenkins job build url: ${buildurl} ****"
33+
echo "**** Attempting to change the Jenkins job description ****"
34+
curl -iX POST \
35+
"${buildurl}submitDescription" \
36+
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
37+
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
38+
--data-urlencode "Submit=Submit"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Package Trigger Scheduler
2+
3+
on:
4+
schedule:
5+
- cron: '40 13 * * 4'
6+
workflow_dispatch:
7+
8+
jobs:
9+
package-trigger-scheduler:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2.3.3
13+
with:
14+
fetch-depth: '0'
15+
16+
- name: Package Trigger Scheduler
17+
run: |
18+
echo "**** Branches found: ****"
19+
git for-each-ref --format='%(refname:short)' refs/remotes
20+
echo "**** Pulling the yq docker image ****"
21+
docker pull ghcr.io/linuxserver/yq
22+
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
23+
do
24+
br=$(echo "$br" | sed 's|origin/||g')
25+
echo "**** Evaluating branch ${br} ****"
26+
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-pixapop/${br}/jenkins-vars.yml \
27+
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
28+
if [ "${br}" == "${ls_branch}" ]; then
29+
echo "**** Branch ${br} appears to be live; checking workflow. ****"
30+
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-pixapop/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
31+
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
32+
triggered_branches="${triggered_branches}${br} "
33+
curl -iX POST \
34+
-H "Authorization: token ${{ secrets.CR_PAT }}" \
35+
-H "Accept: application/vnd.github.v3+json" \
36+
-d "{\"ref\":\"refs/heads/${br}\"}" \
37+
https://api.github.com/repos/linuxserver/docker-pixapop/actions/workflows/package_trigger.yml/dispatches
38+
sleep 30
39+
else
40+
echo "**** Workflow doesn't exist; skipping trigger. ****"
41+
fi
42+
else
43+
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
44+
fi
45+
done
46+
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
47+
echo "**** Notifying Discord ****"
48+
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
49+
"description": "**Package Check Build(s) Triggered for pixapop** \n**Branch(es):** '"${triggered_branches}"' \n**Build URL:** '"https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-pixapop/activity/"' \n"}],
50+
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}

0 commit comments

Comments
 (0)