Skip to content

Add Jenkins parameterized build config file#2564

Merged
oskarth merged 1 commit intodevelopfrom
feature/parameterized-builds-#2511
Dec 11, 2017
Merged

Add Jenkins parameterized build config file#2564
oskarth merged 1 commit intodevelopfrom
feature/parameterized-builds-#2511

Conversation

@oskarth
Copy link
Contributor

@oskarth oskarth commented Nov 30, 2017

image

Addresses #2511

reviewers: sanity check (actual code is in Jenkins anyway)

testers: feedback on what you want to toggle, and test parameterized build

status: ready


stage('Slack Notification') {
def c = (testPassed ? 'good' : 'warning' )
slackSend color: c, message: 'Branch: ' + BRANCH_NAME +
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should probably print repo

@oskarth
Copy link
Contributor Author

oskarth commented Dec 1, 2017

Moved to 'ready for testing', possibly prematurely for two reasons:

  1. Code that is live is actually live already at Jenkins by necessity - only way to test, ephemeral config and I kind of overwrote it :morty:

  2. Want to make sure normal external contributor PRs still work, hence testing stage, this is just a copy of this.

Regardless it'd be good to get a review on this, pinging 9-dev-xp swarm for thoughts. See comments for known downsides #2511 (comment) - if you have solutions shoot. I know it can be shell-fued but didn't have time to make it robust enough, hence this simplistic approach.

@annadanchenko
Copy link

annadanchenko commented Dec 4, 2017

@rasom what parameters do we toggle for the production release and with what values? It would be great if we can just build the release candidates on our own using the params in Jenkins. So, if some of the "production" parameters is missing, please tell which one. And of course which values to use :)

@oskarth
Copy link
Contributor Author

oskarth commented Dec 4, 2017

@annadanchenko https://github.com/status-im/status-react/blob/develop/.env.prod

Additionally some certificate stuff, but we can defo do RC this way :)

@oskarth
Copy link
Contributor Author

oskarth commented Dec 5, 2017

Before merge: probably fix this #2553 (review)

@rasom
Copy link
Contributor

rasom commented Dec 7, 2017

@oskarth i also added repo name to slack messages in jenkins configurations, it makes a bit simpler to distinguish parametrized builds from these which are built form branches, like

slackSend color: 'good', message: REPO + ":" + BRANCH_NAME + ' build started. ' + env.BUILD_URL

and

slackSend color: c, message: 'Branch: ' + REPO + ":" + BRANCH_NAME +

sh 'echo "**********************************************************************"'

sh 'lein deps && npm install && ./re-natal deps'
sh 'sed -i "" "s/301000/1201000/g" node_modules/react-native/packager/src/JSTransformer/index.js'
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should remove this line now, also once react-native will be updated this won't work anymore as the packager is now a separate project

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yenda Can you raise an issue and we test/do this in a separate PR and for all Jenkinsfiles? This is not in scope of this PR IMO (and also need to update it in Jenkins).

Copy link
Contributor

Choose a reason for hiding this comment

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

let's just try it on jenkins first

Copy link
Contributor

Choose a reason for hiding this comment

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

It was already commented out in jenkins until @oskarth updated it with that script

@oskarth
Copy link
Contributor Author

oskarth commented Dec 8, 2017

Thanks @rasom, I'll look at this file in Jenkins and put it in this file, then merge. Soonish.

@oskarth
Copy link
Contributor Author

oskarth commented Dec 8, 2017

FYI, added this to live version (with same default values as env.jenkins):

sh 'echo JSC_ENABLED='               + JSC_ENABLED               + '>>' + '.env'
sh 'echo OFFLINE_INBOX_ENABLED='     + OFFLINE_INBOX_ENABLED     + '>>' + '.env'

Also uncommented back sh 'sed -i "" "s/301000/1201000/g" node_modules/react-native/packager/src/JSTransformer/index.js' since all parameterized builds are failing without it right now.

@yenda
Copy link
Contributor

yenda commented Dec 8, 2017

@oskarth No, it was update-react-native build only that was failing and it is not related to this. Now it will fail because of the sed

@oskarth oskarth force-pushed the feature/parameterized-builds-#2511 branch 2 times, most recently from 73a308b to 575ca52 Compare December 11, 2017 12:50
@oskarth
Copy link
Contributor Author

oskarth commented Dec 11, 2017

@rasom @yenda updated to reflect current Jenkins config at jenkins.status.im - if you have no objections, can you please approve and lets merge this?

@oskarth oskarth force-pushed the feature/parameterized-builds-#2511 branch from 575ca52 to 8fb2c13 Compare December 11, 2017 17:50
@oskarth oskarth merged commit 8fb2c13 into develop Dec 11, 2017
@oskarth oskarth deleted the feature/parameterized-builds-#2511 branch December 11, 2017 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants