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

Add a build command for dapp images #13

Merged
merged 3 commits into from
Oct 1, 2019
Merged

Conversation

area
Copy link
Member

@area area commented Sep 26, 2019

Using the CircleCI API, we can trigger the build workflow from chewie.

Syntax:

!build (goerli|mainnet) <commithash>

I don't think anyone is proposing removing the mainnet build in the dapp from a merge to master, but thought I'd include it for completeness anyway. Once this is merged, I believe removing this block from the Dapp CircleCI config will prevent it from running on commits, but will still leave it available for this build command.

Yup, I've done it with curl rather than 'properly' with request. Consider it a TODO for the future 😛

Thanks for keeping me honest, Chris!

@chmanie
Copy link
Member

chmanie commented Sep 27, 2019

I’ll help!

@rdig
Copy link
Member

rdig commented Sep 27, 2019

I’ll help!

I'll hold of reviewing this then

@rdig rdig assigned area and chmanie Sep 27, 2019
qs: {
'circle-token': process.env.CIRCLE_CI_API_KEY,
auth: {
'user': process.env.CIRCLE_CI_API_KEY
Copy link
Member

Choose a reason for hiding this comment

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

Interesting that the above didn't work. Circle docs said it would be ok 🤔 (https://circleci.com/docs/api/#add-an-api-token). But if it's working I don't really care how in this case :)

Copy link
Member Author

@area area Sep 30, 2019

Choose a reason for hiding this comment

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

Ah, I didn't even know this was a possibility - I just transposed the curl one liner I was using to the request properties. I haven't tried, but looking in the docs, maybe we were missing a : at the start of the API key? I think that's just the syntax they're using.

@@ -178,14 +178,13 @@ module.exports = async function(robot) {

robot.hear(/!build (goerli|mainnet) ([0-9a-fA-f]*)/, async msg => {
const buildInfo = await request({
method: 'POST',
Copy link
Member

Choose a reason for hiding this comment

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

Haha, that's a pretty obvious one. Sorry!

@chmanie
Copy link
Member

chmanie commented Sep 27, 2019

LGTM, thanks @area!

@rdig rdig merged commit 12ba113 into master Oct 1, 2019
@rdig rdig deleted the maintenance/add-build-command branch October 1, 2019 08:56
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.

3 participants