start-jsk / rtmros_common

OpenRTM - ROS interoperability packages
http://wiki.ros.org/rtmros_common
12 stars 52 forks source link

[travis] Add `cd ${TRAVIS_BUILD_DIR}` before decryption, as current directory is changed after travis.sh #1088

Closed pazeshun closed 4 years ago

pazeshun commented 4 years ago

I'm sorry, but I made a mistake around decryption in #1086. (I couldn't debug this because decryption works on branches of original repositories...)

Decryption is moved from before_script to after_success in #1086 , because decrypted information is used only for upload-docs.sh in after_success. However, current directory in after_success is /home/travis/ros/ws_rtmros_common, while /home/travis/build/start-jsk/rtmros_common in before_script. .secrets.tar.enc used in decryption is not in /home/travis/ros/ws_rtmros_common, so decryption failed. (See https://travis-ci.org/start-jsk/rtmros_common/jobs/628512639)

To fix that, this PR adds cd ${CI_SOURCE_PATH} (${CI_SOURCE_PATH} is set to /home/travis/build/start-jsk/rtmros_common in travis.sh) before decryption. To fix that, this PR adds cd ${TRAVIS_BUILD_DIR} before decryption (${TRAVIS_BUILD_DIR} is a default environment variable describing the initial directory of before_script).

pazeshun commented 4 years ago

~~Decryption was tested on a branch of original repository:

1087

https://travis-ci.org/start-jsk/rtmros_common/jobs/628548392~~

pazeshun commented 4 years ago

@k-okada Travis passed. Could you review this? Sorry for many reviews...

pazeshun commented 4 years ago

I changed ${CI_SOURCE_PATH} to ${TRAVIS_BUILD_DIR}, because ${CI_SOURCE_PATH} cannot be used before travis.sh. When decryption is moved back to before_script, cd ${CI_SOURCE_PATH} won't work.

pazeshun commented 4 years ago

Decryption was tested on a branch of original repository: https://travis-ci.org/start-jsk/rtmros_common/jobs/628694214

pazeshun commented 4 years ago

@k-okada Travis passed. Could you review this?

pazeshun commented 4 years ago

Thank you!

pazeshun commented 4 years ago

Result: https://travis-ci.org/start-jsk/rtmros_common/jobs/629305105

++tar -C /home/travis/ -xvf .secrets.tar
./.ssh/
./.ssh/id_rsa
./.ssh/config
++.travis/upload-docs.sh
+export 'GIT_COMMITTER_NAME=[secure]'
+GIT_COMMITTER_NAME='[secure]'
+export GIT_COMMITTER_EMAIL=[secure]
+GIT_COMMITTER_EMAIL=[secure]
+export 'GIT_AUTHOR_NAME=[secure]'
+GIT_AUTHOR_NAME='[secure]'
+export GIT_AUTHOR_EMAIL=[secure]
+GIT_AUTHOR_EMAIL=[secure]
+export REPOSITORY_NAME=rtmros_common
+REPOSITORY_NAME=rtmros_common
+git clone https://github.com/jsk-ros-pkg/euslisp-docs.git /home/travis/euslisp-docs
Cloning into '/home/travis/euslisp-docs'...
+git add hrpsys_ros_bridge/index.md hrpsys_ros_bridge/rtm-ros-robot-interface.md
+git commit -m 'update documentation for hrpsys_ros_bridge' -a
[master bd7b3fb] update documentation for hrpsys_ros_bridge
 1 file changed, 2675 insertions(+), 399 deletions(-)
 rewrite docs/hrpsys_ros_bridge/rtm-ros-robot-interface.md (74%)

However,

+git push --quiet https://[secure]@github.com/jsk-ros-pkg/euslisp-docs.git master
remote: Invalid username or password.
fatal: Authentication failed for 'https://[secure]@github.com/jsk-ros-pkg/euslisp-docs.git/'

I couldn't fix this, because encrypted information seems wrong.