-
Notifications
You must be signed in to change notification settings - Fork 71
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
Integration test #6
base: dev
Are you sure you want to change the base?
Conversation
28053b7
to
09fb03b
Compare
export KUBERNETES_CD_DOCKER_PASSWORD="$(az acr credential show --name "$acr_name" --query "passwords[0].value" --output tsv)" | ||
export KUBERNETES_CD_DOCKER_REGISTRY="http://$KUBERNETES_CD_DOCKER_REPOSITORY" | ||
|
||
docker pull nginx |
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.
This should be called even if KUBERNETES_CD_DOCKER_REPOSITORY is empty?
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.
The intention here is:
- if we test against existing docker repository, we pass in all the details of the repo and then we skip the repository setup
- otherwise if
KUBERNETES_CD_DOCKER_REPOSITORY
is empty, we setup new ACR instance and prepare the image for testing
bash src/test/java/com/microsoft/jenkins/kubernetes/integration/integration-test.sh | ||
|
||
Prerequisites: | ||
* Logged in Azure CLI |
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.
Since this plugin is a general k8s plugin, provide an option that user can run the test without Azure (suppose they have already have a k8s cluster)?
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.
If the user pass in all the details, we will skip the Azure ACS & ACR setup. We have a check to ensure that
resource_group=
if [[ -z "$KUBERNETES_CD_MASTER_HOST" ]] || [[ -z "$KUBERNETES_CD_DOCKER_REPOSITORY" ]]; then
resource_group="k8s-test-$suffix"
fi
However, currently the check for az account
happens too early. It is not necessary if user do not need to provision Azure resources. I will update the code logic and the documentation.
import java.io.OutputStream; | ||
import java.util.UUID; | ||
|
||
public class TestHelpers { |
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.
Move some common methods to common plugin so that they can be reused?
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.
make sense. I will copy the logic to commons and when that's available in new commons release, we can remove the duplicates in the descendants.
Why not merge this PR? @ArieShout |
No description provided.