[ 
https://issues.apache.org/jira/browse/CASSANDRA-16989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17420679#comment-17420679
 ] 

Andres de la Peña commented on CASSANDRA-16989:
-----------------------------------------------

[~bereng] thanks for the input, I have tried to address those problems in the 
last commits:
{quote}This seems wrong
{code:java}
./generate.sh -a
ERROR: Cannot use option -a with options -l, -m, -h or -e
{code}
{quote}
That was due to a problem with how the boolean where managed and a couple of 
typos, it should be fixed by [this 
commit|https://github.com/apache/cassandra/pull/1217/commits/c9b12006149c069ecec7ced9875e752f6d5f2ab3].
{quote}Also using -l, -m or -h will always display the help at the end no 
matter what.
{quote}
I don't see that one, help is only printed when there are no arguments or when 
there is an error on them. Are you still seeing that problem with the last 
changes?
{quote}Run -m and file is generated. Run -l with an invalid env var and file is 
overwritten with the -l one instead of erroring out {{./generate.sh -m; 
./generate.sh -l -e pepe=CASSANDRA-pepe}}
{quote}
Good catch, I have moved the env vars validation to do it before the file 
generation, 
[here|https://github.com/apache/cassandra/pull/1217/commits/b45065d5cddf71b2335fedd117f8eac69404f16c].
{quote}Seems sed is not working?
{code:java}
./generate.sh -l -e DTEST_BRANCH=CASSANDRA-pepe
Setting environment variable DTEST_BRANCH: CASSANDRA-pepe
sed: can't read s|- DTEST_BRANCH:.*|- DTEST_BRANCH: CASSANDRA-pepe|: No such 
file or directory
{code}
{quote}
That's due to differences between versions of sed, it should work with [this 
change|https://github.com/apache/cassandra/pull/1217/commits/48311a3849b21cbc0304f154863a79a7e7cc0754].
  

> Add environment variables to CircleCI config generation script
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-16989
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16989
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CI
>            Reporter: Andres de la Peña
>            Assignee: Andres de la Peña
>            Priority: Normal
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The purpose of this ticket is adding arguments to the CircleCI config 
> generation script allowing to set the values specific environment variables 
> such as {{DTEST_REPO}} or {{DTEST_BRANCH}} in the generated 
> {{.circleci/config.yml}} file. For example, we could generate a CircleCI 
> config file with MIDRES specifying a dtest repo and branch by running:
> {code}
> generate.sh -m \
>   -e DTEST_REPO=git://github.com/adelapena/cassandra-dtest.git \
>   -e DTEST_BRANCH=CASSANDRA-8272 
> {code}
> Or we could set the test multiplexer for repeating a specific test with 
> HIGHRES:
> {code}
> generate.sh -h \
>   -e REPEATED_UTEST_TARGET=testsome \
>   -e REPEATED_UTEST_CLASS=org.apache.cassandra.cql3.ViewTest \
>   -e REPEATED_UTEST_METHODS=testCompoundPartitionKey,testStaticTable \
>   -e REPEATED_UTEST_COUNT=100
> {code}
> This can be useful on its own so we don't have to manually edit the 
> {{config-2_1.yml}}/{{config.yml}}, and it can also be useful for automation 
> scripts manipulating these files.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to