Skip to content

Commit c2dc816

Browse files
hotzenklotzrobert-oleynikcoderabbitai[bot]normanrz
authored
Convert CircleCI config to Github Actions (#8147)
* convert circle ci config to github actions * use new docker compose syntax * only run github actions on PRs and master branch * CI * fix yarn lockfile * CI * CI * Ci * CI * CI * sudo! * sudo * bump ubuntu version * CI * use different package names for ubuntu * CI * enable ssh debug * CI * CI * add sbt action * ci * ci * CI * CI * CI * CI * enable ssh debugging * set postgres url * CI * CI * ci * ci * ci * CI * ci * ci * ci * ci * ci * Update .github/workflows/build_test_deploy.yml Co-authored-by: robert-oleynik <[email protected]> * Update .github/workflows/build_test_deploy.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update .github/workflows/build_test_deploy.yml Co-authored-by: robert-oleynik <[email protected]> * fix directory permissions * fix GA composite action path * add postgres env to e2e tests * CI * Replace postgres hostname with localhost:5432 * change port for CI postgres container * log docker containers * fix postgres ports * mkdir Organization_X * unzip test dataset * fix unzip order * add cache for sbt and yarn * update hash files expression * use cache of setup-node * remove node caching * rework build_test_deploy step * fix indentation * fix action uses * fix github actions expression * enable corepack * prepare e2e tests * add tmate sessions * cache node modules * reorder steps and set explicit context * fix quoting * fix quoting * fix yarn.lock path * fix docker flags * reorder backend tests * ci run as non root * remove unnecessary cache * fix node_modules caching * add dbtool asserts and fix permissions * add postgres user env * move environment to job declaration * use postgres env from global scope * fix user permissions * fix postgres url * fix path and reorder steps * fix binary data path * move e2e test to separate stage * run e2e tests without retry * merge all pipeline build and test stages and disable caches * add <cstdint> header * fix docker tags * fix docker tag for compose * add separate e2e-test * fix docker tag reference * add backend tests * add system dependencies to backend tests * add tmate debugging sessions * remove backend-test job * add node to e2e tests * add missing environment * update checkout action to v4 * add tmate debugging session * merge end-to-end test and build job * fix DOCKER_TAG * replace build job with one-to-one port of circle ci * fix build_test_deploy step * use docker compose instead of docker-compose * add tmate debugging session * fix CI * replace not-on-master script with checks * replace string literal for branch checks * use native sbt, nod and yarn and upadte env * setup postgres env * remove slack notification * install system dependencies * fix typo * generate WK_VERSION from github.run_number * add services and docker action * fix typos * fix namespace name * fix typo * fix typo * remove conflicting port * run e2e tests without docker compose * ci: pg_isready with correct user * bucketScanner.cpp add missing dependency * fix pg_isready command * use docker compose instead of GitHub services * fossildb open ports * fix fossildb startup command * fix e2e-test command * use smoke test action * add missing redis port * fix smoke test url * cleanup old commands * add custom retry action * add separate backend test step * add pull policy * add extra debugging step * remove backend-tests * fix docker image export * remove double frontend tests * create separate backend test job * backend tests install system dependencies * backend tests start postgres * fix typo * fix docker driver * backend tests install node * prevent backend tests from running on master * fix typo * remove node_modules caches * cleanup jobs * remove cache * fix retry e2e test command * remove coverage step * move Dockerfiles to .github directory * setup slack notifications and fix branch enumeration * fix permissions * remove debug options * fix fossildb command * fix dockerfile naming * apply suggestions and fix errors * add missing env * add cerficate env * rename secret * enable slack notifications only on master * cleanup .github * cleanup circle ci and old dockerfiles * fix normalized branch name * Apply suggestions from code review Co-authored-by: Norman Rzepka <[email protected]> * fix branch conditions and environment variables * add debugging session * use GITHUB_HEAD_REF * remove tmate session * update changelog * fix CI_BUILD_NUM env * Update CHANGELOG.unreleased.md --------- Co-authored-by: robert-oleynik <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Robert Oleynik <[email protected]> Co-authored-by: Norman Rzepka <[email protected]>
1 parent 772ae17 commit c2dc816

17 files changed

+466
-641
lines changed

.circleci/config.yml

Lines changed: 0 additions & 217 deletions
This file was deleted.

.circleci/not-on-master.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

.circleci/slack-notification.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

webknossos-datastore/Dockerfile renamed to .github/Dockerfile.datastore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ VOLUME /webknossos-datastore/binaryData /tmp
1515
COPY target/universal/stage .
1616

1717
RUN chown -R webknossos . \
18-
&& chmod go+x bin/webknossos-datastore \
18+
&& chmod +x bin/webknossos-datastore \
1919
&& chmod go+w .
2020

2121
RUN echo '#!/bin/bash\numask 002\nbin/webknossos-datastore "$@"\n' > /docker-entrypoint.sh \

webknossos-tracingstore/Dockerfile renamed to .github/Dockerfile.tracingstore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ VOLUME /webknossos-tracingstore/tracingData /tmp
1616
COPY target/universal/stage .
1717

1818
RUN chown -R webknossos . \
19-
&& chmod go+x bin/webknossos-tracingstore \
19+
&& chmod +x bin/webknossos-tracingstore \
2020
&& chmod go+w .
2121

2222
RUN echo '#!/bin/bash\numask 002\nbin/webknossos-tracingstore "$@"\n' > /docker-entrypoint.sh \
@@ -31,4 +31,4 @@ HEALTHCHECK \
3131
EXPOSE 9050
3232

3333
ENTRYPOINT ["/docker-entrypoint.sh"]
34-
CMD ["-J-Xmx20G", "-J-Xms1G", "-Dconfig.file=conf/standalone-tracingstore.conf", "-Dlogger.file=conf/logback-docker.xml", "-Dlogback.configurationFile=conf/logback-docker.xml", "-Dhttp.port=9090", "-Dhttp.address=0.0.0.0"]
34+
CMD ["-J-Xmx20G", "-J-Xms1G", "-Dconfig.file=conf/standalone-tracingstore.conf", "-Dlogger.file=conf/logback-docker.xml", "-Dlogback.configurationFile=conf/logback-docker.xml", "-Dhttp.port=9050", "-Dhttp.address=0.0.0.0"]

Dockerfile renamed to .github/Dockerfile.webknossos

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ RUN curl -sL "https://deb.nodesource.com/setup_${VERSION_NODE}" | bash - \
88
RUN mkdir -p /webknossos
99
WORKDIR /webknossos
1010

11+
# Copy compiled Scala output from a previous build step, e.g. output of the Docker-dev image
1112
COPY target/universal/stage .
1213

1314
RUN addgroup --system --gid 999 webknossos \
1415
&& adduser --system --uid 999 --ingroup webknossos webknossos \
1516
&& mkdir disk \
1617
&& chown -R webknossos . \
17-
&& chmod go+x bin/webknossos \
18+
&& chmod +x bin/webknossos \
19+
&& chmod +x tools/postgres/dbtool.js \
1820
&& chmod go+w .
1921

2022
RUN echo '#!/bin/bash\numask 002\nbin/webknossos "$@"\n' > /docker-entrypoint.sh \

.github/actions/retry/action.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Shell Retry"
2+
description: "Runs a small shell script with retries"
3+
inputs:
4+
run:
5+
description: "Command to execute."
6+
required: true
7+
retries:
8+
description: "Maximum number of retries until failed"
9+
required: true
10+
retry_delay_seconds:
11+
description: "Amount of time to sleep between each retry"
12+
default: 0
13+
runs:
14+
using: 'composite'
15+
steps:
16+
- shell: bash
17+
run: |
18+
for i in {1..${{ inputs.retries }}}; do
19+
bash -c "$INPUT_COMMAND" && exit 0
20+
sleep "${{ inputs.retry_delay_seconds }}"
21+
done
22+
exit 1
23+
env:
24+
INPUT_COMMAND: ${{ inputs.run }}

0 commit comments

Comments
 (0)