summaryrefslogtreecommitdiffstats
path: root/tests/roles/cli
diff options
context:
space:
mode:
authorLokesh Mandvekar <lsm5@fedoraproject.org>2018-04-07 23:02:44 -0400
committerLokesh Mandvekar <lsm5@fedoraproject.org>2018-04-07 23:02:44 -0400
commit61290b1bc7bdace32a8f666ac2bfed4756ca0e14 (patch)
tree6d9db01112505bf623d6aa47767b7946657488d0 /tests/roles/cli
parentc14385fae0a8b27270ec0f8b77859c14656b1f68 (diff)
downloadbuildah-61290b1bc7bdace32a8f666ac2bfed4756ca0e14.tar.gz
buildah-61290b1bc7bdace32a8f666ac2bfed4756ca0e14.tar.xz
buildah-61290b1bc7bdace32a8f666ac2bfed4756ca0e14.zip
buildah-0.16-2.git4743c2e
- autobuilt commit 4743c2e Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
Diffstat (limited to 'tests/roles/cli')
-rw-r--r--tests/roles/cli/tasks/add.yaml41
-rw-r--r--tests/roles/cli/tasks/bud.yaml24
-rw-r--r--tests/roles/cli/tasks/cleanup.yaml4
-rw-r--r--tests/roles/cli/tasks/config.yaml16
-rw-r--r--tests/roles/cli/tasks/containers.yaml18
-rw-r--r--tests/roles/cli/tasks/copy.yaml41
-rw-r--r--tests/roles/cli/tasks/from.yaml12
-rw-r--r--tests/roles/cli/tasks/main.yaml44
-rw-r--r--tests/roles/cli/tasks/mount.yaml27
-rw-r--r--tests/roles/cli/tasks/prepare-containers.yaml6
-rw-r--r--tests/roles/cli/tasks/push.yaml60
-rw-r--r--tests/roles/cli/tasks/tag.yaml43
12 files changed, 0 insertions, 336 deletions
diff --git a/tests/roles/cli/tasks/add.yaml b/tests/roles/cli/tasks/add.yaml
deleted file mode 100644
index 0bd6498..0000000
--- a/tests/roles/cli/tasks/add.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- name: buildah add
- command: buildah add nginxc /tmp/buildah/bud/Dockerfile
-
-- name: check buildah add
- command: ls {{mount.stdout}}/Dockerfile
-
-- name: buildah add to destination
- command: buildah add nginxc /tmp/buildah/bud/Dockerfile /home
-
-- name: check buildah add to
- command: ls {{mount.stdout}}/home/Dockerfile
-
-- name: buildah add URL
- command: buildah add nginxc https://github.com/projectatomic/buildah/raw/master/README.md
-
-- name: check buildah add URL
- command: ls {{mount.stdout}}/README.md
-
-- name: buildah add URL to destination
- command: buildah add nginxc https://github.com/projectatomic/buildah/raw/master/README.md /home
-
-- name: check buildah add URL to destination
- command: ls {{mount.stdout}}/home/README.md
-
-- name: Download buildah README.md
- get_url:
- url: https://github.com/projectatomic/buildah/raw/master/README.md
- dest: /tmp/buildah/
-
-- name: buildah add dir
- command: buildah add nginxc /tmp
-
-- name: check buildah add dir
- command: ls {{mount.stdout}}/buildah/README.md
-
-- name: buildah add dir to destination
- command: buildah add nginxc /tmp /home
-
-- name: check buildah add dir to destination
- command: ls {{mount.stdout}}/home/buildah/README.md
diff --git a/tests/roles/cli/tasks/bud.yaml b/tests/roles/cli/tasks/bud.yaml
deleted file mode 100644
index 1f1c678..0000000
--- a/tests/roles/cli/tasks/bud.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: buildah bud localfile
- command: buildah bud -t testing/nginx --pull /tmp/buildah/bud
-
-- name: check bud images with buildah images command
- shell: buildah images | grep testing/nginx
-
-- name: buildah bud -f localfile
- command: buildah bud -t testing/nginx2 -f /tmp/buildah/bud/Dockerfile .
-
-- name: buildah bud URL
- command: buildah bud -t testing/nginx3 http://localhost/bud/Dockerfile.tar.gz
-
-- name: buildah build-using-dockerfile localfile
- command: buildah build-using-dockerfile -t testing/nginx4 /tmp/buildah/bud
-
-- name: buildah build-using-dockerfile -f localfile
- command: buildah build-using-dockerfile -t testing/nginx5 --file /tmp/buildah/bud/Dockerfile .
-
-- name: buildah build-using-dockerfile URL
- command: buildah build-using-dockerfile --tag testing/nginx6 http://localhost/bud/Dockerfile.tar.gz
-
-- name: buildah rmi
- command: buildah rmi testing/nginx{2..6}
diff --git a/tests/roles/cli/tasks/cleanup.yaml b/tests/roles/cli/tasks/cleanup.yaml
deleted file mode 100644
index 45f31d5..0000000
--- a/tests/roles/cli/tasks/cleanup.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- name: remove buildah containers after testing
- command: buildah rm busybox nginxc nginxc-2
- ignore_errors: true
diff --git a/tests/roles/cli/tasks/config.yaml b/tests/roles/cli/tasks/config.yaml
deleted file mode 100644
index 91e8bc3..0000000
--- a/tests/roles/cli/tasks/config.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- name: buildah config workingdir
- command: buildah config --workingdir /opt nginxc
-
-- name: get buildah config workingdir
- command: buildah run nginxc "pwd"
- register: checkworkingdir
- failed_when: "'/opt' not in checkworkingdir.stdout"
-
-- name: buildah config env
- command: buildah config --env foo=bar nginxc
-
-- name: get buildah config env
- command: buildah run nginxc env
- register: env
- failed_when: "'foo=bar' not in env.stdout"
diff --git a/tests/roles/cli/tasks/containers.yaml b/tests/roles/cli/tasks/containers.yaml
deleted file mode 100644
index fa9add6..0000000
--- a/tests/roles/cli/tasks/containers.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- name: buildah containers
- shell: buildah containers | grep nginxc
-
-- name: buildah containers -q
- shell: buildah containers -q | grep -v nginxc
-
-- name: buildah containers -n
- shell: buildah containers -n | grep -v NAME
-
-- name: buildah containers --notruncate
- command: buildah containers -- notruncate
-
-- name: buildah containers --all
- command: buildah containers --all
-
-- name: buildah containers --json
- command: buildah containers --json
diff --git a/tests/roles/cli/tasks/copy.yaml b/tests/roles/cli/tasks/copy.yaml
deleted file mode 100644
index 3f0d8c5..0000000
--- a/tests/roles/cli/tasks/copy.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- name: buildah copy
- command: buildah copy nginxc-2 /tmp/buildah/bud/Dockerfile
-
-- name: check buildah copy
- command: ls {{mount.stdout}}/Dockerfile
-
-- name: buildah copy to destination
- command: buildah copy nginxc-2 /tmp/buildah/bud/Dockerfile /home
-
-- name: check buildah copy to
- command: ls {{mount.stdout}}/home/Dockerfile
-
-- name: buildah copy URL
- command: buildah copy nginxc-2 https://github.com/projectatomic/buildah/raw/master/README.md
-
-- name: check buildah copy URL
- command: ls {{mount.stdout}}/README.md
-
-- name: buildah copy URL to destination
- command: buildah copy nginxc-2 https://github.com/projectatomic/buildah/raw/master/README.md /home
-
-- name: check buildah copy URL to destination
- command: ls {{mount.stdout}}/home/README.md
-
-- name: Download buildah README.md
- get_url:
- url: https://github.com/projectatomic/buildah/raw/master/README.md
- dest: /tmp/buildah/
-
-- name: buildah copy dir
- command: buildah copy nginxc-2 /tmp/buildah
-
-- name: check buildah copy dir
- command: ls {{mount.stdout}}/README.md
-
-- name: buildah copy dir to destination
- command: buildah copy nginxc-2 /tmp /home
-
-- name: check buildah copy dir to destination
- command: ls {{mount.stdout}}/home/buildah/README.md
diff --git a/tests/roles/cli/tasks/from.yaml b/tests/roles/cli/tasks/from.yaml
deleted file mode 100644
index e694b10..0000000
--- a/tests/roles/cli/tasks/from.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- name: buildah from pull
- command: buildah from --pull nginx
-
-- name: buildah from pull always
- command: buildah from --pull-always nginx
-
-- name: buildah from with name
- command: buildah from --name nginx nginx
-
-- name: clean from testings
- command: buildah delete nginx nginx-working-container nginx-working-container-2
diff --git a/tests/roles/cli/tasks/main.yaml b/tests/roles/cli/tasks/main.yaml
deleted file mode 100644
index f709887..0000000
--- a/tests/roles/cli/tasks/main.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
----
-- block:
- - name: prepare containers nginxc
- import_tasks: prepare-containers.yaml
- tags:
- - nginxc
-
- - name: buildah containers
- import_tasks: containers.yaml
- tags:
- - ctr
-
- - name: buildah from
- import_tasks: from.yaml
- tags:
- - from
-
- - name: buildah mount
- import_tasks: mount.yaml
- tags:
- - mount
-
- - name: buildah tag
- import_tasks: tag.yaml
- tags:
- - tag
-
- - name: buildah config
- import_tasks: config.yaml
- tags:
- - config
-
- - name: buildah push
- import_tasks: push.yaml
- tags:
- - push
-
- - name: buildah build-using-dockerfile
- import_tasks: bud.yaml
- tags:
- - bud
-
- always:
- - import_tasks: cleanup.yaml
diff --git a/tests/roles/cli/tasks/mount.yaml b/tests/roles/cli/tasks/mount.yaml
deleted file mode 100644
index 09bd901..0000000
--- a/tests/roles/cli/tasks/mount.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: buildah mount container nginxc
- command: buildah mount nginxc
- register: mount
-
-- name: buildah mount without args will list all mounts
- shell: buildah mount | grep storage
-
-- name: buildah add
- import_tasks: add.yaml
- tags:
- - add
-
-- name: buildah umount
- command: buildah umount nginxc
-
-- name: buildah mount --notruncate
- command: buildah mount --notruncate nginxc-2
- register: mount
-
-- name: buildah copy
- import_tasks: copy.yaml
- tags:
- - copy
-
-- name: buildah unmount
- command: buildah unmount nginxc-2
diff --git a/tests/roles/cli/tasks/prepare-containers.yaml b/tests/roles/cli/tasks/prepare-containers.yaml
deleted file mode 100644
index 1477e62..0000000
--- a/tests/roles/cli/tasks/prepare-containers.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-- name: prepare container nginxc for later testing
- command: buildah from --pull --name nginxc nginx
-
-- name: prepare container nginxc-2 for later testing
- command: buildah from --name nginxc-2 nginx
diff --git a/tests/roles/cli/tasks/push.yaml b/tests/roles/cli/tasks/push.yaml
deleted file mode 100644
index cc38b51..0000000
--- a/tests/roles/cli/tasks/push.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
----
-- name: pull busybox before push
- command: buildah from --pull --name busybox busybox
-
-- name: buildah push image to containers-storage
- command: buildah push docker.io/busybox:latest containers-storage:docker.io/busybox:latest
-
-- name: buildah push image to docker daemon
- command: buildah push docker.io/busybox:latest docker-daemon:docker.io/buildah/busybox:latest
-
-- name: check buildah/busybox exist in docker daemon
- command: docker images docker.io/buildah/busybox:latest
-
-- name: buildah push image to docker local registry
- command: buildah push --tls-verify=false docker.io/busybox:latest docker://localhost:5000/buildah/busybox:latest
-
-- name: create /tmp/buildah/busybox
- file: path=/tmp/buildah/docker state=directory
-
-- name: rm busybox.tar because docker archive does not support modify
- file: path=/tmp/buildah/docker/busybox.tar state=absent
-
-- name: buildah push image to docker-archive
- command: buildah push docker.io/busybox:latest docker-archive:/tmp/buildah/docker/busybox.tar:latest
-
-- name: check docker archive exist
- file: path=/tmp/buildah/docker/busybox.tar state=file
-
-- name: create /tmp/buildah/dir
- file: path=/tmp/buildah/dir state=directory
-
-- name: buildah push image to dir
- command: buildah push docker.io/busybox:latest dir:/tmp/buildah/dir
-
-- name: create /tmp/buildah/oci
- file: path=/tmp/buildah/oci state=directory
-
-- name: buildah push image to oci
- command: buildah push docker.io/busybox:latest oci:/tmp/buildah/oci:latest
-
-- name: buildah push image to oci archive
- command: buildah push docker.io/busybox:latest oci-archive:/tmp/buildah/oci/busybox.tar:latest
-
-- name: check oci archive exist
- file: path=/tmp/buildah/oci/busybox.tar state=file
-
-- name: init default ostree repo
- command: ostree --repo=/ostree/repo init
-
-- name: create /tmp/buildah/ostree/repo
- file: path=/tmp/buildah/ostree/repo state=directory
-
-- name: init tmp ostree repo
- command: ostree --repo=/tmp/buildah/ostree/repo init
-
-- name: buildah push image to ostree
- command: buildah push docker.io/busybox:latest ostree:busybox:latest
-
-- name: buildah push image to non-default ostree repo
- command: buildah push docker.io/busybox:latest ostree:busybox:latest@/tmp/buildah/ostree/repo
diff --git a/tests/roles/cli/tasks/tag.yaml b/tests/roles/cli/tasks/tag.yaml
deleted file mode 100644
index 32767ba..0000000
--- a/tests/roles/cli/tasks/tag.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
----
-- name: buildah from --pull busybox
- command: buildah from busybox
-
-- name: buildah tag by name
- command: buildah tag busybox busybox1
-
-- name: check busybox1 exists
- shell: buildah images | grep busybox1
-
-- name: get image id
- command: buildah images -q busybox1
- register: busyboxID
-
-- name: buildah tag by ID
- command: buildah tag {{busyboxID.stdout}} busybox2
-
-- name: check busybox2 exists
- shell: buildah images | grep busybox2
-
-- name: buildah from tagged image
- command: buildah from busybox1
-
-- name: mount the container which using tagged image
- command: buildah mount busybox1-working-container
-
-- name: buildah umount the container
- command: buildah umount busybox1-working-container
-
-- name: buildah rm container busybox
- command: buildah rm busybox-working-container
-
-- name: buildah rm container busybox1
- command: buildah rm busybox1-working-container
-
-- name: buildah rmi tagged image
- command: buildah rmi busybox{1..2}
-
-- name: check image busybox is not deleted
- shell: buildah images | grep busybox
-
-- name: buildah rmi image busybox
- command: buildah rmi busybox