Skip to content

chore: upgrade dockerfile ubuntu version #201

chore: upgrade dockerfile ubuntu version

chore: upgrade dockerfile ubuntu version #201

Workflow file for this run

name: codejail-ci
on:
push:
branches:
- master
pull_request:
jobs:
codejail_ci:
name: tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
include:
- python_version: '3.8'
docker_tag: latest
- os: 'ubuntu-20.04'
ubuntu_image: ubuntu:focal
docker_tag: '3.11'
python_version: '3.11'
- os: 'ubuntu-22.04'
ubuntu_image: ubuntu:jammy
docker_tag: '3.11'
python_version: '3.11'
- os: 'ubuntu-24.04'
ubuntu_image: ubuntu:noble
docker_tag: '3.11'
python_version: '3.11'
steps:
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.TOOLS_EDX_ECR_USER_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.TOOLS_EDX_ECR_USER_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Parse custom apparmor profile
run: sudo apparmor_parser -r -W apparmor-profiles/home.sandbox.codejail_sandbox-python3.bin.python
- name: Pull codejail CI image
run: docker pull 257477529851.dkr.ecr.us-east-1.amazonaws.com/openedx-codejail:latest
- name: Build latest code changes into CI image
run: |
docker build --cache-from 257477529851.dkr.ecr.us-east-1.amazonaws.com/openedx-codejail \
-t 257477529851.dkr.ecr.us-east-1.amazonaws.com/openedx-codejail \
--build-arg python_version=${{ matrix.python_version }} \
--build-arg ubuntu_image=${{ matrix.ubuntu_image }} .
- name: Run container with custom apparmor profile and codejail CI image
run: |
docker run --name=codejail --privileged -d --security-opt apparmor=apparmor_profile \
257477529851.dkr.ecr.us-east-1.amazonaws.com/openedx-codejail tail -f /dev/null
- name: Run Non Proxy Tests
continue-on-error: true
run: docker exec -t codejail bash -c 'make clean && make test_no_proxy'
- name: Run Proxy Tests
run: docker exec -t codejail bash -c 'make clean && make test_proxy'
- name: Run Quality Tests
run: docker exec -t codejail bash -c 'make quality'