Skip to content

Commit

Permalink
Merge pull request #889 from cncf/image-updates
Browse files Browse the repository at this point in the history
[feature/771] Github Actions: Env vars to configure docker images + new Alpine dockerfile for Crystal v1
  • Loading branch information
agentpoyo authored Aug 2, 2021
2 parents e2d6060 + e256d08 commit bd577bb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ jobs:
build:
name: Build Release
runs-on: ubuntu-latest
env:
CRYSTAL_IMAGE: "conformance/crystal:0.35.1-llvm10-grep"
# if: needs.skip.outputs.skip == 'false'
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -201,9 +204,9 @@ jobs:
lib-
- name: Build Release
run: |
docker pull conformance/crystal:0.35.1
docker run --rm -v $PWD:/workspace -w /workspace conformance/crystal:0.35.1-llvm10-grep shards install
docker run --rm -v $PWD:/workspace -w /workspace conformance/crystal:0.35.1-llvm10-grep crystal build --warnings none src/cnf-testsuite.cr --release --static --link-flags '-lxml2 -llzma'
docker pull $CRYSTAL_IMAGE
docker run --rm -v $PWD:/workspace -w /workspace $CRYSTAL_IMAGE shards install
docker run --rm -v $PWD:/workspace -w /workspace $CRYSTAL_IMAGE crystal build --warnings none src/cnf-testsuite.cr --release --static --link-flags '-lxml2 -llzma'
- name: upload artifact
uses: actions/upload-artifact@v2
with:
Expand All @@ -213,6 +216,8 @@ jobs:
setup_airgapped_env:
name: Test Setup Command In An Airgapped Env.
runs-on: [default]
env:
OFFLINE_IMAGE: "conformance/offline:latest"
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -258,7 +263,7 @@ jobs:
# gunzip airgapped.tar.gz
cp -a $(pwd) /shared/$DIR/cnf-testsuite
cp /tmp/airgapped.tar.gz /shared/$DIR/
docker run --name $DIR --network none --privileged -v /shared/$DIR/cnf-testsuite:/cnf-testsuite -v /shared/$DIR/airgapped.tar.gz:/airgapped/airgapped.tar.gz -v /shared/$DIR/tmpdata:/tmp -t conformance/offline:latest /bin/bash -c "LOG_LEVEL=info crystal src/cnf-testsuite.cr setup offline=/airgapped/airgapped.tar.gz; LOG_LEVEL=info crystal src/cnf-testsuite.cr install_litmus offline=true; kubectl get deployment chaos-operator-ce --namespace litmus; ./.github/workflows/check_litmus.sh"
docker run --name $DIR --network none --privileged -v /shared/$DIR/cnf-testsuite:/cnf-testsuite -v /shared/$DIR/airgapped.tar.gz:/airgapped/airgapped.tar.gz -v /shared/$DIR/tmpdata:/tmp -t $OFFLINE_IMAGE /bin/bash -c "LOG_LEVEL=info crystal src/cnf-testsuite.cr setup offline=/airgapped/airgapped.tar.gz; LOG_LEVEL=info crystal src/cnf-testsuite.cr install_litmus offline=true; kubectl get deployment chaos-operator-ce --namespace litmus; ./.github/workflows/check_litmus.sh"
- name: Delete Cluster
if: ${{ always() }}
run: |
Expand All @@ -274,6 +279,8 @@ jobs:
test_helm_chart_in_airgapped_env:
name: Test helm chart In An Airgapped Env.
runs-on: [default]
env:
OFFLINE_IMAGE: "conformance/offline:latest"
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -329,7 +336,7 @@ jobs:
# wget --auth-no-challenge --header='Accept:application/octet-stream' https://$GITHUB_TOKEN:@api.github.com/repos/cncf/cnf-testsuite/releases/assets/38092818 -O airgapped.tar.gz
cp -a $(pwd) /shared/$DIR/cnf-testsuite
cp /tmp/airgapped.tar.gz /shared/$DIR/
docker run --name $DIR --network none --privileged -v /shared/$DIR/cnf-testsuite:/cnf-testsuite -v /shared/$DIR/airgapped.tar.gz:/airgapped/airgapped.tar.gz -v /shared/$DIR/tmpdata:/tmp -t conformance/offline:latest /bin/bash -c "LOG_LEVEL=info crystal src/cnf-testsuite.cr cnf_setup cnf-config=./example-cnfs/coredns/cnf-testsuite.yml input-file=/airgapped/airgapped.tar.gz; LOG_LEVEL=info crystal src/cnf-testsuite.cr all offline=true ~reasonable_startup_time ~reasonable_image_size ~pod_network_latency ~chaos_network_loss ~chaos_cpu_hog ~chaos_container_kill ~disk_fill ~platform ~volume_hostpath_not_found ~privileged ~increase_capacity ~decrease_capacity ~install_script_helm ~helm_chart_valid ~helm_chart_published verbose"
docker run --name $DIR --network none --privileged -v /shared/$DIR/cnf-testsuite:/cnf-testsuite -v /shared/$DIR/airgapped.tar.gz:/airgapped/airgapped.tar.gz -v /shared/$DIR/tmpdata:/tmp -t $OFFLINE_IMAGE /bin/bash -c "LOG_LEVEL=info crystal src/cnf-testsuite.cr cnf_setup cnf-config=./example-cnfs/coredns/cnf-testsuite.yml input-file=/airgapped/airgapped.tar.gz; LOG_LEVEL=info crystal src/cnf-testsuite.cr all offline=true ~reasonable_startup_time ~reasonable_image_size ~pod_network_latency ~chaos_network_loss ~chaos_cpu_hog ~chaos_container_kill ~disk_fill ~platform ~volume_hostpath_not_found ~privileged ~increase_capacity ~decrease_capacity ~install_script_helm ~helm_chart_valid ~helm_chart_published verbose"
- name: Delete Cluster
if: ${{ always() }}
run: |
Expand All @@ -344,6 +351,8 @@ jobs:
test_helm_directory_in_airgapped_env:
name: Test helm directory In An Airgapped Env.
runs-on: [default]
env:
OFFLINE_IMAGE: "conformance/offline:latest"
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -397,7 +406,7 @@ jobs:
#DOTO Use pre-created airgapped.tar.gz
cp -a $(pwd) /shared/$DIR/cnf-testsuite
cp /tmp/airgapped.tar.gz /shared/$DIR/
docker run --name $DIR --network none --privileged -v /shared/$DIR/cnf-testsuite:/cnf-testsuite -v /shared/$DIR/airgapped.tar.gz:/airgapped/airgapped.tar.gz -v /shared/$DIR/tmpdata:/tmp -t conformance/offline:latest /bin/bash -c "LOG_LEVEL=info crystal src/cnf-testsuite.cr cnf_setup cnf-config=./sample-cnfs/sample_coredns/cnf-testsuite.yml input-file=/airgapped/airgapped.tar.gz; LOG_LEVEL=info crystal src/cnf-testsuite.cr all offline=true ~reasonable_startup_time ~reasonable_image_size ~pod_network_latency ~chaos_network_loss ~chaos_cpu_hog ~chaos_container_kill ~disk_fill ~platform ~volume_hostpath_not_found ~privileged ~increase_capacity ~decrease_capacity ~install_script_helm ~helm_chart_valid ~helm_chart_published verbose"
docker run --name $DIR --network none --privileged -v /shared/$DIR/cnf-testsuite:/cnf-testsuite -v /shared/$DIR/airgapped.tar.gz:/airgapped/airgapped.tar.gz -v /shared/$DIR/tmpdata:/tmp -t $OFFLINE_IMAGE /bin/bash -c "LOG_LEVEL=info crystal src/cnf-testsuite.cr cnf_setup cnf-config=./sample-cnfs/sample_coredns/cnf-testsuite.yml input-file=/airgapped/airgapped.tar.gz; LOG_LEVEL=info crystal src/cnf-testsuite.cr all offline=true ~reasonable_startup_time ~reasonable_image_size ~pod_network_latency ~chaos_network_loss ~chaos_cpu_hog ~chaos_container_kill ~disk_fill ~platform ~volume_hostpath_not_found ~privileged ~increase_capacity ~decrease_capacity ~install_script_helm ~helm_chart_valid ~helm_chart_published verbose"
- name: Delete Cluster
if: ${{ always() }}
run: |
Expand All @@ -412,6 +421,8 @@ jobs:
test_manifest_directory_in_airgapped_env:
name: Test manifest directory In An Airgapped Env.
runs-on: [default]
env:
OFFLINE_IMAGE: "conformance/offline:latest"
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -466,7 +477,7 @@ jobs:
#DOTO Use pre-created airgapped.tar.gz
cp -a $(pwd) /shared/$DIR/cnf-testsuite
cp /tmp/airgapped.tar.gz /shared/$DIR/
docker run --name $DIR --network none --privileged -v /shared/$DIR/cnf-testsuite:/cnf-testsuite -v /shared/$DIR/airgapped.tar.gz:/airgapped/airgapped.tar.gz -v /shared/$DIR/tmpdata:/tmp -t conformance/offline:latest /bin/bash -c "LOG_LEVEL=info crystal src/cnf-testsuite.cr cnf_setup cnf-config=./sample-cnfs/k8s-non-helm/cnf-testsuite.yml input-file=/airgapped/airgapped.tar.gz; LOG_LEVEL=info crystal src/cnf-testsuite.cr all offline=true ~reasonable_startup_time ~reasonable_image_size ~pod_network_latency ~chaos_network_loss ~chaos_cpu_hog ~chaos_container_kill ~disk_fill ~platform ~volume_hostpath_not_found ~privileged ~increase_capacity ~decrease_capacity ~install_script_helm ~helm_chart_valid ~helm_chart_published verbose"
docker run --name $DIR --network none --privileged -v /shared/$DIR/cnf-testsuite:/cnf-testsuite -v /shared/$DIR/airgapped.tar.gz:/airgapped/airgapped.tar.gz -v /shared/$DIR/tmpdata:/tmp -t $OFFLINE_IMAGE /bin/bash -c "LOG_LEVEL=info crystal src/cnf-testsuite.cr cnf_setup cnf-config=./sample-cnfs/k8s-non-helm/cnf-testsuite.yml input-file=/airgapped/airgapped.tar.gz; LOG_LEVEL=info crystal src/cnf-testsuite.cr all offline=true ~reasonable_startup_time ~reasonable_image_size ~pod_network_latency ~chaos_network_loss ~chaos_cpu_hog ~chaos_container_kill ~disk_fill ~platform ~volume_hostpath_not_found ~privileged ~increase_capacity ~decrease_capacity ~install_script_helm ~helm_chart_valid ~helm_chart_published verbose"
- name: Delete Cluster
if: ${{ always() }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion tools/airgapped_kind/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM conformance/crystal:0.35.1-llvm10-grep
FROM conformance/crystal:1.0.0-alpine-r1

RUN apk add --no-cache \
ca-certificates \
Expand Down
11 changes: 11 additions & 0 deletions tools/crystal-alpine.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM crystallang/crystal:1.0.0-alpine

RUN apk add --update --no-cache --force-overwrite \
gc-dev gcc gmp-dev libatomic_ops libevent-static \
musl-dev pcre-dev yaml-static \
libxml2-dev openssl-dev openssl-libs-static \
tzdata yaml-dev zlib-static \
make git \
llvm10-dev llvm10-static g++

CMD ["/bin/sh"]

0 comments on commit bd577bb

Please sign in to comment.