# All pipeline steps run in their own container, but the working directory (with code) is in a shared # volume, which is mounted in all the containers. So modifying the filesystem (within the working dir) # is persistent between build steps. pipeline: lint: image: offline-twitter/go commands: - golangci-lint run test: image: offline-twitter/go commands: - mkdir pkg/persistence/test_profiles - sample_data/init_data.sh - go test -bench=. -cover ./... integration_test: image: offline-twitter/go secrets: - offline_twatter_passwd when: # At least one - path: - pkg/scraper/** - cmd/** - branch: release-* commands: - cd cmd # - ./tests.sh webserver_test: image: offline-twitter/go commands: - cd cmd - ./compile.sh - ./tw --profile ../sample_data/profile --addr localhost:1000 webserver & - sleep 1 - curl localhost:1000/cernovich > webserver_test_output.html - jobs -p | xargs -I{} kill -- -{} windows_build: image: offline-twitter/go-mingw commands: - cd cmd # - export version=$(echo $CI_COMMIT_BRANCH | grep -Poh "(?<=^release-)\d+\.\d+\.\d+") - export version=60.43.53 - ./windows-compile.sh $version version_bump_test: image: offline-twitter/go when: branch: release-* secrets: - offline_twatter_passwd commands: - export version=$(echo $CI_COMMIT_BRANCH | grep -Poh "(?<=^release-)\d+\.\d+\.\d+") - curl https://apt.playfulpachyderm.com/KEY.gpg | sudo apt-key add - - echo "deb https://apt.playfulpachyderm.com/ ./" | sudo tee /etc/apt/sources.list.d/offline_twitter.list - sudo apt update - sudo apt install -y offline-twitter-engine - which twitter - twitter create_profile outdated_profile - cd outdated_profile - twitter login offline_twatter "$OFFLINE_TWATTER_PASSWD" - twitter fetch_user pcmonk - twitter --session Offline_Twatter get_user_tweets pcmonk - (cd ../cmd && ./compile.sh $version) - which ../cmd/tw - ../cmd/tw fetch_user pcmonk dpkg_build_and_upload: when: branch: release-* image: offline-twitter/deploy commands: - export version=$(echo $CI_COMMIT_BRANCH | grep -Poh "(?<=^release-)\d+\.\d+\.\d+") - cd build - ./build_dpkg.sh $version - scp offline-twitter-engine_$${version}_all.deb aptrepo@apt.playfulpachyderm.com:/apt-repo/test-repo - ssh aptrepo@apt.playfulpachyderm.com "cd ~/test-repo && ./update.sh" windows_package: image: offline-twitter/innosetup commands: # - export version=$(echo $CI_COMMIT_BRANCH | grep -Poh "(?<=^release-)\d+\.\d+\.\d+") - export version=60.43.53 - iscc.sh /Dversion=$version /Dexe_path=`winepath -w cmd/twitter.exe` build/windows/setup.iss depends_on: - build-docker