Skip to content
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

Migrate to GitHub actions #223

Open
wants to merge 145 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
99a4231
Initial commit
trivord88 Jul 30, 2022
9e63e38
Added pipeline
trivord88 Jul 30, 2022
ac6e181
Added pipeline
trivord88 Jul 30, 2022
459eeb8
Fix variables
trivord88 Jul 30, 2022
6279af6
Fix variables
trivord88 Jul 30, 2022
c40e322
Fix variables
trivord88 Jul 30, 2022
c4d6b8d
Fix variables
trivord88 Jul 30, 2022
ec51984
Fix variables
trivord88 Jul 30, 2022
9581e5b
Fix variables
trivord88 Jul 30, 2022
60093cc
Fix variables
trivord88 Jul 30, 2022
c2c5cd9
Fix variables
trivord88 Jul 30, 2022
1bd2e03
Add cache
trivord88 Jul 30, 2022
cf58e5c
Add cache
trivord88 Jul 30, 2022
009d4e4
Fix cache
trivord88 Jul 30, 2022
dad5014
Fix cache
trivord88 Jul 30, 2022
2b0e4d0
Fix cache
trivord88 Jul 30, 2022
cf74af6
Fix cache
trivord88 Jul 30, 2022
dfa11e7
Fix cache
trivord88 Jul 30, 2022
a3fa049
Fix cache
trivord88 Jul 30, 2022
1818313
Fix cache
trivord88 Jul 30, 2022
9cb43c3
Templated release name
trivord88 Jul 30, 2022
4c5b532
Templated release name
trivord88 Jul 30, 2022
cddd2c0
Templated release name
trivord88 Jul 30, 2022
d0cf14f
Added few next steps
trivord88 Aug 1, 2022
958dcdf
Added few next steps
trivord88 Aug 1, 2022
71cbefd
Added few next steps
trivord88 Aug 1, 2022
54bcf61
Added few next steps
trivord88 Aug 1, 2022
290ea89
Added few next steps
trivord88 Aug 1, 2022
b090190
Added few next steps
trivord88 Aug 1, 2022
209a192
Added few next steps
trivord88 Aug 1, 2022
6cffa21
Added few next steps
trivord88 Aug 1, 2022
4584a24
Debug git rev-parse
trivord88 Aug 1, 2022
42445a2
Debug git rev-parse
trivord88 Aug 1, 2022
0776e57
Debug git rev-parse
trivord88 Aug 1, 2022
bf4e207
Debug git rev-parse
trivord88 Aug 1, 2022
acc1c98
Debug git rev-parse
trivord88 Aug 1, 2022
e623bfb
Debug git rev-parse
trivord88 Aug 1, 2022
e85e158
Debug git rev-parse
trivord88 Aug 1, 2022
a4ae2a7
Debug git rev-parse
trivord88 Aug 1, 2022
44b7aca
Debug git rev-parse
trivord88 Aug 1, 2022
8a305b9
Debug git rev-parse
trivord88 Aug 1, 2022
771584e
Debug git rev-parse
trivord88 Aug 1, 2022
c9993f1
Debug git rev-parse
trivord88 Aug 1, 2022
bfaff02
Add next job
trivord88 Aug 1, 2022
54e56b1
Added more jobs
trivord88 Aug 1, 2022
56384c3
Build workflow refactoring
trivord88 Aug 1, 2022
a96088e
Build workflow refactoring
trivord88 Aug 1, 2022
b510a89
Build workflow refactoring
trivord88 Aug 1, 2022
0d93f10
Build workflow refactoring
trivord88 Aug 1, 2022
61eb5e1
Build workflow refactoring
trivord88 Aug 1, 2022
afff97c
Build workflow refactoring
trivord88 Aug 1, 2022
b668ac4
Build workflow refactoring
trivord88 Aug 1, 2022
9aa7f4c
Build workflow refactoring
trivord88 Aug 1, 2022
02f9393
Build workflow refactoring
trivord88 Aug 1, 2022
5f6a771
Build workflow refactoring
trivord88 Aug 1, 2022
a89c222
Build workflow refactoring
trivord88 Aug 1, 2022
6ba535a
Build workflow refactoring
trivord88 Aug 1, 2022
34492ab
Build workflow refactoring
trivord88 Aug 1, 2022
786c4c3
Build workflow refactoring
trivord88 Aug 1, 2022
ec30d07
Build workflow refactoring
trivord88 Aug 1, 2022
6e96484
Build workflow refactoring
trivord88 Aug 1, 2022
69d5d72
Build workflow refactoring
trivord88 Aug 1, 2022
75502b4
Build workflow refactoring
trivord88 Aug 1, 2022
8149dcc
Build workflow refactoring
trivord88 Aug 1, 2022
930491d
Build workflow refactoring
trivord88 Aug 1, 2022
ab48777
Build workflow refactoring
trivord88 Aug 1, 2022
394a7ab
Build workflow refactoring
trivord88 Aug 1, 2022
3f76d5a
Build workflow refactoring
trivord88 Aug 1, 2022
7d5defe
Build workflow refactoring
trivord88 Aug 1, 2022
77976a0
Build workflow refactoring
trivord88 Aug 1, 2022
aaf1837
Build workflow refactoring
trivord88 Aug 1, 2022
4cfdc8f
Build workflow refactoring
trivord88 Aug 1, 2022
f614389
Build workflow refactoring
trivord88 Aug 1, 2022
1f8952c
Build workflow refactoring
trivord88 Aug 1, 2022
706a7f9
Build workflow refactoring
trivord88 Aug 1, 2022
d87af6b
Build workflow refactoring
trivord88 Aug 2, 2022
453502e
Add test workflow
trivord88 Aug 2, 2022
d513155
Add test workflow
trivord88 Aug 2, 2022
fbb6e73
Add test workflow
trivord88 Aug 2, 2022
f362f8d
Add test workflow
trivord88 Aug 2, 2022
5270f14
Add test workflow
trivord88 Aug 2, 2022
ba8c173
Add test workflow
trivord88 Aug 2, 2022
37b5cbf
Add test workflow
trivord88 Aug 2, 2022
4ff9f33
Add test workflow
trivord88 Aug 2, 2022
61941a4
Add test workflow
trivord88 Aug 2, 2022
d1605ae
Add test workflow
trivord88 Aug 2, 2022
ded302d
Add test workflow
trivord88 Aug 2, 2022
81d06b4
Add test workflow
trivord88 Aug 2, 2022
6a76a66
Add test workflow
trivord88 Aug 2, 2022
7bbc75b
Add test workflow
trivord88 Aug 2, 2022
fee9560
Add test workflow
trivord88 Aug 2, 2022
38cf843
Add test workflow
trivord88 Aug 2, 2022
83a82cf
Add test workflow
trivord88 Aug 2, 2022
5c328eb
Add test workflow
trivord88 Aug 2, 2022
e646783
Add test workflow
trivord88 Aug 2, 2022
c9844c3
Add test workflow
trivord88 Aug 2, 2022
56cdef9
Add test workflow
trivord88 Aug 2, 2022
29a4b14
Code coverage report
trivord88 Aug 3, 2022
1eeb1ea
Code coverage report
trivord88 Aug 3, 2022
2737913
Code coverage report
trivord88 Aug 3, 2022
ca84485
Code coverage report
trivord88 Aug 3, 2022
7e526bc
Code coverage report
trivord88 Aug 3, 2022
efddf63
Code coverage report
trivord88 Aug 3, 2022
b999e54
Code coverage report
trivord88 Aug 3, 2022
f8badfd
Code coverage report
trivord88 Aug 3, 2022
7c818eb
Code coverage report
trivord88 Aug 3, 2022
f007b99
Code coverage report
trivord88 Aug 3, 2022
c49e7c0
Code coverage report
trivord88 Aug 3, 2022
3603dbb
Code coverage report
trivord88 Aug 3, 2022
d25f132
Code coverage report
trivord88 Aug 3, 2022
38fa713
Code coverage report
trivord88 Aug 3, 2022
d8ca509
Code coverage report
trivord88 Aug 3, 2022
d4f99e9
Added project tests
trivord88 Aug 3, 2022
31bec29
Added project tests
trivord88 Aug 3, 2022
e1c86fe
Added project tests
trivord88 Aug 3, 2022
2bab8db
Added project tests
trivord88 Aug 3, 2022
84f918e
Add push workflow
trivord88 Aug 8, 2022
91dc906
Set target branches for build
trivord88 Aug 8, 2022
3dc95ba
Set target branches for build
trivord88 Aug 8, 2022
0fec29e
Set workflow sequence
trivord88 Aug 8, 2022
cf30ded
Test full pipeline
trivord88 Aug 8, 2022
31f33ee
Test full pipeline
trivord88 Aug 8, 2022
3a79b5f
Test full pipeline
trivord88 Aug 8, 2022
5f2a7df
Test full pipeline
trivord88 Aug 8, 2022
9e23625
Test full pipeline
trivord88 Aug 8, 2022
915dd1d
Test full pipeline
trivord88 Aug 8, 2022
2c0351b
Test full pipeline
trivord88 Aug 8, 2022
3a16bf0
Test full pipeline
trivord88 Aug 8, 2022
b8679c3
Test full pipeline
trivord88 Aug 8, 2022
0f859d0
Test full pipeline
trivord88 Aug 8, 2022
90e5f3e
Test full pipeline
trivord88 Aug 8, 2022
f1dd840
Test full pipeline
trivord88 Aug 8, 2022
6d8caa7
Test full pipeline
trivord88 Aug 8, 2022
6a7a491
Added separate workflow on push
trivord88 Aug 16, 2022
17882a7
Added separate workflow on push
trivord88 Aug 16, 2022
fd27565
Added separate workflow on push
trivord88 Aug 16, 2022
0409505
Added separate workflow on push
trivord88 Aug 16, 2022
7e359e6
Added separate workflow on push
trivord88 Aug 16, 2022
40da16b
Added separate workflow on push
trivord88 Aug 16, 2022
67bd14a
Added separate workflow on push
trivord88 Aug 16, 2022
ec2f582
Added separate workflow on push
trivord88 Aug 16, 2022
ae64702
Added separate workflow on push
trivord88 Aug 16, 2022
88beead
Added separate workflow on push
trivord88 Aug 16, 2022
367fb8e
Added separate workflow on push
trivord88 Aug 16, 2022
d6be431
Added separate workflow on push
trivord88 Aug 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
402 changes: 402 additions & 0 deletions .github/workflows/build.yml

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: on_push

on: push

jobs:
build:
uses: ./.github/workflows/build.yml

test:
uses: ./.github/workflows/test.yml
needs: [build]

push:
uses: ./.github/workflows/push.yml
needs: [build, test]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
69 changes: 69 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Push

on:
workflow_call:

env:
CACHE_KEY_BASE: 22 # Increment this value to reset the images cache
CACHE_KEY_FILES: ${{ github.workspace }}/docker-definition
CACHE_KEY_IMAGES: BASE_SEED=$CACHE_KEY_BASE | $CACHE_KEY_FILES
IMAGE_CACHE_PATH: ${{ github.workspace }}/image_cache
SENTINEL_CACHE_PATH: ${{ github.workspace }}/sentinel_cache

jobs:
Push:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
OPENEDX_RELEASE: [juniper, koa, lilac]

steps:
- uses: actions/checkout@v3

- name: Docker images sentinel cache
id: cache-sentinel
uses: actions/cache@v3
with:
path: $SENTINEL_CACHE_PATH
key: SENTINEL=1 | ${{ matrix.OPENEDX_RELEASE }} | $CACHE_KEY_IMAGES

- name: Set needs_push pipeline variable
run: |
IMAGE="derex/openedx-${{ matrix.OPENEDX_RELEASE }}-dev:$(grep __version__ derex/runner/__init__.py |sed 's/[^"]*"//;s/"//')"
echo Checking presence of ${IMAGE} on docker registry
docker manifest inspect ${IMAGE} || { echo "NEEDS_PUSH=true" >> $GITHUB_ENV; echo Image not found: pushing ; }

- name: Log into docker registry
if: env.NEEDS_PUSH != 'false'
run: docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}
env:
DOCKER_USERNAME: $(DOCKER_USERNAME)
DOCKER_PASSWORD: $(DOCKER_PASSWORD)

- name: Docker images cache
if: steps.cache-sentinel.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: $IMAGE_CACHE_PATH
key: BASE_SEED=$CACHE_KEY_BASE | ${{ matrix.OPENEDX_RELEASE }} | $CACHE_KEY_IMAGES
restore-keys: BASE_SEED=$CACHE_KEY_BASE | ${{ matrix.OPENEDX_RELEASE }}

- name: Load images
if: steps.cache-sentinel.outputs.cache-hit != 'true'
run: |
[ -d $IMAGE_CACHE_PATH ] || exit 0
ls -l $IMAGE_CACHE_PATH
docker images
set -euxo pipefail
cat $IMAGE_CACHE_PATH/edx-${{ matrix.OPENEDX_RELEASE }}.tar.xz | unxz | docker load
docker images

- name: Push dev image
if: env.NEEDS_PUSH != 'false'
run: docker push derex/openedx-${{ matrix.OPENEDX_RELEASE }}-dev:$(grep __version__ derex/runner/__init__.py |sed 's/[^"]*"//;s/"//')

- name: Push nostatic image
if: env.NEEDS_PUSH != 'false'
run: docker push derex/openedx-${{ matrix.OPENEDX_RELEASE }}-nostatic:$(grep __version__ derex/runner/__init__.py |sed 's/[^"]*"//;s/"//')
Loading