|
7 | 7 | jobs:
|
8 | 8 | build:
|
9 | 9 | runs-on: ubuntu-latest
|
10 |
| - # trying this just for fun |
11 | 10 | steps:
|
12 |
| - - name: Set up podman |
13 |
| - run: | |
14 |
| - source /etc/os-release |
15 |
| - echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list |
16 |
| - curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add - |
17 |
| - sudo apt-get update |
18 |
| - sudo apt-get -y install podman |
19 |
| - - name: Set up oc client |
20 |
| - run: | |
21 |
| - wget https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz |
22 |
| - sudo tar xzvf oc.tar.gz -C /usr/local/bin |
| 11 | + - name: MicroShift OpenShift Cluster |
| 12 | + uses: container-tools/[email protected] |
23 | 13 |
|
24 |
| - - name: Run a microshift cluster |
25 |
| - run: | |
26 |
| - sudo podman run -d --rm --name microshift \ |
27 |
| - --privileged -v microshift-data:/var/lib -p 6443:6443 \ |
28 |
| - quay.io/microshift/microshift-aio:latest |
29 |
| - # get kubeconfig |
30 |
| - sudo podman exec microshift bash -c \ |
31 |
| - 'while ! test -f "/var/lib/microshift/resources/kubeadmin/kubeconfig"; |
32 |
| - do |
33 |
| - echo "Waiting for kubeconfig..." |
34 |
| - sleep 5 |
35 |
| - done' |
36 |
| - mkdir ${HOME}/.kube |
37 |
| - sudo podman cp \ |
38 |
| - microshift:/var/lib/microshift/resources/kubeadmin/kubeconfig \ |
39 |
| - ${HOME}/.kube/config |
40 |
| - sudo chown ${USER} ${HOME}/.kube/config |
41 |
| - chmod 600 ${HOME}/.kube/config |
42 |
| - # wait for the cluster to become available |
43 |
| - sleep 10 |
44 |
| - kubectl wait --for=condition=available apiservice --all --timeout 300s |
45 |
| - - name: Install helm |
46 |
| - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 |
47 |
| - with: |
48 |
| - version: "3.9.4" |
| 14 | +#jobs: |
| 15 | + # build: |
| 16 | + # runs-on: ubuntu-latest |
| 17 | + # # trying this just for fun |
| 18 | + # steps: |
| 19 | + # - name: Set up podman |
| 20 | + # run: | |
| 21 | + # source /etc/os-release |
| 22 | + # echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list |
| 23 | + # curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add - |
| 24 | + # sudo apt-get update |
| 25 | + # sudo apt-get -y install podman |
| 26 | + # - name: Set up oc client |
| 27 | + # run: | |
| 28 | + # wget https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz |
| 29 | + # sudo tar xzvf oc.tar.gz -C /usr/local/bin |
49 | 30 |
|
50 |
| - #test to see if you can just install helm |
51 |
| - - run: | |
52 |
| - helm repo add hashicorp https://helm.releases.hashicorp.com |
53 |
| - helm install consul hashicorp/consul --set global.name=consul --create-namespace --namespace consul |
54 |
| - #- run: mkdir -p ${{ env.TEST_RESULTS }} |
| 31 | + # - name: Run a microshift cluster |
| 32 | + # run: | |
| 33 | + # sudo podman run -d --rm --name microshift \ |
| 34 | + # --privileged -v microshift-data:/var/lib -p 6443:6443 \ |
| 35 | + # quay.io/microshift/microshift-aio:latest |
| 36 | + # # get kubeconfig |
| 37 | + # sudo podman exec microshift bash -c \ |
| 38 | + # 'while ! test -f "/var/lib/microshift/resources/kubeadmin/kubeconfig"; |
| 39 | + # do |
| 40 | + # echo "Waiting for kubeconfig..." |
| 41 | + # sleep 5 |
| 42 | + # done' |
| 43 | + # mkdir ${HOME}/.kube |
| 44 | + # sudo podman cp \ |
| 45 | + # microshift:/var/lib/microshift/resources/kubeadmin/kubeconfig \ |
| 46 | + # ${HOME}/.kube/config |
| 47 | + # sudo chown ${USER} ${HOME}/.kube/config |
| 48 | + # chmod 600 ${HOME}/.kube/config |
| 49 | + # # wait for the cluster to become available |
| 50 | + # sleep 10 |
| 51 | + # kubectl wait --for=condition=available apiservice --all --timeout 300s |
| 52 | + # - name: Install helm |
| 53 | + # uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 |
| 54 | + # with: |
| 55 | + # version: "3.9.4" |
| 56 | + |
| 57 | + # #test to see if you can just install helm |
| 58 | + # - run: | |
| 59 | + # helm repo add hashicorp https://helm.releases.hashicorp.com |
| 60 | + # helm install consul hashicorp/consul --set global.name=consul --create-namespace --namespace consul |
| 61 | + # #- run: mkdir -p ${{ env.TEST_RESULTS }} |
55 | 62 |
|
56 | 63 | # - name: go mod download
|
57 | 64 | # working-directory: ${{ inputs.directory }}
|
|
0 commit comments