-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for download.docker.com #1
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.log | ||
build/ |
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,42 @@ | ||
#!groovy | ||
properties( | ||
[ | ||
buildDiscarder(logRotator(numToKeepStr: '20')), | ||
parameters([ | ||
string(defaultValue: '', description: 'Expected docker version output of --version flag.', name: 'EXPECTED_VERSION'), | ||
string(defaultValue: '', description: 'Expected docker gitcommit output of --version flag.', name: 'EXPECTED_GITCOMMIT'), | ||
]) | ||
] | ||
) | ||
|
||
def verifyTargets = [ | ||
'verify-install-centos-7', | ||
'verify-install-fedora-24', | ||
'verify-install-fedora-25', | ||
'verify-install-debian-wheezy', | ||
'verify-install-debian-jessie', | ||
'verify-install-debian-stretch', | ||
'verify-install-ubuntu-trusty', | ||
'verify-install-ubuntu-xenial', | ||
'verify-install-ubuntu-yakkety', | ||
'verify-install-ubuntu-zesty', | ||
] | ||
|
||
def genVerifyJob(String t) { | ||
return [ "${t}" : { -> | ||
stage("${t}") { | ||
wrappedNode(label: 'aufs', cleanWorkspace: true) { | ||
checkout scm | ||
sh("make clean ${t}.log") | ||
archiveArtifacts '*.log' | ||
} | ||
} | ||
} ] | ||
} | ||
|
||
def verifyJobs = [:] | ||
for (t in verifyTargets) { | ||
verifyJobs << genVerifyJob(t) | ||
} | ||
|
||
parallel(verifyJobs) |
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,34 @@ | ||
SHELL:=/bin/bash | ||
VERIFY_INSTALL_DISTROS:=$(addprefix verify-install-,centos-7 fedora-24 fedora-25 debian-wheezy debian-jessie debian-stretch ubuntu-trusty ubuntu-xenial ubuntu-yakkety ubuntu-zesty) | ||
CHANNEL_TO_TEST:=test | ||
EXPECTED_VERSION?= | ||
EXPECTED_GITCOMMIT?= | ||
|
||
.PHONY: needs_version | ||
needs_version: | ||
ifndef EXPECTED_VERSION | ||
$(error EXPECTED_VERSION is undefined) | ||
endif | ||
|
||
.PHONY: needs_gitcommit | ||
needs_gitcommit: | ||
ifndef EXPECTED_GITCOMMIT | ||
$(error EXPECTED_GITCOMMIT is undefined) | ||
endif | ||
|
||
.PHONY: check | ||
check: $(VERIFY_INSTALL_DISTROS) | ||
|
||
.PHONY: clean | ||
clean: | ||
$(RM) *.log | ||
|
||
verify-install-%.log: needs_version needs_gitcommit | ||
mkdir -p build | ||
sed 's/DEFAULT_CHANNEL_VALUE="test"/DEFAULT_CHANNEL_VALUE="$(CHANNEL_TO_TEST)"/' install.sh > build/install.sh | ||
set -o pipefail && docker run \ | ||
--rm \ | ||
-v $(CURDIR):/v \ | ||
-w /v \ | ||
$(subst -,:,$*) \ | ||
bash verify-docker-install "$(EXPECTED_VERSION)" "$(EXPECTED_GITCOMMIT)" | tee $@ |
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,29 @@ | ||
#!/bin/bash -e | ||
expected_version=$1 | ||
expected_gitcommit=$2 | ||
( | ||
echo "Executing installation script!" | ||
sh build/install.sh | ||
) | ||
docker_version=$(docker --version) | ||
if [ $? -ne 0 ]; then | ||
echo "ERROR: Did Docker get installed?" | ||
exit 3 | ||
fi | ||
installed_version=$(echo $docker_version | awk '{print$3}') | ||
installed_gitcommit=$(echo $docker_version | awk '{print$5}') | ||
echo $docker_version | ||
echo -n "Checking if installed version '$installed_version' matches '$expected_version'... " | ||
if [[ "$installed_version" =~ "$expected_version" ]]; then | ||
echo "PASSED!" | ||
else | ||
echo "FAILED!" | ||
exit 1 | ||
fi | ||
echo -n "Checking if installed gitcommit '$installed_gitcommit' matches '$expected_gitcommit'... " | ||
if [[ "$installed_gitcommit" =~ "$expected_gitcommit" ]]; then | ||
echo "PASSED!" | ||
else | ||
echo "FAILED!" | ||
exit 2 | ||
fi |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seemethere Maybe change apt_url to
old_apt_url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean we could, I'd rather not change the legacy things since they'll eventually be removed anyways.