Skip to content
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

Fixing platform jobs to a set version of adop-platform-management #11

Merged
merged 1 commit into from
May 10, 2018

Conversation

nickdgriffin
Copy link
Contributor

@nickdgriffin nickdgriffin commented Apr 29, 2016

Updating the platform jobs to use the ADOP_PLATFORM_MANAGEMENT_VERSION to know what to checkout from adop-platform-management. If ADOP_PLATFORM_MANAGEMENT_VERSION has not been set in Jenkins then it will default to the old value of "*/master".

Originally I wanted to support using tags, but there's a problem with that because whilst the jobs that consume this repository can checkout a tag Load_Platform won't be able to push the tags because Gerrit won't allow it when it is first launched and I'm not keen on running another job after the access control job has run. So for now it will support commit IDs in ADOP_PLATFORM_MANAGEMENT_VERSION.

This depends on the following PRs:

Expected behaviour:

  • If ADOP_PLATFORM_MANAGEMENT_VERSION is not present or is not a valid hash, default the ref to checkout to '*/master' as per the old functionality
  • If ADOP_PLATFORM_MANAGEMENT_VERSION is added at a later date, Load_Platform will need to be run again to pickup the new changes and enable the use of the variable in the platform jobs
  • If ADOP_PLATFORM_MANAGEMENT_VERSION is added at a later date, workspaces and projects will need recreating to enable the use of the variable once Load_Platform has been run

To test:

  • Modify the Jenkins image version to be 0.2.7 in docker-compose.yml
  • Spin it up using "--without-load"
  • Edit Load_Platform to use my repo
  • Run Load_Platform
  • Verify all the jobs work as expected
  • Add a global environment variable ADOP_PLATFORM_MANAGEMENT_VERSION in Manage Jenkins > Configure System and set it to the latest commit in my repo (i.e. the one for this PR)
  • Run Load_Platform again
  • Verify that the jobs are all using the correct commit ID
  • Verify that all the jobs work as expected
  • Change ADOP_PLATFORM_MANAGEMENT_VERSION to something else
  • Run Load_Platform again
  • Verify that the jobs are all using the correct commit ID (they should at least check out the specified one, whether or not they work is not the point, it will depend on what commit you pick)

To test and simulate the adop-docker-compose PR that will come from this?

  • Edit docker-compose.yml to set ADOP_PLATFORM_MANAGEMENT_VERSION to the commit ID for this PR
  • Spin it up using "--without-load"
  • Edit Load_Platform to use my repo
  • Run Load_Platform
  • Verify that the jobs are all using the correct commit ID
  • Verify that all the jobs work as expected

@nickdgriffin nickdgriffin added this to the 0.1.1 milestone Apr 29, 2016
@anton-kasperovich
Copy link
Contributor

@nickdgriffin as far as i see, dependencies already was merged, could you please provide an update here to understand what's left to let this PR to be merged. Thank you.

@nickdgriffin
Copy link
Contributor Author

Going to mark this as WIP, because I think there was an issue with a similar change in Load_Platform that I haven't solved yet.

@nickdgriffin nickdgriffin changed the title Fixing platform jobs to a set version of adop-platform-management [WIP] Fixing platform jobs to a set version of adop-platform-management Sep 7, 2016
@nickdgriffin nickdgriffin force-pushed the master branch 2 times, most recently from 44496e5 to 14e0fbb Compare January 10, 2017 19:37
@nickdgriffin
Copy link
Contributor Author

nickdgriffin commented Jan 10, 2017

I think this is ready for review/testing now, I'll remove the WIP marker once someone has given it a look over and I've had a think about if there are likely to be any backwards compatibility issues.

Once this is ready to be merged I will submit a PR to change this line to the correct commit ID first so that we don't immediately break the jobs: https://github.com/Accenture/adop-docker-compose/blob/master/docker-compose.yml#L213

@nickdgriffin
Copy link
Contributor Author

Accenture/adop-jenkins#41 has been merged, so I'll retest this soon.

@nickdgriffin nickdgriffin changed the title [WIP] Fixing platform jobs to a set version of adop-platform-management Fixing platform jobs to a set version of adop-platform-management Nov 15, 2017
@nickdgriffin nickdgriffin removed the wip label Nov 15, 2017
@nickdgriffin
Copy link
Contributor Author

nickdgriffin commented Nov 15, 2017

I've finally removed the WIP flag!

I think this is ready for review, there are details above but please point out if I've left any gaping holes.

Once this has been merged I'll prepare a PR to adop-docker-compose that includes the addition of ADOP_PLATFORM_MANAGEMENT_VERSION set to the commit ID of the merge commit that results from this PR, and then the only other dependency required is Accenture/adop-docker-compose#253.

Copy link

@subodh-hatkar subodh-hatkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested all mentioned scenarios with Jenkins image version 0.2.7. Load Platform works as expected. Dependency required - Accenture/adop-docker-compose#253

@dsingh07
Copy link
Contributor

dsingh07 commented Mar 16, 2018

Test 1
Environment:

Results:
Load_Platform:
image
All jobs were successful:

  • Load_Cartridge
  • Generate_Project
  • Generate_Workspace
  • Load_Platform

@dsingh07
Copy link
Contributor

Test 2
Environment:

All jobs were successful:

  • Load_Cartridge
  • Generate_Project
  • Generate_Workspace
  • Load_Platform

@dsingh07
Copy link
Contributor

Test 3
Environment:

Results:
Load_Cartridge config:
image

All jobs were successful on each run of Load_Platform once ADOP_PLATFORM_MANAGEMENT_VERSION was changed:

  • Load_Cartridge
  • Generate_Project
  • Generate_Workspace
  • Load_Platform

Copy link
Contributor

@dsingh07 dsingh07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are missing some jobs from the "Platform Management" folder which also need the snippet of code in there to checkout the set version:

  • Job_Runner
  • Load_Platform_Extension
  • Load_Platform_Extension_Collection
  • Setup_Pluggable_Library

@nickdgriffin
Copy link
Contributor Author

nickdgriffin commented May 1, 2018

@dsingh07 : None of those jobs use adop-platform-management, but they'll be generated from the version of adop-platform-management that is checked out when Load_Platform is run.

  • Job_Runner: Pipeline job that doesn't check out a repo
  • Load_Platform_Extension: Checks out the platform extension repository
  • Load_Platform_Extension_Collection: Pipeline job that doesn't check out a repo
  • Setup_Pluggable_Library: Checks out the pluggable library

@RobertNorthard
Copy link
Contributor

RobertNorthard commented May 8, 2018

Thanks @nickdgriffin. This looks good to me.

The only thing I noticed, was that upgrading from adop-jenkins 0.2.6 to 0.2.7 the Load_Platform job is not updated. To solve this, in the future, I suggest the Load_Platform job is copied as part of the adop-jenkins entry-point.

I have tested this with DOA and it's backwards compatible. Merging!

@RobertNorthard RobertNorthard self-requested a review May 8, 2018 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants