[Rt-commit] rt branch 5.0/github-actions-bugfixes created. rt-5.0.1-612-g495b9e777b
BPS Git Server
git at git.bestpractical.com
Mon Aug 23 19:34:55 UTC 2021
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/github-actions-bugfixes has been created
at 495b9e777b21be2133341ba8371225233f02fc3c (commit)
- Log -----------------------------------------------------------------
commit 495b9e777b21be2133341ba8371225233f02fc3c
Author: Brett Smith <brett at bestpractical.com>
Date: Tue Aug 10 09:12:33 2021 -0400
Migrate from Docker links to networks
This is futureproofing. Docker links are deprecated; see
<https://docs.docker.com/network/links/>.
diff --git a/.github/workflows/github-action.yml b/.github/workflows/github-action.yml
index de0d097344..fd2494f4d1 100644
--- a/.github/workflows/github-action.yml
+++ b/.github/workflows/github-action.yml
@@ -63,10 +63,11 @@ jobs:
- name: Build RT
shell: bash
run: |
- docker run --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb:10.3
- docker build -t rt-base .
- docker run -d -v $GITHUB_WORKSPACE:/rt --name rt --link mariadb:db rt-base
- docker exec rt bash -c "cd /rt && ./configure.ac --with-db-type=mysql --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps"
+ docker network create rt
+ docker run --network rt --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb:10.3
+ docker build --network rt -t rt-base .
+ docker run -d -v $GITHUB_WORKSPACE:/rt --env RT_TEST_DB_HOST=mariadb --env RT_TEST_RT_HOST=172.16.0.0/255.240.0.0 --network rt --name rt rt-base
+ docker exec rt bash -c 'cd /rt && ./configure.ac --with-db-type=mysql --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps'
- name: Run RT tests
shell: bash
run: docker exec rt bash -c "cd /rt && prove -lj6 t/*"
@@ -109,9 +110,10 @@ jobs:
- name: Build RT
shell: bash
run: |
- docker run --name postgresql --mount type=tmpfs,destination=/var/lib/postgresql/data -e POSTGRES_PASSWORD=password -d postgres:9.6
- docker build -t rt-base .
- docker run -d -v $GITHUB_WORKSPACE:/rt --name rt --link postgresql:db rt-base
+ docker network create rt
+ docker run --network rt --name postgresql --mount type=tmpfs,destination=/var/lib/postgresql/data -e POSTGRES_PASSWORD=password -d postgres:9.6
+ docker build --network rt -t rt-base .
+ docker run -d -v $GITHUB_WORKSPACE:/rt --env RT_TEST_DB_HOST=postgresql --network rt --name rt rt-base
docker exec rt bash -c "chown -R rt-user /rt; touch /etc/apache2/mime.types"
docker exec -e USER=rt-user -u rt-user rt bash -c "cd /rt && ./configure.ac --with-db-type=Pg --with-my-user-group --enable-layout=inplace --with-web-handler=fcgid --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps && chmod a+rX /rt/sbin/*"
- name: Run RT tests
commit 36cd8b94d06707521b70f12aecea012d99eb7fef
Author: Brett Smith <brett at bestpractical.com>
Date: Tue Aug 10 09:15:17 2021 -0400
Clean up Travis cruft from GitHub Actions
These lines are simply carried over and commented out from our Travis
pipeline. They don't mean anything special to GitHub Actions. I thought
they might, so clean those up to prevent future readers from going down
the same rabbit hole.
diff --git a/.github/workflows/github-action.yml b/.github/workflows/github-action.yml
index 16ecde70e4..de0d097344 100644
--- a/.github/workflows/github-action.yml
+++ b/.github/workflows/github-action.yml
@@ -1,6 +1,3 @@
-#language: bash
-#services: docker
-
on:
push:
branches-ignore:
commit e858ce553ec8f317b9bbcee6c78c7ac7b173505e
Author: Brett Smith <brett at bestpractical.com>
Date: Tue Aug 10 08:49:05 2021 -0400
Remove `docker ps` calls from GitHub Actions
This is strictly an informational command. It's basically acting as a
debug print here. I don't think it's worth keeping anymore.
diff --git a/.github/workflows/github-action.yml b/.github/workflows/github-action.yml
index ede54fa6b8..16ecde70e4 100644
--- a/.github/workflows/github-action.yml
+++ b/.github/workflows/github-action.yml
@@ -23,7 +23,6 @@ jobs:
run: |
docker build -t rt-base .
docker run -d -v $GITHUB_WORKSPACE:/rt --name rt rt-base
- docker ps -a
docker exec rt bash -c "cd /rt && ./configure.ac --with-db-type=SQLite --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps"
- name: Run RT tests
shell: bash
@@ -70,7 +69,6 @@ jobs:
docker run --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb:10.3
docker build -t rt-base .
docker run -d -v $GITHUB_WORKSPACE:/rt --name rt --link mariadb:db rt-base
- docker ps -a
docker exec rt bash -c "cd /rt && ./configure.ac --with-db-type=mysql --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps"
- name: Run RT tests
shell: bash
@@ -117,7 +115,6 @@ jobs:
docker run --name postgresql --mount type=tmpfs,destination=/var/lib/postgresql/data -e POSTGRES_PASSWORD=password -d postgres:9.6
docker build -t rt-base .
docker run -d -v $GITHUB_WORKSPACE:/rt --name rt --link postgresql:db rt-base
- docker ps -a
docker exec rt bash -c "chown -R rt-user /rt; touch /etc/apache2/mime.types"
docker exec -e USER=rt-user -u rt-user rt bash -c "cd /rt && ./configure.ac --with-db-type=Pg --with-my-user-group --enable-layout=inplace --with-web-handler=fcgid --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps && chmod a+rX /rt/sbin/*"
- name: Run RT tests
commit 94dbf9b8d1227e785338ad876e2876641d14f373
Author: Brett Smith <brett at bestpractical.com>
Date: Tue Aug 10 08:43:42 2021 -0400
Remove unused envvars from GitHub Actions
Docker containers and images only get environment variables explicitly
defined in the Dockerfile or `docker` command. Most of the `env` blocks
in our step definitions are therefore noops and can be safely removed.
Similarly, `--env` arguments that are already defined in the Dockerfile
are redundant and also noops. Clean those up too.
diff --git a/.github/workflows/github-action.yml b/.github/workflows/github-action.yml
index 523d2da3e1..ede54fa6b8 100644
--- a/.github/workflows/github-action.yml
+++ b/.github/workflows/github-action.yml
@@ -19,8 +19,6 @@ jobs:
- name: Check out RT
uses: actions/checkout at v2
- name: Build RT
- env:
- RT_TEST_PARALLEL: 1
shell: bash
run: |
docker build -t rt-base .
@@ -29,7 +27,7 @@ jobs:
docker exec rt bash -c "cd /rt && ./configure.ac --with-db-type=SQLite --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps"
- name: Run RT tests
shell: bash
- run: docker exec -e RT_TEST_PARALLEL=1 rt bash -c "cd /rt && prove -lj6 t/*"
+ run: docker exec rt bash -c "cd /rt && prove -lj6 t/*"
- name: Get run time
if: always()
shell: bash
@@ -67,26 +65,16 @@ jobs:
- name: Checkout RT
uses: actions/checkout at v2
- name: Build RT
- env:
- RT_TEST_PARALLEL: 1
- RT_DBA_USER: root
- RT_DBA_PASSWORD: password
- DB_VERSION_TAG: 10.3
shell: bash
run: |
- docker run --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb:$DB_VERSION_TAG
+ docker run --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb:10.3
docker build -t rt-base .
docker run -d -v $GITHUB_WORKSPACE:/rt --name rt --link mariadb:db rt-base
docker ps -a
docker exec rt bash -c "cd /rt && ./configure.ac --with-db-type=mysql --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps"
- name: Run RT tests
- env:
- RT_TEST_PARALLEL: 1
- RT_DBA_USER: root
- RT_DBA_PASSWORD: password
- DB_VERSION_TAG: 10.3
shell: bash
- run: docker exec -e RT_TEST_PARALLEL=1 -e RT_DBA_USER=root -e RT_DBA_PASSWORD=password rt bash -c "cd /rt && prove -lj6 t/*"
+ run: docker exec rt bash -c "cd /rt && prove -lj6 t/*"
- name: Get run time
if: always()
shell: bash
@@ -124,31 +112,17 @@ jobs:
- name: Checkout RT
uses: actions/checkout at v2
- name: Build RT
- env:
- DB_VERSION_TAG: 9.6
- RT_TEST_PARALLEL: 1
- RT_TEST_WEB_HANDLER: apache+fcgid
- HTTPD_ROOT: /etc/apache2
- RT_TEST_APACHE: /usr/sbin/apache2
- RT_TEST_APACHE_MODULES: /usr/lib/apache2/modules
shell: bash
run: |
- docker run --name postgresql --mount type=tmpfs,destination=/var/lib/postgresql/data -e POSTGRES_PASSWORD=password -d postgres:$DB_VERSION_TAG
+ docker run --name postgresql --mount type=tmpfs,destination=/var/lib/postgresql/data -e POSTGRES_PASSWORD=password -d postgres:9.6
docker build -t rt-base .
docker run -d -v $GITHUB_WORKSPACE:/rt --name rt --link postgresql:db rt-base
docker ps -a
docker exec rt bash -c "chown -R rt-user /rt; touch /etc/apache2/mime.types"
docker exec -e USER=rt-user -u rt-user rt bash -c "cd /rt && ./configure.ac --with-db-type=Pg --with-my-user-group --enable-layout=inplace --with-web-handler=fcgid --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps && chmod a+rX /rt/sbin/*"
- name: Run RT tests
- env:
- DB_VERSION_TAG: 9.6
- RT_TEST_PARALLEL: 1
- RT_TEST_WEB_HANDLER: apache+fcgid
- HTTPD_ROOT: /etc/apache2
- RT_TEST_APACHE: /usr/sbin/apache2
- RT_TEST_APACHE_MODULES: /usr/lib/apache2/modules
shell: bash
- run: docker exec -e RT_TEST_PARALLEL=1 -e RT_DBA_USER=postgres -e RT_DBA_PASSWORD=password -u rt-user rt bash -c "cd /rt && prove -lj6 t/*"
+ run: docker exec -e RT_DBA_USER=postgres -u rt-user rt bash -c "cd /rt && prove -lj6 t/*"
- name: Get run time
if: always()
shell: bash
commit b54c069f44275055177cc9febb08ae86a5a1f53c
Author: Brett Smith <brett at bestpractical.com>
Date: Tue Aug 10 08:33:24 2021 -0400
Always get run time of GitHub Actions tests
The Slack notification always uses the variables set in this step, no
matter the status of the earlier steps of the job, so this step needs to
always run too. Otherwise the Slack notification for failed tests
reports the time as "undefined".
diff --git a/.github/workflows/github-action.yml b/.github/workflows/github-action.yml
index f706368ad6..523d2da3e1 100644
--- a/.github/workflows/github-action.yml
+++ b/.github/workflows/github-action.yml
@@ -31,6 +31,7 @@ jobs:
shell: bash
run: docker exec -e RT_TEST_PARALLEL=1 rt bash -c "cd /rt && prove -lj6 t/*"
- name: Get run time
+ if: always()
shell: bash
run: |
export RT_GA_END_TIME=$(date +%s)
@@ -87,6 +88,7 @@ jobs:
shell: bash
run: docker exec -e RT_TEST_PARALLEL=1 -e RT_DBA_USER=root -e RT_DBA_PASSWORD=password rt bash -c "cd /rt && prove -lj6 t/*"
- name: Get run time
+ if: always()
shell: bash
run: |
export RT_GA_END_TIME=$(date +%s)
@@ -148,6 +150,7 @@ jobs:
shell: bash
run: docker exec -e RT_TEST_PARALLEL=1 -e RT_DBA_USER=postgres -e RT_DBA_PASSWORD=password -u rt-user rt bash -c "cd /rt && prove -lj6 t/*"
- name: Get run time
+ if: always()
shell: bash
run: |
export RT_GA_END_TIME=$(date +%s)
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list