-
Notifications
You must be signed in to change notification settings - Fork 1
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
As a developer, I want to improve the dockerize.sh #79
Comments
Original Redmine Comment One improvement is to validate the @DOCKER_REGISTRY@ env variable for absence of an http(s) scheme, which will produce an invalid tag name (#104715-50). Another is for the script to use a designated jenkins build number, rather than the latest build (because the latest build is often not the RC). |
Original Redmine Comment Reiterating what I stated in the other ticket, the change I made to @dockerize.sh@ was to add a check around the activities that occur if the DOCKER_REGISTRY environment variable is defined. The check is as follows:
If "http" is present at the beginning of the variable, a message is output saying that the scheme should not be included and the registry stuff is skipped. The registry activities are then within the else portion of that if-statement. I'll push the change to the repository later this afternoon. Hank |
Original Redmine Comment Implemented James's if-clause and it seems to work:
Well, the message is more meaningful than "fubared", but whatever. I'm going to take a quick look to see how difficult it would be for the script to download the .zips from the build instead of the active work space. Hank |
Original Redmine Comment I think all the artifacts that need to be downloaded can be found in the Jenkins build area for a given build/revision, which is identified by a number. For example, I believe this corresponds to 6.4: https://vlab.noaa.gov/jenkins/job/Verify_OWP_WRES/4418/artifact/ Currently, the script builds the URLs from the Jenkins workspace:
$JOB_URL is the Jenkins URL, https://vlab.noaa.gov/jenkins/job/Verify_OWP_WRES. Is there an automated way to identify the build number in Jenkins? If not, is it reasonable to expect us to identify that number and pass it in as an argument to @dockerize.sh@? Hank |
Original Redmine Comment And will the output from @versions.sh@ match the versions of the .zips in the Jenkins build? Hank |
Original Redmine Comment The version is identified and built manually in @versions.sh@ based on git:
I have no clue if that will properly correspond to the zip versions found in the Jenkins build, because its not talking to Jenkins. I don't have time for a full rewrite of that section, but maybe in the future something less brittle can be built. Hank |
Original Redmine Comment The URL for the Jenkins build includes the revision: https://vlab.noaa.gov/jenkins/job/Verify_OWP_WRES/4418/ So if you know the build number, you know the revision. Can we go in the opposite direction? Is there a way to identify the build number for a revision? Hank |
Original Redmine Comment Quick internet search implies it would either require a plug-in or require a build search (i.e., looping over builds until we find the revision). Proposal: As part of the deployment process we identify a revision. We can also identify the Jenkins build number. We can then pass that build number in to @dockerize.sh@ as the first argument and use it to locate the .zips to download instead of assume "ws" in the URL. Thoughts? This would be a small change that I can make now, but we would need to remember the added step when we next deploy. Perhaps I can change the Subject of the 6.4 deployment ticket to include the Jenkins build number, 4418, so that can serve as a reminder. Hank |
Original Redmine Comment My thoughts are that we should supply a build number to the script, because we nominate a build to deploy, i.e., every RC starts with a given build that succeeded and the identity of that build is what we should supply when creating the images. |
Original Redmine Comment Let me put that change in, test, and push, Hank |
Original Redmine Comment Added a required first argument, the Jenkins build number, to the @dockerize.sh@. Confirmed that the URL identified, at least for the core WRES build, is correct and the @curl@ command recommended in the script output works. The full test of the change will happen when deploying 6.5 Given the generic nature of this ticket, this will not resolve the ticket. I also don't think this resolves #99827. Yes, moving to using the build number instead of the workspace helps, but the versions and names of the .zip are still being identified independently of Jenkins, hopefully using the same process, but without a check. Thus, I think there is still risk that a .zip identified is not correct. Let me push my change against both tickets. Hank |
Original Redmine Comment commit:f26e223358f5d65bdc9476c54756ab837b09f186 Hank |
Author Name: James (James)
Original Redmine Issue: 104957, https://vlab.noaa.gov/redmine/issues/104957
Original Date: 2022-05-19
Given a @dockerize.sh@ that automates the tagging of an image to reduce errors
When I see some frictions in that script
Then I want to remove them
The text was updated successfully, but these errors were encountered: