How to renew the token to deploy to galaxy?

Recently I’ve created a pipeline to deploy my app to Galaxy and I realized that I need to generate a token in my local machine to use it from CI/CD pipelines. Reading the documentation I found out that the token will be valid until 90 days, so my question is, after 90 days my CI/CD pipeline is going to fail? is there a way to renew the token automatically? what do you guys recommend for continuous deployment on Galaxy?

Hi !
I’d like to deploy automatically from github to galaxy when I push to master branch. How did you achieve that ?

Thanks a lot

Hi, right now you need to renew each 90 days but soon we are going to open a public beta for our Push to Deploy so the build + deploy will run in our machines automatically from your commits on GitHub.

If you want to be a beta tester please send an email to support@meteor.com so we include you in the list and we will let you know once it is ready for beta :wink:

Hi, soon we are going to open a public beta for our Push to Deploy so the build + deploy will run in our machines automatically from your commits on GitHub.

If you want to be a beta tester please send an email to support@meteor.com so we include you in the list and we will let you know once it is ready for beta :wink:

Great ! Thanks a lot !

I remembered this post from Scott teaching how to use GitHub Actions to deploy to Galaxy.

https://www.scotttolinski.com/posts/how-to-deploy-to-meteor-galaxy-with-github-actions/

But as I said, this is going to be really easy very soon :slight_smile:

I use github actions to do that :

Here is mine, heavily inspired by Scott post ( mentionned by Filipe ),

name: Galaxy publish prod
on:
  push:
    branches:
      - master
jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Decrypt prod settings
        run: ./.github/scripts/decrypt-prod.sh
        env:
          PASS: ${{ secrets.PASS }}
      - name: Setup .npmrc for private packages // you probably do not need this
        run: echo "//npm.pkg.github.com/:_authToken=${{secrets.NPM_AUTH_TOKEN}}" >> ~/.npmrc
      - name: Setup Meteor
        uses: meteorengineer/setup-meteor@v1
        with:
          meteor-release: "2.4.0" 
      - run: meteor npm install
      - run: meteor node merge-locale.js // custom line you can delete it
      - run: ./email-transform.sh // custom line you can delete it
      - run: METEOR_SESSION_FILE=token.json DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy app.campus-skills.com --settings settings-prod.json

@filipenevola What is the benefit comparing to github actions ?

The benefit is that you don’t need to create any code or configuration by hand.

You are going to create a new app (or edit an existent one), choose a repository in your GitHub account, select a few settings (like branch, container size, etc) and that is it.

Your app is going to be always deployed when new changes come to this branch.

And of course we will improve this set up over time using our user’s feedback.

1 Like