-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Very initial test package workflow skeleton
- Loading branch information
1 parent
5ea5070
commit 4d53078
Showing
4 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
file=$1 | ||
dpkg -i $file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
image=$1 | ||
file=$2 | ||
|
||
container=test-package | ||
docker create --name $container --entrypoint sh -it "$image" | ||
docker start $container | ||
docker cp "$file" $container:"/$file" | ||
|
||
if [[ $file =~ deb$ ]]; then | ||
docker exec $container 'apt-get update && apt-get install -y bash' | ||
docker cp bin/test_deb $container:/ | ||
docker exec $container "/test_deb /$file" | ||
else | ||
docker exec 'yum update && yum install -y bash' | ||
docker cp bin/test_rpm $container:/ | ||
docker exec $container "/test_rpm /$file" | ||
fi | ||
|
||
docker rm -f $container | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
file=$1 | ||
rpm -i $file |