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

builds do not end up in cloudsmith <user>/squiddio-prod folder as expected #124

Open
mauroc opened this issue May 1, 2020 · 14 comments
Open

Comments

@mauroc
Copy link
Owner

mauroc commented May 1, 2020

followed instructions here

In master branch

git commit -am 'updated version to 1.3.4.1'
git tag v1.3.4.1
git push --tags origin master:master

however, this caused the circleci builds to end up in mauo-calvi/squiddio-beta and not in mauro-calvi/squiddio-prod, as expected. The appveryor builds were placed correctly in mauro-calvi/squiddio-prod.
Someone suggested it may be because a corresponding release was not available on github, so I tried

git commit -am 'updated version to 1.3.4.2'
git version v1.3.4.2 # creaded release 1.3.4.2 on github
git push --tags origin v1.3.4.2 # this did not trigger builds on circle ci
git push --tags origin master:master # this did, but they still ended up in the cloudsmith beta folder

I am sort of fumbling in the dark here...I am sure I am missing a step or two.

Also, upon inspection of the circleci logs, it looks like environmental variable BUILD_TAG in cloudsmith-upload.sh.in is NULL, which causes the upload to default to beta. That variable is set to CIRCLE_TAG in line 30, but can't figure out where this last variable is initialized..

@mauroc mauroc pinned this issue May 1, 2020
@rgleason
Copy link
Contributor

rgleason commented May 1, 2020

mauroc,
suggest you look at line 107-136 of cloudsmith-upload.sh
something might not be quite right, something to do with sensing the tag?

echo $BUILD_BRANCH
echo $BUILD_TAG
echo ${#BUILD_TAG}     <--- Why/What does the # do?

Could this be related to the problem?  Try taking the # off.

BUILD_BRANCH_LOWER=`echo $BUILD_BRANCH | tr '[A-Z]' '[a-z]'`
if [ "$BUILD_BRANCH_LOWER" = "master" ]; then
    echo "In master branch "
    if [ -n "$BUILD_TAG"  ]; then
        echo "building with tag"
        VERSION=$BUILD_TAG
        REPO="$PROD_REPO"
    else
        VERSION="@PROJECT_VERSION@+${BUILD_ID}.${commit}"
        echo "building without tag"
        REPO="$BETA_REPO"
    fi
else
    echo "In non master branch " $BUILD_BRANCH
    if [ -n "$BUILD_TAG" ]; then
        echo "building with tag"
        VERSION=$BUILD_TAG
        REPO="$BETA_REPO"
    else
        echo "building without tag"
        VERSION="@PROJECT_VERSION@+${BUILD_ID}.${commit}"
        REPO="$ALPHA_REPO"
    fi
fi
echo $VERSION
echo $REPO

@mauroc
Copy link
Owner Author

mauroc commented May 2, 2020

the expression in line 110

[ -n "$BUILD_TAG" ]

evaluates to false, as BUILD_TAG is null (per line 105), so REPO = $BETA_REPO in line 117.
BUILD_TAG is initialized to $CIRCLE_TAG in line 30. However I have found no trace of CIRCLE_TAG in any of the squiddio_pi files, but apparently that one is null as well.

@mauroc mauroc changed the title builds do not end up in cloudsmith mauro-calvi/squiddio-prod folder as expected builds do not end up in cloudsmith <user>/squiddio-prod folder as expected May 2, 2020
@rgleason
Copy link
Contributor

rgleason commented May 2, 2020

Maybe Jon hasn't finished that part?

Search "BUILD_TAG" (18 hits in 2 files)
C:\Users\Rick\Documents\GitHub\squiddio_pi\build\cloudsmith-upload.sh (9 hits)
Line 30: BUILD_TAG=$CIRCLE_TAG
Line 36: BUILD_TAG=$TRAVIS_TAG
Line 42: BUILD_TAG=$APPVEYOR_REPO_TAG_NAME
Line 108: echo $BUILD_TAG
Line 109: echo ${#BUILD_TAG}
Line 114: if [ -n "$BUILD_TAG" ]; then
Line 116: VERSION=$BUILD_TAG
Line 125: if [ -n "$BUILD_TAG" ]; then
Line 127: VERSION=$BUILD_TAG
C:\Users\Rick\Documents\GitHub\squiddio_pi\cmake\in-files\cloudsmith-upload.sh.in (9 hits)
Line 30: BUILD_TAG=$CIRCLE_TAG
Line 36: BUILD_TAG=$TRAVIS_TAG
Line 42: BUILD_TAG=$APPVEYOR_REPO_TAG_NAME
Line 108: echo $BUILD_TAG
Line 109: echo ${#BUILD_TAG}
Line 114: if [ -n "$BUILD_TAG" ]; then
Line 116: VERSION=$BUILD_TAG
Line 125: if [ -n "$BUILD_TAG" ]; then
Line 127: VERSION=$BUILD_TAG
Search "CIRCLECI_TAG" (0 hits in 0 files)
Search "CIRCLECI-TAG" (0 hits in 0 files)

@rgleason
Copy link
Contributor

I believe this is all working now, a tagged push from master branch should deploy to squiiddio-prod. It has worked on my fork. I believe this can be closed now.

@rgleason
Copy link
Contributor

rgleason commented Jun 27, 2020

Mauro, I think we have sorted out the write or deploy permissions for using the opencpn/squiddio-beta and squiddio-prod Cloudsmith repositories.
We have made a "Plugin Team" you have been added, made a member, and that Plugin Team has been added to th Access Control menu with "write" permissions.

If you could try incrementing your plugin to the next version and pushing a tagged commit up to your remote "master" branch I believe the files should build and deploy to the opencpn/squiddio-prod repository.

PS: you would need to accept the PR https://github.com/mauroc/squiddio_pi/pull/127/commits which does build and complete with green check

@mauroc
Copy link
Owner Author

mauroc commented Jun 27, 2020 via email

@rgleason
Copy link
Contributor

No rush, Mauro, enjoy your sailing!!!

@rgleason
Copy link
Contributor

rgleason commented Oct 3, 2020

I think this can be closed?

@rgleason
Copy link
Contributor

This is old and fixed. Needs to be closed. I can not close it. Mauro can you?

@rgleason
Copy link
Contributor

Maybe we should start over with a new Issue?

@rgleason
Copy link
Contributor

#143

@rgleason
Copy link
Contributor

Well, we need to fix this. So lets not close it yet. Tomorrow?

@rgleason
Copy link
Contributor

Mauro, I think you got this sorted out?

  1. You are a member of the Opencpn Plugin Team.
  2. For some reason one of your accounts (circleci or cloudsmith) had been changed. I can't find your report for this problem but it is somewhere.

@rgleason
Copy link
Contributor

Mauro, I hope this is fixed.

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

No branches or pull requests

2 participants