AndreMikulec / plr

PL/R - R Procedural Language for PostgreSQL
http://www.joeconway.com
GNU General Public License v2.0
0 stars 0 forks source link

confirm token of Dave - secure: DpxrjrmF0pQsm3G/F8m7EDVz6yhBQhlwXWOtqxgQTmUMiofL1PZD+9Q1dAqyKh9Z #19

Closed AndreMikulec closed 1 month ago

AndreMikulec commented 3 months ago
PART 1
----

verify DAVE's token and Andre's token

2022 - try valid workflow file
https://github.com/AndreMikulec/appveyortest4/blob/61b92d40a655c33da8df37683ab426ca2cb586c9/appveyor.yml.securetokentest

deploy:
  - provider: GitHub
    auth_token:
      secure: O4OTdJVY47/Ju0HtC3lEUOtmgFrdOiNCZyHPHi3FPDdJUmnqdsDhPGtJi+j+cLgy
    artifact: deploy_test
    draft: false
    prerelease: false

master_andre

 #
  # always try to deploy here
  #
  - provider: GitHub
    release: 0.0.0.0.0.GITHUBCACHE
    draft: false
    prerelease: false
    artifact: pg_7z
    auth_token:
      secure: O4OTdJVY47/Ju0HtC3lEUOtmgFrdOiNCZyHPHi3FPDdJUmnqdsDhPGtJi+j+cLgy
    # non - "branch, tag, or commit" will still be expected "false" ( githubcache != true )
    # and never find a pg-*.7z to deploy - and that is OK.

  #
  # second, last of Github deployments, to try to appear as "latest"
  #
  - provider: GitHub
    release: $(APPVEYOR_REPO_TAG_NAME)
    draft: false
    prerelease: false
    artifact: plr_7z
    auth_token:
      secure: O4OTdJVY47/Ju0HtC3lEUOtmgFrdOiNCZyHPHi3FPDdJUmnqdsDhPGtJi+j+cLgy
    on:
      APPVEYOR_REPO_TAG: true

master

deploy:

#   # If the "release" does not pre-exist and thus "secure" will try to create the release
#   # and if "secure" does not have permission to create a release, then an ERROR will occur,
#   # then Appveyor will ERROR.
#   - provider: GitHub
#     release: 0.0.0.0.0.GITHUBCACHE
#     draft: false
#     prerelease: false
#     artifact: pg_7z
#     auth_token:
#       secure: DpxrjrmF0pQsm3G/F8m7EDVz6yhBQhlwXWOtqxgQTmUMiofL1PZD+9Q1dAqyKh9Z
#     # non - "branch, tag, or commit" will still be expected "false" ( githubcache != true )
#     # and never find a pg-*.7z to deploy - and that is OK.

  #
  # last of Github deployments, to try to appear as "latest"
  #
  - provider: GitHub
    release: $(APPVEYOR_REPO_TAG_NAME)
    draft: false
    prerelease: false
    artifact: plr_7z
    auth_token:
      # Token of Dave
      secure: nasXR/dCMdQmmouYtN0t1/9jilLmOA6E5EsGoP6Td5yvp3JK4QPfZO0BEVzMeXW1
      # Token of Andre
      # secure: DpxrjrmF0pQsm3G/F8m7EDVz6yhBQhlwXWOtqxgQTmUMiofL1PZD+9Q1dAqyKh9Z
    on:
      APPVEYOR_REPO_TAG: true

----

DID THIS HAPPEN - SKIP?

# Skipping commits affecting specific files (GitHub and Bitbucket only).
skip_commits:
  files:
    # skipping AppVeyor build if, in the push’s head commit, all of the files
    # have the extension .md
    - '**/*.md'

  #
  # last of Github deployments, to try to appear as "latest"
  #
  - provider: GitHub
    release: $(APPVEYOR_REPO_TAG_NAME)
    draft: false
    prerelease: false
    artifact: plr_7z
    auth_token:
      # Token of Dave
      secure: nasXR/dCMdQmmouYtN0t1/9jilLmOA6E5EsGoP6Td5yvp3JK4QPfZO0BEVzMeXW1
      # Token of Andre
      # secure: DpxrjrmF0pQsm3G/F8m7EDVz6yhBQhlwXWOtqxgQTmUMiofL1PZD+9Q1dAqyKh9Z
    on:
      APPVEYOR_REPO_TAG: true

https://github.com/postgres-plr/plr/blob/21bee6da0434a786e4053225665bcef52f62149f/appveyor.yml

----

PART 2
----

APPVEYOR_REPO_TAG - true if build has started by pushed tag; otherwise false
APPVEYOR_REPO_TAG_NAME - contains tag name for builds started by tag; otherwise this variable is undefined
https://www.appveyor.com/docs/environment-variables/

Build on tags (GitHub, BitBucket, GitLab, Gitea)

AppVeyor sets APPVEYOR_REPO_TAG environment variable 
to distinguish regular commits from tags 
- the value is true if tag was pushed; 
otherwise it’s false. 
When it’s true the name of tag is stored in APPVEYOR_REPO_TAG_NAME.

You can use APPVEYOR_REPO_TAG variable to trigger deployment on tag only, for example:

- provider: Environment
  name: production
  on:
    APPVEYOR_REPO_TAG: true

However, please note that in the case of an 
annotated tag, branch and APPVEYOR_REPO_TAG are mutually exclusive. 
This is because, for a webhook created as a result of an annotated tag, 
there is no practical, reliable way to recognize which branch the tag was created from. 
Therefore, with this setting, deployment will happen only for the master branch:

- provider: Environment
  name: production
  on:
    branch: master # only this will work
    APPVEYOR_REPO_TAG: true # condition will never be evaluated

You can disable builds on new tags through UI 
(General tab of project settings) or in appveyor.yml:

skip_tags: true

https://www.appveyor.com/docs/branches/

fix error
1.0.306
15 hours ago by Dave Cramer
master 21bee6da
10 hours ago in 2 hr 40 min
Environment: pg=REL_16_3, PlatformToolset=v143, Configuration=Debug, Platform=x64, APPVEYOR_BUILD_WORKER_IMAGE=Visual Studio 2022, rversion=4.2.3, compiler=msvc
13 min 10 sec
(RUN MORNING OF TUE MON AUG 05 2024)
https://ci.appveyor.com/project/davecramer/plr-daun5/builds/50347323/job/ji0748b59058onpk

"GitHub" deployment has been skipped as environment variable has not matched ("APPVEYOR_REPO_TAG" is "false", should be "true")

``
Unable to deploy artifact from Appveyor to Github

* remove skip_tags: true

* add tag: $(APPVEYOR_REPO_TAG_NAME) in GitHub deployment setting 
  (to prevent AppVeyor from creating a new tag, and endless build loop)

* optionally add force_update: true (to update release details, not only files)

Share
Improve this answer
Follow
answered Jan 22, 2018 at 18:28
Ilya Finkelsheyn's user avatar
Ilya Finkelsheyn
2,8811111 silver badges2020 bronze badges
Thanks. What do you mean by "Github deployment setting"? 
I would like to use the tag that I pushed my changes to, no the one that Appveyor creates – 
Jacko
 CommentedJan 22, 2018 at 18:45

$(APPVEYOR_REPO_TAG_NAME) is environment variable 
which exposes tag name you pushed (AppVeyor reads it from GitHub webhook). 
This will work for you. – 

Ilya Finkelsheyn
 CommentedJan 22, 2018 at 18:50 

Unable to deploy artifact from Appveyor to Github
Asked 6 years, 6 months ago
Modified 6 years, 6 months ago

https://stackoverflow.com/questions/48359909/unable-to-deploy-artifact-from-appveyor-to-github

AndreMikulec commented 3 months ago

Andre TEST by REMOVING this

# Skipping commits affecting specific files (GitHub and Bitbucket only).
skip_commits:
  files:
    # skipping AppVeyor build if, in the push’s head commit, all of the files
    # have the extension .md
    - '**/*.md'

X? BECAUSE - I upgraded the .md to 4..4.1 in the pull request to Dave. 2nd Dave PUSHED the NEW greater PLR TAG and the Appveyor jobs DID NOT DEPLOY X? NOTE, BAD MEMORY, entire build including jobs has to CONCLUDE without being cancelled for DEPLOY to work X? [ ] TEST THAT (above) FIRST (using "https://github.com/AndreMikulec/appveyortest4")

AndreMikulec commented 1 month ago

secure: DpxrjrmF0pQsm3G/F8m7EDVz6yhBQhlwXWOtqxgQTmUMiofL1PZD+9Q1dAqyKh9Z

Token of Dave 2 - see

https://github.com/postgres-plr/plr/blob/20a1f133bcf2bc8f37ac23da191aea590d612619/appveyor.yml

https://ci.appveyor.com/project/davecramer/plr-daun5/builds/47690260/job/rhk8vhhp39geulxu

AndreMikulec commented 1 month ago

Sep 30 2024 verified