Skip to content

Commit eaa89f3

Browse files
committed
Testing the disable Apparmor
1 parent 9b6e35a commit eaa89f3

18 files changed

+101
-2
lines changed

.github/workflows/smoke-anaconda.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-base-alpine.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
id: smoke_test
2631
uses: ./.github/actions/smoke-test

.github/workflows/smoke-base-debian.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-base-ubuntu.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-cpp.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
id: smoke_test
2631
uses: ./.github/actions/smoke-test

.github/workflows/smoke-dotnet.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
id: smoke_test
2631
env:

.github/workflows/smoke-go.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-java.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
id: checkout
2323
uses: actions/checkout@v3
2424

25+
- name: Disable AppArmor
26+
run: |
27+
set -e
28+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
29+
2530
- name: Smoke test java
2631
env:
2732
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-javascript-node.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-jekyll.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
id: smoke_test
2631
uses: ./.github/actions/smoke-test

.github/workflows/smoke-miniconda.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-php.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-python.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-ruby.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-rust.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-typescript-node.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
id: checkout
2222
uses: actions/checkout@v3
2323

24+
- name: Disable AppArmor
25+
run: |
26+
set -e
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
28+
2429
- name: Smoke test
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/smoke-universal.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,25 @@ jobs:
1919
- name: Checkout
2020
id: checkout
2121
uses: actions/checkout@v3
22+
- name: Disable AppArmor
23+
run: |
24+
set -e
25+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
26+
- name: Get userUid from host machine
27+
id: get-useruid
28+
run: |
29+
set -e
30+
USER_UID=$(id -u)
31+
USER_GID=$(id -g)
32+
echo "UserUid::$USER_UID"
33+
echo "UserGid::$USER_GID"
34+
echo "USER_UID=$USER_UID" >> $GITHUB_ENV
35+
echo "USER_GID=$USER_GID" >> $GITHUB_ENV
2236
- name: Smoke test
2337
env:
2438
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
USER_UID: ${{ env.USER_UID }}
40+
USER_GID: ${{ env.USER_GID }}
2541
id: smoke_test
2642
uses: ./.github/actions/smoke-test
2743
with:

src/universal/.devcontainer/devcontainer.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
"features": {
77
"ghcr.io/devcontainers/features/common-utils:2": {
88
"username": "codespace",
9-
"userUid": "1000",
10-
"userGid": "1000"
9+
//Getting the UID & GID values of the host machine via GitHub actions
10+
//"userUid": "1000",
11+
//"userGid": "1000"
12+
"userUid": "${localEnv:USER_UID}",
13+
"userGid": "${localEnv:USER_GID}"
1114
},
1215
"ghcr.io/devcontainers/features/dotnet:2": {
1316
"version": "8.0",

0 commit comments

Comments
 (0)